mapbox-gl
3.34.2 · 3 Nov 2026SEE LICENSE IN LICENSE.txt6M / weekRepositoryHomepagenpmAtom feed
3.34.2 is the newest release of 3.x.
In short
1 breaking1 security15 new8 fixed
- breaking
Switch the ESM entry point to named exports (
import * as mapboxgl from 'mapbox-gl/esm') so that modern bundlers can eliminate small unused parts of the code. Replacemapboxgl.accessTokenwithMapaccessTokenoption. Most of the bundle still can't be statically eliminated, but this release also improves lazy loading of code at runtime, with more improvements on the way. - security
Fix minor vulnerabilities related to Object prototype pollution from an untrusted style or tiles.
Release note
Breaking changes
- breaking
Switch the ESM entry point to named exports (
import * as mapboxgl from 'mapbox-gl/esm') so that modern bundlers can eliminate small unused parts of the code. Replacemapboxgl.accessTokenwithMapaccessTokenoption. Most of the bundle still can't be statically eliminated, but this release also improves lazy loading of code at runtime, with more improvements on the way.
Features and improvements
Extend
MapgetLayerPropertyandsetLayerPropertyto support layer-level properties (minzoom,maxzoom,filter,slot,appearances)Extend
TileProviderAPI to acceptImageBitmapforrasterandraster-demproviders.Improve model loading and rendering performance.
Improve symbol rendering performance.
Improve performance of decoding and encoding vector tiles and other protobuf-encoded assets.
Improve color parsing performance, slightly improving load time for styles with many color values.
Extract indoor and part of the model rendering code to be loaded on demand when using the ESM entry point.
Add
GeolocateControlreadyevent andsetShowAccuracyCircle,setShowUserHeading,setFitBoundsOptions,setShowUserLocationmethods.Add
KeyboardHandlerdisablePan/enablePanmethods.Add
DragRotateHandlerdisablePitch/enablePitchmethods.Add
TouchZoomRotateHandlerdisableTapDragZoom/enableTapDragZoommethods.Expose
MapsetLanguage,getLanguage,setWorldview,getWorldviewas stable public methods (previously private).Remove all direct dependencies from
package.jsonslightly improving NPM install size and time.Improve anti-aliasing for lines with borders.
Implement automatic conflation of regular and HD road data in preparation for future Mapbox Standard updates.
Bug fixes
Fix an issue that sometimes caused black boxes to appear instead of symbol icons.
Fix precision issues on tile borders for elevated roads.
Fix rendering issues for stacked underground roads.
- security
Fix minor vulnerabilities related to Object prototype pollution from an untrusted style or tiles.
Fix the
Cutoff is currently disabled on terrainwarning on Standard style.Fix appearance conditions validation to accept compound expressions.
Fix issues with model cutout fading via
model-line-cutout-modeproperty.Fix an issue with step expression evaluation for symbol layers.
Fix an issue with custom layer rendering alongside data-driven
line-emissive-strength