Releases: mapbox/mapbox-gl-js
v3.2.0
Features and improvements ✨
- Improve map loading performance.
- Add a debug UI for the development build of GL JS, enabled with
devtools: trueinMapoptions. - Add imports support in
map.areTilesLoaded. - Add support of rotation of elevated raster layers.
- Add support of negative values for
fill-extrusion-flood-light-ground-radiusproperty. - Improve visual cutoff behavior of buildings when using
fill-extrusion-cutoff-fade-rangeproperty.
Bug fixes 🐞
- Fix the moiré effects on patterns in tilted map views.
- Fix occasional rendering issues with semitransparent raster tiles on globe view.
- Fix
configexpression chaining through nested styles and other issues related to config scope. - Fix an issue where
map.flyTowithpaddingoption was setting and overriding map's padding. - Issue a warning instead of a validation error if
urlortilesis missing from source, i.e. in MapTiler source. - Remove role attribute for non-visible alerts. (h/t @jakubmakielkowski) #13051
- Fix an elevation of symbols above multiple fill extrusions, when some of them hidden or lowered.
- Fix a small callback-related memory leak. (h/t @temas) #13074
- Fix
configandformatexpressions not working together. - Improve error reporting when a user environment doesn't support WebGL 2.
v3.2.0-beta.1
Features and improvements ✨
- Added imports support in
map.areTilesLoaded. - Added support of rotation of elevated raster layers.
- Added support of negative values for
fill-extrusion-flood-light-ground-radiusproperty. - Config options of one imported fragment can be used in another fragments.
- Improved cutoff behavior of buildings.
Bug fixes 🐞
- Fix an issue where
map.flyTowithpaddingoption was setting and overriding map's padding. - Issue a warning instead of a validation error if
urlortilesis missing from source, i.e. in MapTiler source. - Fix the moiré effects on patterns in tilted map views.
- Removing role attribute for non-visible alerts. (h/t @jakubmakielkowski) #13051
- Fix an elevation of symbols above multiple fill extrusions, when some of them hidden or lowered.
- Fix
configexpression chaining through nested styles. - Proper clean up of actor cancel callbacks. (h/t @temas) #13074
v3.1.2
v3.1.1
Bug fixes 🐞
- Fix
fill-extrusionsnot being displayed in alternative projections. - Fix an issue when WebGL might randomly crash to an unrecoverable state on some mobile devices, specifically Safari on iOS.
v3.1.0
Features and improvements ✨
- Improve performance for maps with many textures (such as styles with satellite imagery), fixing excessive memory usage. (h/t @tristan-morris) #12924
- Add
raster-elevationproperty for elevating raster layers to a constant height (e.g. clouds over globe). - Add
raster-emissive-strengthandfill-extrusion-emissive-strengthproperties for controlling 3D lighting on buildings and raster layers. - Add
MapgetConfigPropertymethod for getting current style config values. - Add
configsupport in terrain options. - Improve performance for pitched views with many fill extrusions on higher zoom levels.
- Allow turning off the terrain that is defined in the imports on the root-level Style by setting it to
null. - Allow the partial terrain exaggeration update without specifying the source.
- Respect style schema restrictions (
minValue,maxValue,stepValue,values,type) when evaluating config options.
Bug fixes 🐞
- Fix an issue where
center: [0, 0]andzoom: 0map options were ignored in favor of style settings. - Fix an issue with the camera not taking the short route when animating between locations across the anti-meridian.
- Fix an issue where a style with imports sometimes loaded in incomplete state.
- Fix an issue with rendering styles with nested imports.
- Fix an issue with sources not reloading when changing language and worldview.
- Fix an issue where updating a style fragment URL didn't work correctly.
- Fix an issue when adding a layer with explicit
slotnot taking precedence over thebeforeparameter for layer order. - Fix an issue where updating an image before initial image is loaded produced an error. (h/t @maciejmatu) #12928
- Fix an issue with incorrect collisions for elevated symbols.
- Fix an issue with
"camera-projection": "orthographic"not working in styles with imports. - Fix an issue with tiles sometimes missing in terrain mode on views from a hill down on a valley.
- Fix compact attribution style when using global CSS that sets
box-sizing: border-box. (h/t @simondriesen) #12982 - Remove redundant
aria-labelattribute in attribution control that fails accessibility conformance. (h/t @maggiewachs) #12981 - Disable terrain and hillshade when browser fingerprinting protection (e.g. in private browsing mode) prevents it from rendering correctly.
- Fix layer rendering when import requests are failing.
- Fix map
loadevent not firing for the sources whose tiles are 404s. - Require either
urlortilesfor tiled sources during validation. - Validate for empty layer and source IDs in runtime.
Changes since v3.1.0-beta.1
Features and improvements ✨
- Allow turning off the terrain that is defined in the imports on the root-level Style by setting it to
null. - Allow the partial terrain exaggeration update without specifying the source.
- Respect style schema restrictions (
minValue,maxValue,stepValue,values,type) when evaluating config options.
Bug fixes 🐞
- Disable terrain and hillshade when browser fingerprinting protection (e.g. in private browsing mode) prevents it from rendering correctly.
- Fix layer rendering when import requests are failing.
- Fix map
loadevent not firing for the sources whose tiles are 404s. - Require either
urlortilesfor tiled sources during validation. - Validate for empty layer and source IDs in runtime.
v3.1.0-beta.1
Features and improvements ✨
- Improve performance for maps with many textures (such as styles with satellite imagery), fixing excessive memory usage. (h/t @tristan-morris) #12924
- Add
raster-elevationproperty for elevating raster layers to a constant height (e.g. clouds over globe). - Add
raster-emissive-strengthandfill-extrusion-emissive-strengthproperties for controlling 3D lighting on buildings and raster layers. - Add
MapgetConfigPropertymethod for getting current style config values. - Add
configsupport in terrain options. - Improve performance for pitched views with many fill extrusions on higher zoom levels.
Bug fixes 🐞
- Fix an issue where
center: [0, 0]andzoom: 0map options were ignored in favor of style settings. - Fix an issue with the camera not taking the short route when animating between locations across the anti-meridian.
- Fix an issue where a style with imports sometimes loaded in incomplete state.
- Fix an issue with rendering styles with nested imports.
- Fix an issue with sources not reloading when changing language and worldview.
- Fix an issue where updating a style fragment URL didn't work correctly.
- Fix an issue when adding a layer with explicit
slotnot taking precedence over thebeforeparameter for layer order. - Fix an issue where updating an image before initial image is loaded produced an error. (h/t @maciejmatu) #12928
- Fix an issue with incorrect collisions for elevated symbols.
- Fix an issue with
"camera-projection": "orthographic"not working in styles with imports. - Fix an issue with tiles sometimes missing in terrain mode on views from a hill down on a valley.
- Fix compact attribution style when using global CSS that sets
box-sizing: border-box. (h/t @simondriesen) #12982 - Remove redundant
aria-labelattribute in attribution control that fails accessibility conformance. (h/t @maggiewachs) #12981
v3.0.1
Bug fixes 🐞
- Fix attribution not being displayed for imported fragments.
v3.0.0
Mapbox GL JS v3 enables the Mapbox Standard Style, a new realistic 3D lighting system, building shadows and many other visual enhancements, and an ergonomic API for using a new kind of rich, evolving, configurable map styles and seamless integration with custom data. You can get more information about the new features in the Mapbox GL JS v3 migration guide.
Breaking changes ⚠️
- Discontinue WebGL 1 support. WebGL 2 is now mandatory for GL JS v3 usage, aligned with universal browser support.
- Remove the
optimizeForTerrainmap option (layer rendering on globe and terrain is always optimized now).
Features and improvements ✨
3D Lights
- Introduced a new 3D Lights API that supports directional and ambient light sources to give you control of lighting and shadows in your map when using 3D objects.
- Add new
*-emissive-strengthproperties for styling layers with the new lighting API. - Introduced flood lighting for the extruded buildings' walls and the ground beneath them.
- Introduced ambient occlusion to affect the ground beneath the extruded buildings.
- Introduced
measureLightexpression lights configuration property: Create dynamic styles based on lighting conditions. - Added support for shadows cast from fill extrusions.
- Introduced
hslandhslacolor expressions: These expressions allow you to define colors using hue, saturation, and lightness format. - Add support for fading out 3D layers in the distance with
fill-extrusion-cutoff-fade-rangeandmodel-cutoff-fade-rangestyle properties.
Style Composition with Imports
- Introducing support for nested and configurable styles. You can now import other styles into your main style, with updates to imported styles automatically reflected in your main style. Configuration properties can be set for imported styles, making them customizable.
- Introduced concept of
slots, pre-specified locations in the style, where your layer can be added (e.g., on top of existing land layers but below all labels). - Introduced
configexpression: Retrieves the configuration value for the given option. - When no
styleoption is provided to the Map constructor, the Mapbox Standard Style is now enabled as a default. - Add a
style.import.loadevent to track the loading of imported style fragments.
Terrain Improvements
- Improve terrain sampling accuracy.
- Improve zooming and panning over dynamic terrain so that it feels smooth.
- Improve performance for styles that use both hillshade layers and terrain.
New Raster Features
- Introduced raster colorization via
raster-colorpaint properties. - Introduced
raster-valueexpression: Returns the raster value of a pixel computed viaraster-color-mix.
…and more!
- Add support for controlling the vertical fog range with
vertical-rangestyle property. - Introduced rounding fill extrusion edges for a smoother appearance.
- Introduced the
icon-image-cross-fadeproperty, which controls the transitioning between the two variants of an icon image. - Introduced
randomexpression: Generate random values using this expression. Use this expression to generate random values, which can be particularly helpful for introducing randomness into your map data. - Introduced
distanceexpression: Returns the shortest distance in meters between the evaluated feature and the input geometry. - Add support for elevating symbols over buildings & other 3D layers with
symbol-z-elevatestyle property. - Improve rendering of stars on globe view.
- Add the
renderstartevent, which, combined with therenderevent, can be used to measure rendering frame duration. - Enable zoom-based expressions for model rotation, scale, and translation.
- Optimize shader compilation to reduce stuttering on complex 3D styles.
- Reduce flickering of symbols along lines due to rounding errors.
Bug fixes 🐞
- Fix the accuracy of the atmosphere gradient when rendering the globe.
- Fix a bug with horizon placement when map
paddingis used. - Fix a bug with horizon rendering on Windows/NVidia.
- Accessibility fixes: remove
tabindexwhen the map is not interactive; removerole="list"from the attribution control; addrole="img"to markers (h/t @kumiko-haraguchi and @aviroopjana). - Fix the order of layers in
queryRenderedFeaturesresults on maps with globe and terrain. - Fix an error when zooming out on certain globe views using the GL JS development bundle.
- Fix an error on
maphasImageandupdateImageafter the map was removed. - Fix rendering of line layers with data-driven
line-border. - Fix an issue with symbols sometimes not rendering correctly over the terrain on a top-down view.
- Remove duplicate frag precision qualifiers
Changes since v3.0.0-rc.2
Bug fixes 🐞
- Fix stale source caches in imports on projection change.
- Fix style not updating properly when adding new imports.
- Fix the breakage of ground effect that occurs when edges cross tile boundaries.
- Fix circle layer depth occlusion not working properly with the orthographic camera.
- Fix diffing of the styles with imports on
setStyle. - Fix GL JS bundle in environments that transpile minified code with async/awaits.
- Fix
queryRenderedFeatureswhen the model layer is present in the style. - Fix stale 3D lights when removing individually.
- Fix source name collision between imports in symbol layers.
- Remove duplicate frag precision qualifiers.
v3.0.0-rc.2
Mapbox GL JS v3 enables the Mapbox Standard Style, a new realistic 3D lighting system, building shadows and many other visual enhancements, and an ergonomic API for using a new kind of rich, evolving, configurable map styles and seamless integration with custom data. You can get more information about the new features in the Mapbox GL JS v3 migration guide. Changes since v3.0.0-rc.1:
Features and improvements ✨
- Improve performance for styles that use both hillshade layers and terrain.
Bug fixes 🐞
- Fix an issue with
setConfigPropertynot taking effect for certain properties. - Fix rendering issues when a style and its imports share the same source IDs.
- Fix
symbol-z-elevateelevating symbols over invisible fill extrusions (with zero opacity). - Fix an issue with style validation accepting a style import with an empty ID.
- Fix an issue with validation of unknown properties in
lightsobjects.
v3.0.0-rc.1
Mapbox GL JS v3 enables the Mapbox Standard Style, a new realistic 3D lighting system, building shadows and many other visual enhancements, and an ergonomic API for using a new kind of rich, evolving, configurable map styles and seamless integration with custom data. You can get more information about the new features in the Mapbox GL JS v3 migration guide. Changes since v3.0.0-beta.5:
Features and improvements ✨
- Enable zoom-based expressions for model rotation, scale and translation.
- Optimize shader compilation to reduce stuttering on complex 3D styles.
- Reduce stuttering when loading 3D tiles with models.
- Improve memory footprint when rendering ground lighting effects.
- Reduce flickering of symbols along lines due to rounding errors.
- Improve panning over bumpy terrain so that it feels smooth.
- Optimize switching between styles that have imports.
- Add support for
slotin custom layers.
Bug fixes 🐞
- Fix rendering of line layers with data-driven
line-border. - Fix an issue with lighting inconsistency between rendering with and without terrain.
- Fix an issue with symbols sometimes not rendering correctly over terrain on top-down view.
- Fix an issue with
raster-colorsometimes causing memory issues. - Fix an issue with non-1 alpha in
fill-extrusion-colorcausing rendering issues in 3D lighting mode. - Disallow duplicate style import IDs.
- Disallow duplicate directional and ambient lights.
- Fix wireframe debug mode for model rendering.
- Fix root style top-level properties not taking precedence over children import top-level properties.