mapbox-gl
Advanced tools
Changelog
v3.7.0
background-pitch-alignment
property of the background
layer, which is set to map
by default but can now be set to viewport
. Useful for highlighting individual features by dimming the rest of the map with a semitransparent background.top
, right
, bottom
, and left
) (h/t @Ethan-Guttman).retainPadding
option for camera movement methods, which can be set to false
for pre-v3.4 padding behavior.config
expression support in layer filter.symbol-z-offset
and symbol-elevation-reference
.fill-z-offset
property for fill layers.Map#fitBounds
for the alternative projections.Map#setPaintProperty
and Map#setLayoutProperty
methods.string
event type in Map event handlers.RequestTransformFunction
, ResourceType
, and RequestParameters
types.fill-extrusion-line-width
rendering for large polygonssymbol-z-order
is set to auto
.minzoom
and maxzoom
properties were ignored by clip
layers.clip
layers.cast-shadows
property type.setStencilMode
-related error in the console with the dev build.Changelog
3.6.0
fill-exturion
layer by introducing fill-extrusion-line-width
and fill-extrusion-line-alignment
properties. Set fill-extrusion-line-width
to a non-zero value to render walls instead of a solid extrusion.circle-blur
values.data
field.clip-layer-scope
property to limit clip
layer to a specific style fragment.Map
idle
method to check whether a map is idle.isSourceLoaded
flag on sourcedata
event for already loaded sources.load
event when all tiles fail to load.dynamic
mode is updated too frequently.dynamic
mode.Map
getLayer
not working properly with custom layers.line-trim-offset
on very long lines.Changelog
3.5.2
fill-extrusion-cutoff-fade-range
.Changelog
3.5.1
icon-occlusion-opacity
/text-occlusion-opacity
properties to opt-in to new occlusion behavior.Changelog
3.5.0
@types/mapbox-gl
are not fully compatible with the new first-class typings. Users relying on the community typings may experience breaking changes. Please remove the @types/mapbox-gl
dependency and refer to the v3.5.0 migration guide for instructions on upgrading, resolving common issues, and asking questions regarding the migration to the first-class typings. We welcome your feedback and contributions to make Mapbox GL JS better.color-theme
property and Map
setColorTheme
method to enable colorization with a lookup table (LUT) images.updateData
for GeoJSON
sources in dynamic
mode.icon-occlusion-opacity
and text-occlusion-opacity
properties to fade symbols behind models and landmarks.line-occlusion-opacity
property to fade lines behind 3D objects.clip
layer to filter out rendering data.line-z-offset
property for a non-globe view.model-cutoff-fade-range
property to control fade out of faraway 3D buildings.line-pattern
on long lines and higher zooms.line-trim-color
and line-trim-fade-range
properties to customize rendering of lines trimmed with line-trim-offset
.Map
getSlots
method for listing available slots of a style.updateData
calls.raster-particle
layer animation.model-front-cutoff
property for Meshopt-encoded models.setTerrain
.style.load
event missing style
property.queryRenderedFeatures
on areas with missing DEM tiles when terrain is enabled.Changelog
3.4.0
dynamic: true
option for GeoJSON sources that enables partial update API with source.updateData
method. Further optimizations for this mode are expected in future releases.Map
setConfig
, getConfig
, setSchema
and getSchema
methods for batch setting of style configuration options.config
option for the Map
constructor and setStyle
methods for conveniently setting style configuration options on map initialization.icon-color-saturation
, icon-color-contrast
, icon-color-brightness-min
and icon-color-brightness-max
to control symbol layer appearance.line-join
mode: none
to improve line pattern distortions around joins.model-id
property to support URIs (in addition to style-defined model references).devtools
UI.flyTo
ignoring padding
in its options.cameraForBounds
on globe view. (h/t @jonasnoki) #13126preloadOnly
not preloading tiles from style imports.queryRenderedFeatures
for non-integer ID in non-tiled model sourcesmodel-scale
property for large number of 3D models.raster-particle
layer on globe view.raster-array
data.symbol-z-elevate
.raster-particle
layer on certain Android devices.