mapbox-gl
Advanced tools
Changelog
3.0.1
Changelog
3.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.
optimizeForTerrain
map option (layer rendering on globe and terrain is always optimized now).*-emissive-strength
properties for styling layers with the new lighting API.measureLight
expression lights configuration property: Create dynamic styles based on lighting conditions.hsl
and hsla
color expressions: These expressions allow you to define colors using hue, saturation, and lightness format.fill-extrusion-cutoff-fade-range
and model-cutoff-fade-range
style properties.slot
s, pre-specified locations in the style, where your layer can be added (e.g., on top of existing land layers but below all labels).config
expression: Retrieves the configuration value for the given option.style
option is provided to the Map constructor, the Mapbox Standard Style is now enabled as a default.style.import.load
event to track the loading of imported style fragments.raster-color
paint properties.raster-value
expression: Returns the raster value of a pixel computed via raster-color-mix
.vertical-range
style property.icon-image-cross-fade
property, which controls the transitioning between the two variants of an icon image.random
expression: 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.distance
expression: Returns the shortest distance in meters between the evaluated feature and the input geometry.symbol-z-elevate
style property.renderstart
event, which, combined with the render
event, can be used to measure rendering frame duration.padding
is used.tabindex
when the map is not interactive; remove role="list"
from the attribution control; add role="img"
to markers (h/t @kumiko-haraguchi and @aviroopjana).queryRenderedFeatures
results on maps with globe and terrain.map
hasImage
and updateImage
after the map was removed.line-border
.Changelog
2.15.0
respectPrefersReducedMotion
map option (#12694)isPointOnSurface
map method to determine if the given point is located on a visible map surface. (#12695)