mapbox-gl
3.34.2 · 3 Nov 2026SEE LICENSE IN LICENSE.txt6M / weekRepositoryHomepagenpmAtom feed
0.54.1 is the newest release of 0.45.x.
In short
2 breaking20 new27 fixed
- breaking
Evented#fireandEvented#listensare now marked as private. ThoughEventedis still exported, andfireandlistensare still functional, we encourage you to seek alternatives; a future version may remove their API accessibility or change its behavior. If you are writing a class that needs event emitting functionality, consider usingEventEmitteror similar libraries instead. - breaking
The
"to-string"expression operator now convertsnullto an empty string rather than to"null". #6534
Release note
Breaking changes
- breaking
Evented#fireandEvented#listensare now marked as private. ThoughEventedis still exported, andfireandlistensare still functional, we encourage you to seek alternatives; a future version may remove their API accessibility or change its behavior. If you are writing a class that needs event emitting functionality, consider usingEventEmitteror similar libraries instead. - breaking
The
"to-string"expression operator now convertsnullto an empty string rather than to"null". #6534
Features and improvements
:rainbow: Add
line-gradientproperty #6303Add
abs,round,floor, andceilexpression operators #6496Add
collatorexpression for controlling case and diacritic sensitivity in string comparisons #6270Add CSS linting to test suite (h/t @jasonbarry) #6071
Add support for configurable maxzoom in
raster-demtilesets #6103Add support for Mapzen Terrarium tiles in
raster-demsources #6110Add
preventDefaultmethod onmousedown,touchstart, anddblclickevents #6218Add
originalEventproperty onzoomendandmoveendfor user-initiated scroll events (h/t @stepankuzmin) #6175Accept arguments of type
valuein"length"expressions #6244Introduce
MapWheelEvent#6237Add setter for
ScaleControlunits (h/t @ryanhamley) #6138, #6274Add
openevent forPopup#6311Explicit
"object"type assertions are no longer required when using expressions #6235Add
anchoroption toMarker#6350HTMLElementis now passed toMarkeras part of theoptionsobject, but the old function signature is still supported for backwards compatibility #6356Add support for custom colors when using the default
MarkerSVG element (h/t @andrewharvey) #6416Allow
CanvasSourceinitialization fromHTMLElement#6424Add
is-supported-scriptexpression 6260
Bug fixes
Align
raster-demtiles to pixel grid to eliminate blurry rendering on some devices #6059Fix label collision circle debug drawing on overzoomed tiles #6073
Improve error reporting for some failed requests #6126, #6032
Fix several
Map#queryRenderedFeaturesbugs:account for
{text, icon}-offsetwhen querying#6135correctly query features that extend across tile boundaries #5756
fix querying of
circlelayer features with-pitch-scaling: 'viewport'or-pitch-alignment: 'map'#6036eliminate flicker effects when using query results to set a hover effect by switching from tile-based to viewport-based symbol querying #6497
Preserve browser history state when updating the
Maphash #6140Fix undefined behavior when
Map#addLayeris invoked with anidof a preexisting layer #6147Fix bug where
icon-imagewould not be rendered iftext-fieldis an empty string #6164Ensure all camera methods fire
rotatestartandrotateendevents #6187Always hide duplicate labels #6166
Fix
DragHandlerbugs where a left-button mouse click would end a right-button drag rotate and a drag gesture would not end if the control key is down onmouseup#6193Add support for calling
{DragPanHandler, DragRotateHandler}#disablewhile a gesture is in progress #6232Fix
GeolocateControluser location dot sizing whenMap's<div>inheritsbox-sizing: border-box;(h/t @andrewharvey) #6227Fix bug causing an off-by-one error in
arrayexpression error messages (h/t @drewbo) #6269Improve error message when an invalid access token triggers a 401 error #6283
Fix bug where lines with
line-widthlarger than the sprite height of theline-patternproperty would render other sprite images #6246Fix broken touch events for
DragPanHandleron mobile using Edge (note that zoom/rotate/pitch handlers still do not support Edge touch events #1928) #6325Fix race condition in
VectorTileWorkerSource#reloadTilecausing a rendering timeout #6308Fix bug causing redundant
gl.stencilFunccalls due to incorrect state checking (h/t @yangdonglai) #6330Fix bug where
mousedownortouchstartwould cancel camera animations in non-interactive maps #6338Fix bug causing a full-screen flicker when the map is pitched and a symbol layer uses non-zero
text-translate#6365Fix bug in
to-rgbaexpression causing division by zero 6388Fix bug in cross-fading for
*-patternproperties with non-integer zoom stops #6430Fix bug where calling
Map#removeon a map with constructor optionhash: truethrows an error (h/t @allthesignals) #6490Fix bug causing flickering when panning across the anti-meridian #6438
Fix error when using tiles of non-power-of-two size #6444
Fix bug causing
Map#moveLayer(layerId, beforeId)to remove the layer whenlayerId === beforeId#6542