mapbox-gl
3.34.2 · 3 Nov 2026SEE LICENSE IN LICENSE.txt6M / weekRepositoryHomepagenpmAtom feed
197 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 1.x
1.4.1
10 Oct 2019Fix the way that
coalescehandles theimageoperator so available images are rendered properlyDo not emit the
styleimagemissingevent for an empty string valueFix serialization of
ResolvedImagetype so*-patternproperties work properly
1.4.0
27 Sep 2019Add
imageexpression operator to determine image availabilityEnable
text-offsetwith variable label placementFaster loading and better look of raster terrain
Features
Add
imageexpression operator to determine image availabilityEnable
text-offsetwith variable label placement
Improvements
Faster loading and better look of raster terrain
Improved code documentation aroud resizing and *RenderedWorldCopies and more (#8748, #8754)
Improve single vs. multi-touch zoom & pan interaction
Bug fixes
Fix rendering of
collisionBoxwhentext-translateoricon-translateis enabledFix
TypeErrorwhen reloading a source and immediately removing the mapAdding tooltip to the geolocation control button (#8735) (h/t BAByrne)
Add
originalEventproperty to NavigationControl events (#8693) (h/t stepankuzmin)Don't cancel follow mode in the GeolocateControl when resizing the map or rotating the screen
Fix error when calling
Popup#trackPointerbefore setting its content or location (#8757) (h/t zxwandrew)Respect newline characters when text-max-width is set to zero
Update earcut to v2.2.0 to fix polygon tesselation errors
Fix icon-fit with variable label placement
Icons stretched with
icon-text-fitare now sized correctlyCollision detection for icons with
icon-text-fitnow works correctly
1.3.2
26 Sep 2019Fix a SecurityError in Firefox >= 69 when accessing the cache
1.3.0
28 Aug 2019Introduce
text-writing-modesymbol layer property to allow placing point labels vertically. #8399Extend variable text placement to work when
text/icon-allow-overlapis set totrue. #8620Allow
text-colorto be used in formatted expressions to be able to draw different parts of a label in different colors. #8068
Features
Introduce
text-writing-modesymbol layer property to allow placing point labels vertically. #8399Extend variable text placement to work when
text/icon-allow-overlapis set totrue. #8620Allow
text-colorto be used in formatted expressions to be able to draw different parts of a label in different colors. #8068
Improvements
Improve tile loading logic to cancel requests more aggressively, improving performance when zooming or panning quickly. #8633
Display outline on control buttons when focused (e.g. with a tab key) for better accessibility. #8520
Improve the shape of line round joins. #8275
Improve performance of processing line layers. #8303
Improve legibility of info displayed with
map.showTileBoundaries = true. #8380 (h/t @andrewharvey)Add
MercatorCoordinate.meterInMercatorCoordinateUnitsmethod to make it easier to convert from meter units to coordinate values used in custom layers. #8524 (h/t @andrewharvey)Improve conversion of legacy filters with duplicate values. #8542
Move out documentation & examples website source to a separate
mapbox-gl-js-docsrepo. #8582
Bug Fixes
Fix a bug where local CJK fonts would switch to server-generated ones in overzoomed tiles. #8657
Fix precision issues in deck.gl-powered custom layers. #8502
Fix a bug where fill and line layers wouldn't render correctly over fill extrusions when coming from the same source. #8661
Fix map loading for documents loaded from Blob URLs. #8612
Fix classification of relative file:// URLs when in documents loaded from a file URL. #8612
Remove
esmfrom packagedependencies(so that it's not installed onnpm install mapbox-gl). #8586 (h/t @DatGreekChick)
1.2.1
9 Aug 2019Fix bug in
NavigationControlcompass button that prevented it from rotating with the map
1.2.0
29 Jul 2019- breaking
Fix changes to
text-variable-anchor, such that previous anchor positions would take precedence only if they are present in the updated array (considered a bug fix, but is technically a breaking change from previous behavior) Add
*-sort-keylayout property for circle, fill, and line layers, to dictate which features appear above others within a single layerAdd ability to instantiate maps with specific access tokens
Features and improvements
Add
*-sort-keylayout property for circle, fill, and line layers, to dictate which features appear above others within a single layerAdd ability to instantiate maps with specific access tokens
Accommodate
prefers-reduced-motionsettings in browserAdd Map
visualizePitchoption that tilts the compass as the map pitches (#8208, fixed by #8296) (h/t pakastin)Make source options take precedence over TileJSON (#8232) (h/t jingsam)
Make requirements for text offset properties more precise
Expose
convertFilterAPI in the style specification (#8493
Bug fixes
- breaking
Fix changes to
text-variable-anchor, such that previous anchor positions would take precedence only if they are present in the updated array (considered a bug fix, but is technically a breaking change from previous behavior) Fix rendering of opaque pass layers over heatmap and fill-extrusion layers
Fix rendering of extraneous vertical line in vector tiles (#8477, fixed by #8479)
Turn off 'move' event listeners when removing a marker
Fix class toggling on navigation control for IE (#8495) (h/t cs09g)
Fix background rotation hovering on geolocate control (#8367) (h/t GuillaumeGomez)
Fix error in click events on markers where
startPosis not defined (#8462) (h/t @msbarry)Fix malformed urls when using custom
baseAPIURLof a certain form
1.1.1
16 Jul 2019Fix unbounded memory growth caused by failure to cancel requests to the cache
Fix unbounded memory growth caused by failure to cancel requests in IE
Fix performance of getting tiles from the cache
1.1.0
2 Jul 2019Improve line rendering performance by using a more compact line attributes layout
Improve data-driven symbol layers rendering performance
Add the ability to disable validation during
queryRenderedFeaturesandquerySourceFeaturescalls, as a performance optimization (#8211) (h/t gorshkov-leonid)
Minor features and improvements
Improve line rendering performance by using a more compact line attributes layout
Improve data-driven symbol layers rendering performance
Add the ability to disable validation during
queryRenderedFeaturesandquerySourceFeaturescalls, as a performance optimization (#8211) (h/t gorshkov-leonid)Improve
setFilterperformance by caching keys ingroupByLayoutroutine (#8122) (h/t vallendm)Improve rendering of symbol layers with
symbol-z-order: viewport-y, when icons are allowed to overlap but not textPrefer breaking lines at a zero width space to allow better break point suggestions for Japanese labels
Add a
WebGLRenderingContextargument toonRemovefunction ofCustomLayerInterface, to allow direct cleanup of related context (#8156) (h/t ogiermaitre)Allow zoom speed customization by adding
setZoomRateandsetWheelZoomRatemethods toScrollZoomHandler(#7863) (h/t sf31)Add
trackPointermethod toPopupAPI that continuously repositions the popup to the mouse cursor when the cursor is within the mapAdd
getElementmethod toPopupto retrieve the popup's HTML element (#8123) (h/t bravecow)Add
fill-patternexample to the documentation (#8022) (h/t flawyte)Update script detection for Unicode 12.1
Add
nofollowto Mapbox logo & "Improve this map" links (#8106) (h/t viniciuskneves)Include source name in invalid GeoJSON error (#8113) (h/t Zirak)
Bug fixes
Fix
updateImagenot working as expected in ChromeFix issues with double-tap zoom on touch devices
Fix duplication of
movestartevents when zooming (#8259) (h/t bambielli-flex)Fix validation of
"format"expression failing when options are providedFix
setPaintPropertynot working online-patternpropertyFix the GL context being left in unpredictable states when using custom layers
Fix unnecessary updates to attribution control string (#8082) (h/t poletani)
Fix bugs in
findStopLessThanOrEqualToalgorithm (#8134) (h/t Mike96Angelo)Fix map not displaying properly when inside an element with
text-align: center(#8227) (h/t mc100s)Clarify in documentation that
Popup#maxWidthaccepts allmax-widthCSS values (#8312) (h/t viniciuskneves)Fix location dot shadow not displaying (#8119) (h/t bravecow)
Fix docs dev dependencies being mistakenly installed as package dependencies (#8121) (h/t bravecow)
Fix geolocate button CSS (#8367, h/t GuillaumeGomez)
Fix caching for Mapbox tiles
1.0.0
22 May 2019- breaking
Add SKU token to Mapbox API requests #8276
Breaking changes
This release replaces the existing “map views” pricing model in favor of a “map load” model. Learn more in a recent blog post about these changes.
By upgrading to this release, you are opting in to the new map loads pricing.
Why is this change being made?
This change allows us to implement a more standardized and predictable method of billing GL JS map usage. You’ll be charged whenever your website or web application loads, not by when users pan and zoom around the map, incentivizing developers to create highly interactive map experiences. The new pricing structure also creates a significantly larger free tier to help developers get started building their applications with Mapbox tools while pay-as-you-go pricing and automatic volume discounts help your application scale with Mapbox. Session billing also aligns invoices with metrics web developers already track and makes it easier to compare usage with other mapping providers.
What is changing?
- breaking
Add SKU token to Mapbox API requests #8276
When (and only when) loading tiles from a Mapbox API with a Mapbox access token set (
mapboxgl.accessToken), a query parameter namedskuwill be added to all requests for vector, raster and raster-dem tiles. Every map instance uses a uniqueskuvalue, which is refreshed every 12 hours. The token itself is comprised of a token version (always “1”), a sku ID (always “01”) and a random 10-digit base-62 number. The purpose of the token is to allow for metering of map sessions on the server-side. A session lasts from a new map instantiation until the map is destroyed or 12 hours passes, whichever comes first.For further information on the pricing changes, you can read our blog post and check out our new pricing page, which has a price calculator. As always, you can also contact our team at support.mapbox.com.
- 0.54.x
0.54.1
19 Jul 2019Fix unbounded memory growth caused by failure to cancel requests in IE
0.54.0
25 Apr 2019- breaking
Turned
localIdeographFontFamilymap option on by default. This may change how CJK labels are rendered, but dramatically improves performance of CJK maps (because the browser no longer needs to download heavy amounts of font data from the server). AddlocalIdeographFontFamily: falseto turn this off. #8008 - breaking
Added
PopupmaxWidthoption, set to"240px"by default. #7906 Added support for updating and animating style images. #7999
Breaking changes
- breaking
Turned
localIdeographFontFamilymap option on by default. This may change how CJK labels are rendered, but dramatically improves performance of CJK maps (because the browser no longer needs to download heavy amounts of font data from the server). AddlocalIdeographFontFamily: falseto turn this off. #8008 - breaking
Added
PopupmaxWidthoption, set to"240px"by default. #7906
Major features
Added support for updating and animating style images. #7999
Added support for generating style images dynamically (e.g. for drawing icons based on feature properties). #7987
Added antialiasing support for custom layers. #7821
Added a new
mapbox-gl-csp.jsbundle for strict CSP environments whereworker-src: blobis disallowed. #8044
Minor features and improvements
Improved performance of fill extrusions. #7821
Improved performance of symbol layers. #7967
Slightly improved rendering performance in general. #7969
Slightly improved performance of HTML markers. #8018
Improved diffing of styles with
"visibility": "visible". #8005Improved behavior of
canvasSource.pauseto be more reliable and able to render a single frame. #8130Improved zoom buttons to grey out when reaching min/max zoom. #8023
Added a title to fullscreen control button. #8012
Added
rel="noopener"attributes to links that lead to external websites (such as Mapbox logo and OpenStreetMap edit link) for improved security. #7914Added tile size info when
map.showTileBoundariesis turned on. #7963Significantly improved load times of the benchmark suite. #8066
Bug fixes
Fixed a bug in Mac Safari 12+ where controls would disappear until you interact with the map. #8193
Fixed a bug where rapid zooming could produce an
Uncaught TypeError: e is not a functionerror in the console. #7988Fixed a bug where
removeFeatureStatedidn't remove the state for tiles on other zoom levels. #8087Fixed a bug where
removeFeatureStatedidn't work on features withidequal to0. #8150Fixed a memory leak when calling
source.setData(url)many times. #8035Fixed a bug where marker lost focus when dragging. #7799
Fixed a bug where
map.getCenter()returned a reference to an internalLngLatobject instead of cloning it, leading to potential mutability bugs. #7922Fixed a bug where default HTML marker positioning was slightly off. #8074
Fixed a bug where adding a fill extrusion layer for non-polygon layers would lead to visual artifacts. #7685
Fixed intermittent Flow failures on CI. #8061
- 0.53.x
0.53.0
7 Feb 2019Enable
fill-extrusionquerying with ray picking
Features and improvements
Enable
fill-extrusionquerying with ray pickingAdd
clusterPropertiesoption for aggregated cluster properties (#2412, fixed by #7584)Allow initial map bounds to be adjusted with
fitBoundsoptions. (#7681) (h/t elyobo)Remove popups on
Map#remove(#7749) (h/t andycalder)Add
Map#removeFeatureStateAdd
number-formatexpressionAdd
symbol-sort-keystyle property
Bug fixes
Upgrades Earcut to fix a rare bug in rendering polygons that contain a coincident chain of holes (#7806, fixed by #7878)
Allow
file://protocol in XHR requests for Cordova/Ionic/etcCorrectly handle WebP images in Edge 18
Fix bug which mistakenly requested WebP images in browsers that do not support WebP
Fix images not being aborted when dequeued
Set correct color state before rendering custom layer
Set
LngLat.toBounds()default radius to 0 (#7722, fixed by #7723) (h/t cherniavskii)Fix race condition in
feature-statedependent layers (#7523, fixed by #7790)Prevent
map.repaintfrom mistakenly enabling continuous repaintsPrevent map shaking while zooming in on raster tiles
Fix query point translation for multi-point geometry (#6833, fixed by #7581)
- 0.52.x
0.52.0
19 Dec 2018- breaking
Canonicalize tile urls to
mapbox://urls so they can be transformed withconfig.API_URL Add getter and setter for
config.API_URLAllow user to define element other than map container for full screen control
Breaking changes
- breaking
Canonicalize tile urls to
mapbox://urls so they can be transformed withconfig.API_URL
Features and improvements
Add getter and setter for
config.API_URLAllow user to define element other than map container for full screen control
Add validation option to style setters
Add 'idle' event: fires when no further rendering is expected without further interaction.
Bug fixes
Fire error when map.getLayoutProperty references missing layer (#7537, fixed by #7539)
Fix shaky sprites when zooming with scrolling
Fix layout problems in attribution control (#7608) (h/t lucaswoj)
Fixes resetting map's pitch to 0 if initial bounds is set (#7617) (h/t stepankuzmin)
Fix occasional failure to load images after multiple image request abortions #7641
Update repo url to correct one (#7486) (h/t nicholas-l)
Fix bug where symbols were sometimes not rendered immediately
Fix bug where cameraForBounds returns incorrect CameraOptions with asymmetrical padding/offset (#7517, fixed by #7518) (h/t mike-marcacci)
Use diff+patch approach to map.setStyle when the parameter is a URL (#4025, fixed by #7562)
Begin touch zoom immediately when rotation disabled (#7582) (h/t msbarry)
Fix symbol rendering under opaque fill layers
Fix shaking by aligning raster sources to pixel grid only when map is idle (7426)
Fix raster layers in Edge 18 by disabling it's incomplete WebP support (7687)
Fix memory leak in hillshade layer (7691)
Fix disappearing custom layers (7711)
- 0.51.x
0.51.0
7 Nov 2018Add initial bounds as map constructor option (#5518) (h/t stepankuzmin)
Add
MercatorCoordinatetype
Features and improvements
Add initial bounds as map constructor option (#5518) (h/t stepankuzmin)
Improve performance on machines with > 8 cores (#7407, fixed by #7430)
Add
MercatorCoordinatetypeAllow browser-native
contextmenuto be enabled (#2301, fixed by #7369)Add an unminified production build to the NPM package
Add support for
LngLatconversion from{lat, lon}(#7507) (h/t bfrengley)Add tooltips for navigation controls
Show attribution only for used sources
Add telemetry event to log map loads
Tighten style validation
Disallow expressions as stop values
Disallow
feature-stateexpressions in filters
Bug fixes
Fix for GeoJSON geometries not working when coincident with tile boundaries(#7436, fixed by #7448)
Fix depth buffer-related rendering issues on some Android devices.
Fix positioning of compact attribution strings (#7444, #7445, and #7391)
Fix an issue with removing markers in mouse event callbacks (#7442) (h/t vbud)
Remove controls before destroying a map
Fix display of Scale control values < 1 (#7469) (h/t MichaelHedman)
Fix an error when using location
hashwithin iframes in IE11Fix depth mode usage in custom layers (#7432) (h/t markusjohnsson)
Fix an issue with shaky sprite images during scroll zooms
- 0.50.x
0.50.0
12 Oct 2018🎉 Add Custom Layers that can be rendered into with user-provided WebGL code
Add WebGL face culling for increased performance
Improve speed of expression evaluation
Features and improvements
🎉 Add Custom Layers that can be rendered into with user-provided WebGL code
Add WebGL face culling for increased performance
Improve speed of expression evaluation
Automatically coerce to string for
concatexpression andtext-fieldproperty (#6190, fixed by #7280)Add
fill-extrusion-vertical-gradientproperty for controlling shading of fill extrusions (#5768, fixed by #6841)Add update functionality for images provided via
ImageSource(#4050, fixed by #7342) (h/t dcervelli)
Bug fixes
Expressions
Fix expressions that use
log2andlog10in IE11 (#7318, fixed by #7320)Fix
letexpression stripping expected type during parsing (#7300, fixed by #7301)Fix superfluous wrapping of literals in
literalexpression (#7336, fixed by #7337)Allow calling
to-coloron values that are already of typeColorFix
to-arrayfor empty arrays ((#7261))Fix identity functions for
text-fieldwhen using formatted textFix coercion of
nullto0into-numberexpression (#7083, fixed by #7274)
Canvas source
Rendering
Fix rendering of fill extrusions with really high heights
Fix an error where the map state wouldn't return to
loadedafter certain runtime styling changes when there were errored tiles in the viewportFix errors when rendering symbol layers without symbols (#7241, fixed by #7253)
Don't fade in symbols with
*-allow-overlap: truewhen panning into the viewport (#7172, fixed by#7244)
Library
Fix disambiguation for
mouseoverevent (#7295, fixed by #7299)Fix silent failure of
getImageif an SVG is requested (#7312, fixed by #7313)Fix empty control group box shadow (#7303, fixed by #7304) (h/t Duder-onomy)
Fixed an issue where a wrong timestamp was sent for Mapbox turnstile events
Fixed a bug that lead to attribution not showing up correctly in Internet Explorer (#3945, fixed by #7391)
- 0.49.x
0.49.0
12 Sep 2018Fix Top Issues list for mapbox-gl-js (#7108, fixed by #7112)
Fix bug in which symbols with
icon-allow-overlap: true, text-allow-overlap: true, text-optional: falsewould show icons when they shouldn't
September 6, 2018
Breaking changes
- breaking
Use
client{Height/Width}instead ofoffset{Height/Width}for map canvas sizing (#6848, fixed by #7128)
Bug fixes
Fix Top Issues list for mapbox-gl-js (#7108, fixed by #7112)
Fix bug in which symbols with
icon-allow-overlap: true, text-allow-overlap: true, text-optional: falsewould show icons when they shouldn'tFix bug where the map would not stop at the exact zoom level requested by Map#FlyTo (#7222) (#7223) (h/t benoitbzl)
Keep map centered on the center point of a multi-touch gesture when zooming (#6722) (#7191) (h/t pakastin)
Update the style-spec's old
gl-style-migratescript to include conversion of legacy functions and filters to their expression equivalents (#6927, fixed by #7095)Fix
icon-sizefor small data-driven valuesFix bug in the way AJAX requests load local files on iOS web view (#6610) (h/t oscarfonts)
Fix bug in which canvas sources would not render in world wrapped tiles at the edge of the viewport ([#7271]#7271), fixed by #7273)
Features and improvements
Performance updates:
Improve time to first render by updating how feature ID maps are transferred to the main thread (#7110, fixed by #7132)
Reduce size of JSON transmitted from worker thread to main thread
Improve image/glyph atlas packing algorithm
Use murmur hash on symbol instance keys to reduce worker transfer costs
Add GL state management for uniforms
Add
symbol-z-ordersymbol layout property to style specImplement data-driven styling support for
*-pattern propertiesAdd
Map#fitScreenCoordinateswhich fits viewport to two points, similar toMap#fitBoundsbut uses screen coordinates and supports non-zero map bearingsRe-implement LAB/HSL color space interpolation for expressions (#5326, fixed by #7123)
Enable benchmark testing for Mapbox styles
Allow
Map#setFeatureStateandMap#getFeatureStateto accept numeric IDs (#7106) (h/t bfrengley)
- 0.48.x
0.48.0
17 Aug 2018- breaking
Treat tiles that error with status 404 as empty renderable tiles to prevent rendering duplicate features in some sparse tilesets
Fix issue where
text-max-angleproperty was being calculated incorectly internally, causing potential rendering errors when"text-placement": lineRequire
feature.idwhen usingMap#setFeatureState
Breaking changes
- breaking
Treat tiles that error with status 404 as empty renderable tiles to prevent rendering duplicate features in some sparse tilesets
Bug fixes
Fix issue where
text-max-angleproperty was being calculated incorectly internally, causing potential rendering errors when"text-placement": lineRequire
feature.idwhen usingMap#setFeatureStateFix issue with removing the
GeolocateControlwhen user location is being used (#6977) (h/t sergei-zelinsky)Fix memory leak caused by a failure to remove all controls added to the map
Fix bug where the build would fail when using mapbox-gl webpack 2 and UglifyJSPlugin (#4359, fixed by #6956)
Fix bug where fitBounds called with coordinates outside the bounds of Web Mercator resulted in uncaught error (#6906, fixed by #6918)
Fix bug wherein
Map#querySourceFeatureswas returning bad results on zooms > maxZoomRelax typing for equality and order expressions (#6459, fixed by #6961)
Fix bug where
queryPaddingfor all layers in a source was set by the first layer, causing incorrect querying on other layers and, in some cases, incorrect firing of events associated with individual layers
Features and improvements
Performance Improvements:
Stop unnecessary serialization of symbol source features.
Optimize calculation for getting visible tile coordinates
Improve performance of creating
{Glyph/Image}AtlasesOptimize and simplify tile retention logic
Add a user turnstile event for users accessing Mapbox APIs
Add support for autogenerating feature ids for GeoJSON sources so they can be used more easily with the
Map#setFeatureStateAPI (#7043))Add ability to style a symbol layer labels with multple fonts and text sizes via
"format"expressionAdd customAttribution option to AttributionControl (#7033) (h/t mklopets)
Publish Flow type definitions alongside compiled bundle
Introduce symbol cross fading when crossing integer zoom levels to prevent labels from disappearing before newly loaded tiles' labels can be rendered
Improvements in label collision detection (#6925))
- 0.47.x
0.47.0
18 Jul 2018Add
raster-resamplingraster paint property (#6411) (h/t andrewharvey)Add
symbol-placement: line-center
Features and improvements
Add
raster-resamplingraster paint property (#6411) (h/t andrewharvey)Add
symbol-placement: line-centerAdd methods for inspecting GeoJSON clusters (#3318, fixed by #6829)
Add warning to geolocate control when unsupported (#6923) (h/t aendrew)
Include link to license in compiled bundle
Bug fixes
Use updateData instead of re-creating buffers for repopulated paint arrays
Fix ScrollZoom handler setting tr.zoom = NaN
Fix heatmap tile clipping when layers are ordered above it (#6806, fixed by #6807)
Fix video source in safari (macOS and iOS) (#6443, fixed by #6811)
Do not reload errored tiles
Fix send / remove timing bug in Dispatcher (#6756, fixed by #6826)
Fix flyTo not zooming to exact given zoom
Don't stop animation on map resize
Fix map.getBounds() with rotated map (#6875) (h/t zoltan-mihalyi)
Support collators in feature filter expressions.
Fix Webpack production mode compatibility
- 0.46.x
0.46.0
20 Jun 2018- breaking
Align implicit type casting behavior of
matchexpressions with withcase/== :tada: Add
Map#setFeatureStateandfeature-stateexpression to support interactive stylingCreate draggable
MarkerwithsetDraggable
Breaking changes
- breaking
Align implicit type casting behavior of
matchexpressions with withcase/==
Features and improvements
:tada: Add
Map#setFeatureStateandfeature-stateexpression to support interactive stylingCreate draggable
MarkerwithsetDraggableAdd
Map#listImagesfor listing all currently active sprites/imagesAdd "crossSourceCollisions" option to disable cross-source collision detection
Handle
text/icon-rotatefor symbols withsymbol-placement: pointAutomatically compact Mapbox wordmark on narrow maps. (#4282) (h/t andrewharvey)
Only show compacted AttributionControl on interactive displays (#6506) (h/t andrewharvey)
Use postcss to inline svg files into css, reduce size of mapbox-gl.css (#6513) (h/t andrewharvey)
Add support for GeoJSON attribution (#6364) (h/t andrewharvey)
Add instructions for running individual unit and render tests
Make Map constructor fail if WebGL init fails. (#6744) (h/t uforic)
Add browser fallback code for
collectResourceTiming: truein web workersRemove ignored usage of gl.lineWidth
Split new bounds calculation out of fitBounds into new method
Make "Missing Mapbox GL JS CSS" a console warning
Add rel="noopener" to Mapbox attribution link. (#6729) (h/t gorbypark)
Update to deep equality check in example code (#6599) (h/t jonsadka)
Upgrades!
Upgrade ESM dependency to ^3.0.39
Ditch gl-matrix fork in favor of the original package
Update to latest sinon
Upgrade to Flow 0.69
Update to mapbox-gl-supported 1.4.0
Bug fixes
collectResourceTiming: truegenerates error on iOS9 Safari, IE 11Fix PopupOptions flow type declarations (#6670) (h/t TimPetricola)
Add className option to Popup constructor (#6502) (h/t Ashot-KR)
GeoJSON MultiLineStrings with
lineMetrics=trueonly rendered first lineProvide target property for mouseenter/over/leave/out events
Don't break on sources whose name contains "."
Rotate and pitch with navigationControl broke in v0.45
Zero-width lines remained visible
Heatmaps inappropriately clipped at tile boundaries
Use named exports for style-spec entrypoint module (#6601
Don't fire click event if default is prevented on mousedown for a drag event (#6697, fixes #6642)
Double clicking to zoom in breaks map dragging/panning in Edge (#6740) (h/t GUI)
*-transition properties cannot be set with setPaintProperty()
Marker with
aelement does not open the url when clickedsetRTLTextPluginfails with relative URLsCollision detection incorrect for symbol layers that share the same layout properties
Fix a possible crash when calling queryRenderedFeatures after querySourceFeatures
Fix a collision detection issue that could cause labels to temporarily be placed too densely during rapid panning
- 0.45.x
0.45.0
7 May 2018- 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 :rainbow: Add
line-gradientproperty #6303
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
- 0.44.x
0.44.2
3 Apr 2018- breaking
Workaround a breaking change in Safari causing page to scroll/zoom in response to user actions intended to pan/zoom the map #6095. (N.B., not to be confused with the workaround from April 2017 dealing with the same breaking change in Chrome #4259. See also #18, bugs.webkit.org/show_bug.cgi, bugs.chromium.org/p/chromium/issues/detail .)
0.44.0
25 Jan 2018The CSP policy of a page using mapbox-gl-js no longer needs to include
script-src 'unsafe-eval'#559Add
LngLatBounds#isEmpty()method #5917
Breaking changes
- breaking
Due to bug fixes #6005 and #6029,
DragPanHandler,DragRotateHandler, andScrollZoomHandlernow fire map movement events (move,rotate,zoom,pitch) only once per render frame, rather than once per mouse/touch event. (See also issue #6047.)
Features and improvements
The CSP policy of a page using mapbox-gl-js no longer needs to include
script-src 'unsafe-eval'#559Add
LngLatBounds#isEmpty()method #5917Coalesce GeoJSON "loadData" requests. This prevents high-frequency calls to setData from building up a backlog. #5902
Updated to flow 0.62.0 #5923
Make compass and zoom controls optional (#5348) (h/t @matijs)
Add
collectResourceTimingoption to the enable collection of Resource Timing data for requests that are made from Web Workers.Improve user location dot appearance across browsers (#5498) (h/t @jasonbarry)
Bug fixes
Fix error triggered by
==and!=expressions #5947Image sources honor
renderWorldCopies#5932Fix transitions to default fill-outline-color #5953
Fix transitions for light properties #5982
Fix minor symbol collisions on pitched maps #5913
Fix bug wherein
GeoJSONSource#setData()caused labels to fade out and back inFix bug that could cause incorrect collisions for labels placed very near to each other at low zoom levels
Fix bug causing
moveevents to be fired out of sync with actual map movementsFix bug wherein
Mapdid not firemouseoverevents (#6000] (h/t @jay-manday)Fix bug causing blurry rendering of raster tiles
Fix potential memory leak caused by removing layers
Fix bug causing attribution icon to appear incorrectly in compact maps not using Mapbox data
Fix positioning of default marker element (#6012) (h/t @andrewharvey)
- 0.43.x
0.43.0
21 Dec 2017- breaking
It is now an error to attempt to remove a source that is in use #5562
- breaking
It is now an error if the layer specified by the
beforeparameter tomoveLayerdoes not exist #5679 - breaking
"colorSpace": "hcl"now uses shortest-path interpolation for hue #5811
Breaking changes
- breaking
It is now an error to attempt to remove a source that is in use #5562
- breaking
It is now an error if the layer specified by the
beforeparameter tomoveLayerdoes not exist #5679 - breaking
"colorSpace": "hcl"now uses shortest-path interpolation for hue #5811
Features and improvements
Introduce client-side hillshading with
raster-demsource type andhillshadelayer type #5286GeoJSON sources take 2x less memory and generate tiles 20%–100% faster #5799
Enable data-driven values for text-font #5698
Enable data-driven values for heatmap-radius #5898
Add getter and setter for offset on marker #5759
Add
Map#hasImage#5775Improve typing for
==and!=expressions #5840Made
coalesceexpressions more useful #5755Enable implicit type assertions for array types #5738
Improve hash control precision #5767
supported()now returns false on old IE 11 versions that don't support Web Worker blob URLs #5801Remove flow globals TileJSON and Transferable #5668
Improve performance of image, video, and canvas sources #5845
Bug fixes
Fix popups and markers lag during pan animation #4670
Fix fading of symbol layers caused by setData #5716
Fix cross-fading of
*-patternandline-dasharray#5791Fix
colorSpacefunction property #5843Fix style diffing when changing GeoJSON source properties #5731
Fix missing labels when zooming out from overzoomed tile #5827
Fix missing labels when zooming out and quickly using setData #5837
Handle NaN as input to step and interpolate expressions #5757
Clone property values on input and output #5806
Bump geojson-rewind dependency #5769
Allow setting Marker's popup before LngLat #5893
- 0.42.x
0.42.2
21 Nov 2017Fix an issue with the scale control being too wide #5715
Fix rendering in Safari #5712
Fix "Cannot read property 'hasTransition' of undefined" error #5714
Bug fixes
Fix an issue with the scale control being too wide #5715
Fix rendering in Safari #5712
Fix "Cannot read property 'hasTransition' of undefined" error #5714
Fix misplaced raster tiles #5713
Fix raster tile fading #5722
Ensure that an unset filter is undefined rather than null #5727
Restore pitch-with-rotate to nav control #5725
Validate container option in map constructor #5695
Fix queryRenderedFeatures behavior for features displayed in multiple layers #5172
0.42.1
18 Nov 2017Workaround for map flashing bug on Chrome 62+ with Intel Iris Graphics 6100 cards #5704
Rerender map when
map.showCollisionBoxesis set tofalse#5673Fix transitions from property default values #5682
Bug fixes
Workaround for map flashing bug on Chrome 62+ with Intel Iris Graphics 6100 cards #5704
Rerender map when
map.showCollisionBoxesis set tofalse#5673Fix transitions from property default values #5682
Fix runtime updating of
heatmap-color#5682Fix mobile Safari
history.replaceStateerror #5613
Features and improvements
Provide default element for Marker class #5661
0.42.0
13 Nov 2017- breaking
Require that
heatmap-coloruse expressions instead of stop functions #5624 - breaking
Remove support for validating and migrating v6 styles
- breaking
Remove support for validating v7 styles #5604
Breaking changes
- breaking
Require that
heatmap-coloruse expressions instead of stop functions #5624 - breaking
Remove support for validating and migrating v6 styles
- breaking
Remove support for validating v7 styles #5604
- breaking
Remove support for including
{tokens}in expressions fortext-fieldandicon-image#5599 - breaking
Split
curveexpression intostepandinterpolateexpressions #5542 - breaking
Disallow interpolation in expressions for
line-dasharray#5519 - breaking
Map#getLightno longer returns default values; it only returns values explicitly set in the style or at runtime #5682
Features and improvements
Improve label collision detection #5150
Labels from different sources will now collide with each other
Collisions caused by rotation and pitch are now smoothly transitioned with a fade
Improved algorithm for fewer erroneous collisions, denser label placement, and greater label stability during rotation
Add
sqrtexpression #5493
Bug fixes and error reporting improvements
Fix viewport calculations for
fitBoundswhen both zooming and padding change #4846Fix WebGL "range out of bounds for buffer" error caused by sorted symbol layers #5620
Fix symbol fading across tile reloads #5491
Change tile rendering order to better match GL Native #5601
Ensure no errors are triggered when calling
queryRenderedFeatureson a heatmap layer #5594Fix bug causing
queryRenderedSymbolsto return results from different sources #5554Account for
circle-stroke-widthinqueryRenderedFeatures#5514Fix rendering of fill layers atop raster layers #5513
Fix rendering of circle layers with a
circle-stroke-opacityof 0 #5496Fix memory leak caused by actor callbacks #5443
Fix source cache size for raster sources with tile sizes other than 512px #4313
Validate that zoom expressions only appear at the top level of an expression #5609
Validate that step and interpolate expressions don't have any duplicate stops #5605
Fix rendering for
icon-text-fitwith a data-driventext-size#5632Improve validation to catch uses of deprecated function syntax #5667
Permit altitude coordinates in
positionfield in GeoJSON #5608
- 0.41.x
0.41.0
11 Oct 2017- breaking
Removed support for paint classes #3643. Instead, use runtime styling APIs or
Map#setStyle. - breaking
Reverted the
canvassourcecontextTypeoption added in 0.40.0 #5449 Clip raster tiles to avoid tile overlap #5105
:warning: Breaking changes
- breaking
Removed support for paint classes #3643. Instead, use runtime styling APIs or
Map#setStyle. - breaking
Reverted the
canvassourcecontextTypeoption added in 0.40.0 #5449
:bug: Bug fixes
Clip raster tiles to avoid tile overlap #5105
Guard for offset edgecase in flyTo #5331
Ensure the map is updated after the sprite loads #5367
Limit animation duration on flyTo with maxDuration option #5349
Make double-tapping on make zoom in by a factor of 2 on iOS #5274
Fix rendering error with translucent raster tiles #5380
Error if invalid 'before' argument is passed to Map#addLayer #5401
Revert CanvasSource intermediary image buffer fix #5449
:sparkles: Features and improvements
Use setData operation when diffing geojson sources #5332
Return early from draw calls on layers where opacity=0 #5429
A heatmap layer type is now available. This layer type allows you to visualize and explore massive datasets of points, reflecting the shape and density of data well while also looking beautiful. See the blog post for further details.
!(cdn-images-1.medium.com/max/1600/1*Dme5MAgdA3pY…)The value of a style property or filter can now be an expression. Expressions are a way of doing data-driven and zoom-driven styling that provides more flexibility and control, and unifies property and filter syntax.
Previously, data-driven and zoom-driven styling relied on stop functions: you specify a feature property and a set of input-output pairs that essentially define a “scale” for how the style should be calculated based on the feature property. For example, the following would set circle colors on a green-to-red scale based on the value of
feature.properties.population:"circle-color": { "property": "population", "stops": [ [0, "green"], [1000000, "red"] ] }This approach is powerful, but we’ve seen a number of use cases that stop functions don't satisfy. Expressions provide the flexibility to address use cases like these:
Multiple feature properties
Using more than one feature property to calculate a given style property. E.g., styling land polygon colors based on bothfeature.properties.land_use_categoryandfeature.properties.elevation.Arithmetic
For some use cases it’s necessary to do some arithmetic on the input data. One example is sizing circles to represent quantitative data. Since a circle’s visual size on the screen is really its area (and A=πr^2), the right way to scalecircle-radiusissquare_root(feature.properties.input_data_value). Another example is unit conversions: feature data may include properties that are in some particular unit. Displaying such data in units appropriate to, say, a user’s preference or location, requires being able to do simple arithmetic (multiplication, division) on whatever value is in the data.Conditional logic
This is a big one: basic if-then logic, for example to decide exactly what text to display for a label based on which properties are available in the feature or even the length of the name. A key example of this is properly supporting bilingual labels, where we have to decide whether to show local + English, local-only, or English-only, based on the data that’s available for each feature.String manipulation
More dynamic control over label text with things like uppercase/lowercase/title case transforms, localized number formatting, etc. Without this functionality, crafting and iterating on label content entails a large data-prep burden.Filters
Style layer filters had similar limitations. Moreover, they use a different syntax, even though their job is very similar to that of data-driven styling functions: filters say, “here’s how to look at a feature and decide whether to draw it,” and data-driven style functions say, “here’s how to look at a feature and decide how to size/color/place it.” Expressions provide a unified syntax for defining parts of a style that need to be calculated dynamically from feature data.For information on the syntax and behavior of expressions, please see the documentation.
:wrench: Development workflow improvements
Made the performance benchmarking runner more informative and statistically robust
- 0.40.x
0.40.1
19 Sep 2017- removed
Remove upper limit on
fill-extrusion-heightproperty #5320 Fix bug causing flicker when zooming in on overzoomed tiles #5295
Remove erroneous call to Tile#redoPlacement for zoom-only or low pitch camera changes #5284
:bug: Bug fixes
Fix bug causing flicker when zooming in on overzoomed tiles #5295
Remove erroneous call to Tile#redoPlacement for zoom-only or low pitch camera changes #5284
Fix bug where
CanvasSourcecoordinates were flipped and improve performance for non-animatedCanvasSources #5303Fix bug causing map not to render on some cases on Internet Explorer 11 #5321
- removed
Remove upper limit on
fill-extrusion-heightproperty #5320
0.40.0
13 Sep 2017- breaking
Map#addImagenow requires the image as anHTMLImageElement,ImageData, or object withwidth,height, anddataproperties with the same format asImageData. It no longer accepts a rawArrayBufferViewin the second
argument andwidthandheightoptions in the third argument. - breaking
canvassources now require acontextTypeoption specifying the drawing context associated with the source canvas. #5155 Correct rendering for multiple
fill-extrusionlayers on the same map #5101
:warning: Breaking changes
- breaking
Map#addImagenow requires the image as anHTMLImageElement,ImageData, or object withwidth,height, anddataproperties with the same format asImageData. It no longer accepts a rawArrayBufferViewin the second
argument andwidthandheightoptions in the third argument. - breaking
canvassources now require acontextTypeoption specifying the drawing context associated with the source canvas. #5155
:sparkles: Features and improvements
Correct rendering for multiple
fill-extrusionlayers on the same map #5101Add an
icon-anchorproperty to symbol layers #5183Add a per-map
transformRequestoption, allowing users to provide a callback that transforms resource request URLs #5021Add data-driven styling support for
Add support for SDF icons in
Map#addImage()#5181Added nautical miles unit to ScaleControl #5238 (h/t @fmairesse)
Eliminate the map-wide limit on the number of glyphs and sprites that may be used in a style #141. (Fixed by #5190, see also mapbox-gl-native#9213
Numerous performance optimizations (including #5108 h/t @pirxpilot)
:bug: Bug fixes
Add missing documentation for mouseenter, mouseover, mouseleave events #4772
Add missing documentation for
Marker#getElement()method #5242Fix bug wherein removing canvas source with animate=true leaves map in render loop #5097
Fix fullscreen detection on Firefox #5272
Fix z-fighting on overlapping fills within the same layer #3320
Fix handling of fractional values for
layer.minzoom#2929Clarify coordinate ordering in documentation for
centeroption #5042 (h/t @karthikb351)Fix output of stop functions where two stops have the same input value #5020 (h/t @edpop )
Fix bug wherein using
Map#addLayer()with an inline source would mutate its input #4040Fix GPU-specific bug wherein canvas sources caused an error #4262
Fix a race condition in symbol layer handling that caused sporadic uncaught errors #5185
Fix bug causing line labels to render incorrectly on overzoomed tiles #5120
Fix bug wherein
NavigationControltriggered mouse events unexpectedly #5148Fix bug wherein clicking on the
NavigationControlcompass caused an error in IE 11 #4784Remove dependency on GPL-3-licensed
fast-stable-stringifymodule #5152Fix bug wherein layer-specific an event listener produced an error after its target layer was removed from the map #5145
Fix
Marker#togglePopup()failing to return the marker instance #5116Fix bug wherein a marker's position failed to adapt to the marker element's size changing #5133
Fix rendering bug affecting Broadcom GPUs #5073
- 0.39.x
0.39.0
21 Jul 2017- breaking
GeolocateControlbreaking changes #4479 - breaking
Anchor
Markers at their center by default #4751 @andrewharvey
Breaking changes
- breaking
GeolocateControlbreaking changes #4479The option
watchPositionhas been replaced withtrackUserLocationThe camera operation has changed from
jumpTo(not animated) tofitBounds(animated). An effect of this is the map pitch is no longer reset, although the bearing is still reset to 0.The accuracy of the geolocation provided by the device is used to set the view (previously it was fixed at zoom level 17). The
maxZoomcan be controlled via the newfitBoundsOptionsoption (defaults to 15).
- breaking
Anchor
Markers at their center by default #4751 @andrewharvey - breaking
Increase
significantRotateThresholdfor theTouchZoomRotateHandler#4971, @dagjomar
Features and improvements
Improve performance of updating GeoJSON sources #4069, @ezheidtmann
Improve rendering speed of extrusion layers #4818
Improve line label legibility in pitched views #4781
Improve line label legibility on curved lines #4853
Add user location tracking capability to
GeolocateControl#4479, @andrewharveyNew option
showUserLocationto draw a "dot" as aMarkeron the map at the user's locationAn active lock and background state are introduced with
trackUserLocation. When in active lock the camera will update to follow the user location, however if the camera is changed by the API or UI then the control will enter the background state where it won't update the camera to follow the user location.New option
fitBoundsOptionsto control the camera operationNew
trackuserlocationstartandtrackuserlocationendeventsNew
LngLat.toBoundsmethod to extend a point location by a given radius to aLngLatBoundsobject
Include main CSS file in
package.json#4809, @tomscholzAdd property function (data-driven styling) support for
line-width#4773Add property function (data-driven styling) support for
text-anchor#4997Add property function (data-driven styling) support for
text-justify#5000Add new
icon-pitch-alignmentandcircle-pitch-alignmentproperties #4869 #4871Add
Map#getMaxBoundsmethod #4890, @andrewharvey @lamuertepeludaAdd option (
localIdeographFontFamily) to use TinySDF to avoid loading expensive CJK glyphs #4895If
config.API_URLincludes a path prepend it to the request URL #4995Bump
superclusterversion to exposecluster_idproperty on clustered sources #5002
Bug fixes
Do not display
FullscreenControlon unsupported devices #4838, @stepankuzminFix yarn build on Windows machines #4887
Prevent potential memory leaks by dispatching
loadDatato the same worker every time #4877Fix bug preventing the rtlTextPlugin from loading before the initial style
load#4870Fix bug causing runtime-stying to not take effect in some situations #4893
Prevent requests of vertical glyphs for labels that can't be verticalized #4720
Fix character detection for Zanabazar Square #4940
Fix
LogoControllogic to update correctly, and hide the<div>instead of removing it from the DOM when it is not needed #4842Fix
GeoJSONSource#serializeto include all optionsFix error handling in
GlyphSource#getSimpleGlyphs#4992Fix bug causing
setStyleto reload raster tiles #4852Fix bug causing symbol layers not to render on devices with non-integer device pixel ratios #4989
Fix bug where
Map#queryRenderedFeatureswould error when returning no results #4993Fix bug where
Map#areTilesLoadedwould always be false onsourcedataevents for reloading tiles #4987Fix bug causing categorical property functions to error on non-ascending order stops #4996
Development workflow changes
Use flow to type much of the code base #4629 #4903 #4909 #4910 #4911 #4913 #4915 #4918 #4932 #4933 #4948 #4949 #4955 #4966 #4967 #4973 💪 @jfirebaugh @vicapow
Use style specification to generate flow type #4958
Explicitly list which files to publish in
package.json#4819 @tomscholzMove render test ignores to a separate file #4977
Add code of conduct #5015 💖
- 0.38.x
0.38.0
9 Jun 2017- breaking
Require node version >=6.4.0, enabling the use of more ES6 features #4752
Attenuate label size scaling with distance, improving readability of pitched maps #4547
Skip rendering for patterned layers when pattern is missing #4687
New features :sparkles
Attenuate label size scaling with distance, improving readability of pitched maps #4547
Bug fixes :beetle
Skip rendering for patterned layers when pattern is missing #4687
Fix bug with map failing to rerender after
webglcontextlostevent #4725Clamp zoom level in
flyToto within the map's specified min- and maxzoom to prevent undefined behavior #4726 @ IvanSanchezFix wordmark rendering in IE #4741
Fix slight pixelwise symbol rendering bugs caused by incorrect sprite calculations #4737
Prevent exceptions thrown by certain
flyTocalls #4761Fix "Improve this map" link #4685
Tweak
queryRenderedSymbolslogic to better account for pitch scaling #4792Fix for symbol layers sometimes failing to render, most frequently in Safari #4795
Apply
text-keep-uprightaftertext-offsetto keep labels upright when intended #4779 [Potentially breaking :warning: but considered a bugfix]Prevent exceptions thrown by empty GeoJSON tiles 4803
Accessibility improvements :sound
Add
aria-labelto popup close button #4799
Development workflow + testing improvements :wrench
- 0.37.x
0.37.0
2 May 2017- breaking
Removed
LngLat#wrapToBestWorld Improve popup/marker positioning #4577
Add
Map#isStyleLoadedandMap#areTilesLoadedevents #4321
0.37.0 (May 2nd, 2017)
:warning: Breaking changes
- breaking
Removed
LngLat#wrapToBestWorld
New features :rocket
Improve popup/marker positioning #4577
Add
Map#isStyleLoadedandMap#areTilesLoadedevents #4321Support offline sprites using
file:protocol #4649 @oscarfonts
Bug fixes :bug
Fix fullscreen control in Firefox #4666
Fix rendering artifacts that caused tile boundaries to be visible in some cases #4636
Fix default calculation for categorical zoom-and-property functions #4657
Fix scaling of images on retina screens #4645
Rendering error when a transparent image is added via
Map#addImage#4644Fix an issue with rendering lines with duplicate points #4634
Fix error when switching from data-driven styles to a constant paint value #4611
Add check to make sure invalid bounds on tilejson don't error out #4641
Development workflow improvements :computer
Add flowtype interfaces and definitions @vicapow
Add stylelinting to ensure
mapboxgl-prefix on all classes #4584 @asantos3026
- 0.36.x
0.36.0
19 Apr 2017Replace LogoControl logo with the new Mapbox logo #4598
Fix bug with the BoxZoomHandler that made it glitchy if it is enabled after the DragPanHandler #4528
Fix undefined behavior in
fill_outlineshaders #4600
New features :sparkles
Replace LogoControl logo with the new Mapbox logo #4598
Bug fixes :bug
Fix bug with the BoxZoomHandler that made it glitchy if it is enabled after the DragPanHandler #4528
Fix undefined behavior in
fill_outlineshaders #4600Fix
Camera#easeTointerpolation on pitched maps #4540Fix
easeToto cross anti-meridian if the path will be closer, likeflyTo#4602Fix
flyTo/easeTonot to cross anti-meridian ifmaxBoundsis set #4602Fix issues with categorical zoom-and-property functions #4614
Development workflow improvements :nerd_face
gl-style-compositeis now executable in line with the other tools @andrewharvey #4595gl-style-compositeutility now throws an error if a name conflict would occur between layers @andrewharvey #4595
- 0.35.x
0.35.1
12 Apr 2017Add
.jsonextension to style-specrequirestatements for webpack compatibility #4563 @orangemugFix documentation type for
Map#fitBounds#4569 @andrewharveyFix bug causing
{Image,Video,Canvas}Sourceto throw exception if latitude is outside of +/-85.05113 #4574
Bug fixes :bug
Add
.jsonextension to style-specrequirestatements for webpack compatibility #4563 @orangemugFix documentation type for
Map#fitBounds#4569 @andrewharveyFix bug causing
{Image,Video,Canvas}Sourceto throw exception if latitude is outside of +/-85.05113 #4574Fix bug causing overzoomed raster tiles to disappear from map #4567
Fix bug causing queryRenderedFeatures to crash on polygon features that have a non-integer
idfield. #4581
0.35.0
7 Apr 2017Use anisotropic filtering to improve rendering of raster tiles on pitched maps #1064
Add
pitchstartandpitchendevents #2449Add an optional
layersparameter toMap#on#1002
New features :rocket
Use anisotropic filtering to improve rendering of raster tiles on pitched maps #1064
Add
pitchstartandpitchendevents #2449Add an optional
layersparameter toMap#on#1002Add data-driven styling support for
text-offset#4495Add data-driven styling support for
text-rotate#3516Add data-driven styling support for
icon-image#4304Add data-driven styling support for
{text,icon}-size#4455
Bug fixes :bug
Suppress error messages in JS console due to missing tiles #1800
Fix bug wherein
GeoJSONSource#setData()could cause unnecessary DOM updates #4447Fix bug wherein
Map#flyTodid not respect therenderWorldCopiessetting #4449Fix regression in browserify support # 4453
Fix bug causing poor touch event behavior on mobile devices #4259
Fix bug wherein duplicate stops in property functions could cause an infinite loop #4498
Respect image height/width in
addImageapi #4531Fix bug preventing correct behavior of
shift+zoom#3334Fix bug preventing image source from rendering when coordinate area is too large #4550
Show image source on horizontally wrapped worlds #4555
Fix bug in the handling of
refreshedExpiredTilesoption #4549Support the TileJSON
boundsproperty #1775
- 0.34.x
0.34.0
17 Mar 2017Add
Map#addImageandMap#removeImageAPI to allow adding icon images at runtime #4404Simplify non-browserify bundler usage by making the distribution build the main entrypoint #4423
Fix issue where coincident start/end points of LineStrings were incorrectly rendered as joined #4413
New features :rocket
Add
Map#addImageandMap#removeImageAPI to allow adding icon images at runtime #4404Simplify non-browserify bundler usage by making the distribution build the main entrypoint #4423
Bug fixes :bug
Fix issue where coincident start/end points of LineStrings were incorrectly rendered as joined #4413
Fix bug causing
queryRenderedFeaturesto fail in cases where both multiple sources and data-driven paint properties were present #4417Fix bug where tile request errors caused
map.loaded()to incorrectly returnfalse#4425
Testing improvements :white_check_mark
- 0.33.x
0.33.1
11 Mar 2017- removed
Remove double
options.easingdescription from theMap#fitBoundsdocumentation #4402 Prevent Mapbox logo from being added to the map more than once #4386
Add
type='button'toFullscreenControlto prevent button from acting as a form submit #4397
Bug fixes
Prevent Mapbox logo from being added to the map more than once #4386
Add
type='button'toFullscreenControlto prevent button from acting as a form submit #4397Fix issue where map would continue to rotate if
Ctrlkey is released before the click during aDragRotateevent #4389- removed
Remove double
options.easingdescription from theMap#fitBoundsdocumentation #4402
0.33.0
8 Mar 2017- breaking
Automatically add Mapbox wordmark when required by Mapbox TOS #3933
- breaking
Increase default
maxZoomfrom 20 to 22 #4333 - deprecated
Deprecate
tiledataandtiledataloadingevents in favor ofsourcedataandsourcedataloading. #4347
Breaking changes
- breaking
Automatically add Mapbox wordmark when required by Mapbox TOS #3933
- breaking
Increase default
maxZoomfrom 20 to 22 #4333 - deprecated
Deprecate
tiledataandtiledataloadingevents in favor ofsourcedataandsourcedataloading. #4347 - breaking
mapboxgl.utilis no longer exported. #4241
New features
Add property functions support for most symbol paint properties #4074, #4186, #4226
Add ability to specify default property value for undefined or invalid property values used in property functions. #4175
Improve
Map#fitBoundsto accept different values for top, bottom, left, and rightpadding#3890Add a
FullscreenControlfor displaying a fullscreen map #3977
Bug fixes
Fix validation error on categorical zoom-and-property functions #4220
Fix bug causing expired resources to be re-requested causing an infinite loop #4255
Fix problem where
MapDataEvent#isSourceLoadedalways returned false #4254Fix an issue where tiles in the source cache were prematurely deleted, resulting in tiles flickering when zooming in and out #4311
Make sure
MapEventDatais passed through on callsMap#flyTo#4342Fix incorrect returned values for
Map#isMoving#4350Fix categorical functions not allowing boolean stop domain values #4195
Fix piecewise-constant functions to allow non-integer zoom levels. #4196
Fix a race condition with polygon centroid algorithm causing tiles not to load in some cases. #4273
Throw a meaningful error when giving non-array
layersparameter toqueryRenderedFeatures#4331Throw a meaningful error when supplying invalid
minZoomandmaxZoomvalues #4324Fix a memory leak when using the RTL Text plugin #4248
Dev workflow changes
Merged the Mapbox GL style specification repo to this one (now under
src/style-specandtest/unit/style-spec).
- 0.32.x
0.32.1
26 Jan 2017Fix bug causing
mapbox-gl-rtl-textplugin to not work #4055
0.32.0
26 Jan 2017- deprecated
Style classes are deprecated and will be removed in an upcoming release of Mapbox GL JS.
Add
Map#isSourceLoadedmethod #4033Automatically reload tiles based on their
ExpiresandCache-ControlHTTP headers #3944
Deprecation Notices
- deprecated
Style classes are deprecated and will be removed in an upcoming release of Mapbox GL JS.
New Features
Add
Map#isSourceLoadedmethod #4033Automatically reload tiles based on their
ExpiresandCache-ControlHTTP headers #3944Add
around=centeroption toscrollZoomandtouchZoomRotateinteraction handlers #3876Add support for
mapbox-gl-rtl-textplugin to support right-to-left scripts #3758Add
canvassource type #3765Add
Map#isMovingmethod #2792
Bug Fixes
Fix bug causing garbled text on zoom #3962
Fix bug causing crash in Firefox and Mobile Safari when rendering a large map #4037
Fix bug causing raster tiles to flicker during zoom #2467
Fix bug causing exception when unsetting and resetting fill-outline-color #3657
Fix memory leak when removing raster sources #3951
Fix bug causing exception when when zooming in / out on empty GeoJSON tile #3985
Fix line join artifacts at very sharp angles #4008
- 0.31.x
0.31.0
10 Jan 2017Add
renderWorldCopiesoption to theMapconstructor to give users control over whether multiple worlds are rendered in a map #3885Fix performance regression triggered when
Mappitch or bearing is changed #3938Fix null pointer exception caused by trying to clear an
undefinedsource #3903
New Features
Add
renderWorldCopiesoption to theMapconstructor to give users control over whether multiple worlds are rendered in a map #3885
Bug Fixes
- 0.30.x
0.30.0
5 Jan 2017Fire an error when map canvas is larger than allowed by
gl.MAX_RENDERBUFFER_SIZE#2893Improve error messages when referencing a nonexistent layer id #2597
Fire an error when layer uses a
geojsonsource and specifies asource-layer#3896
New Features
Fire an error when map canvas is larger than allowed by
gl.MAX_RENDERBUFFER_SIZE#2893Improve error messages when referencing a nonexistent layer id #2597
Fire an error when layer uses a
geojsonsource and specifies asource-layer#3896Add inline source declaration syntax #3857
Improve line breaking behavior #3887
Performance Improvements
Improve
Map#setStyleperformance in some cases #3853
Bug Fixes
Fix unexpected popup positioning when some offsets are unspecified #3367
Fix incorrect interpolation in functions #3838
Fix incorrect opacity when multiple backgrounds are rendered #3819
Fix exception thrown when instantiating geolocation control in Safari #3844
Fix exception thrown when setting
showTileBoundarieswith no sources #3849Fix incorrect rendering of transparent parts of raster layers in some cases #3723
Fix non-terminating render loop when zooming in in some cases #3399
- 0.29.x
0.29.0
20 Dec 2016Add support for property functions for many style properties on line layers #3033
Make
Map#setStylesmoothly transition to the new style #3621Add
styledata,sourcedata,styledataloading, andsourcedataloadingevents
New Features
Add support for property functions for many style properties on line layers #3033
Make
Map#setStylesmoothly transition to the new style #3621Add
styledata,sourcedata,styledataloading, andsourcedataloadingeventsAdd
isSourceLoadedandsourceproperties toMapDataEvent#3590Remove "max zoom" cap of 20 #3683
Add
circle-stroke-*style properties #3672Add a more helpful error message when the specified
containerelement doesn't exist #3719Add
watchPositionoption toGeolocateControl#3739Add
positionOptionsoption toGeolocateControl#3739Add
aria-labelto map canvas #3782Adjust multipoint symbol rendering behavior #3763
Add support for property functions for
icon-offset#3791Improved antialiasing on pitched lines #3790
Allow attribution control to collapse to an ⓘ button on smaller screens #3783
Improve line breaking algorithm #3743
Performance Improvements
Fix memory leak when calling
Map#removeSource#3602Reduce bundle size by adding custom build of
gl-matrix#3734Improve performance of projection code #3721
Improve performance of style function evaluation #3816
Bug fixes
Fix exception thrown when using
line-colorproperty functions #3639Fix exception thrown when removing a layer and then adding another layer with the same id but different type #3655
Fix exception thrown when passing a single point to
Map#fitBounds#3655Fix exception thrown occasionally during rapid map mutations #3681
Fix rendering defects on pitch=0 on some systems #3740
Fix unnecessary CPU usage when displaying a raster layer #3764
Fix bug causing sprite after
Map#setStyle#3829Fix bug preventing
Mapfrom emitting acontextmenuevent on Windows browsers #3822
- 0.28.x
0.28.0
17 Nov 2016Performance improvements for
Map#addLayerandMap#removeLayer#3584Add method for changing layer order at runtime -
Map#moveLayer#3584Update vertical punctuation logic to Unicode 9.0 standard #3608
New features and improvements
Performance improvements for
Map#addLayerandMap#removeLayer#3584Add method for changing layer order at runtime -
Map#moveLayer#3584Update vertical punctuation logic to Unicode 9.0 standard #3608
Bug fixes
Fix data-driven
fill-opacityrendering when using afill-pattern#3598Fix line rendering artifacts #3627
Fix incorrect rendering of opaque fills on top of transparent fills #2628
Prevent
AssertionErrorsfrom pitching raster layers by only callingWorker#redoPlacementon vector and GeoJSON sources #3624Restore IE11 compatability #3635
Fix symbol placement for cached tiles #3637
- 0.27.x
0.27.0
11 Nov 2016- breaking
Replace
fill-extrude-heightandfill-extrude-baseproperties offillrender type with a separatefill-extrusiontype (with correspondingfill-extrusion-heightandfill-extrusion-baseproperties), solving problems with render parity and runtime switching between flat and extruded fills. #554 - breaking
Change the units for extrusion height properties (
fill-extrusion-height,fill-extrusion-base) from "magic numbers" to meters. #3509 - breaking
Remove
mapboxgl.Controlclass and change the way custom controls should be implemented. #3497
Breaking changes
- breaking
Replace
fill-extrude-heightandfill-extrude-baseproperties offillrender type with a separatefill-extrusiontype (with correspondingfill-extrusion-heightandfill-extrusion-baseproperties), solving problems with render parity and runtime switching between flat and extruded fills. #554 - breaking
Change the units for extrusion height properties (
fill-extrusion-height,fill-extrusion-base) from "magic numbers" to meters. #3509 - breaking
Remove
mapboxgl.Controlclass and change the way custom controls should be implemented. #3497 - breaking
Remove
mapboxgl.utilfunctions:inherit,extendAll,debounce,coalesce,startsWith,supportsGeolocation. #3441 #3571 - breaking
mapboxgl.utilis deprecated and will be removed in the next release. #1408
New features and improvements
Tons of performance improvements that combined make rendering up to 3 times faster, especially for complex styles. #3485 #3489 #3490 #3491 #3498 #3499 #3501 #3510 #3514 #3515 #3486 #3527 #3574 ⚡️⚡️⚡️
🈯 Added vertical text writing mode for languages that support it. #3438
🈯 Improved line breaking of Chinese and Japanese text in point-placed labels. #3420
Reduce the default number of worker threads (
mapboxgl.workerCount) for better performance. #3565Automatically use
categoricalstyle function type when input values are strings. #3384Improve control buttons accessibility. #3492
Remove geolocation button if geolocation is disabled (e.g. the page is not served through
https). #3571Added
Map#getMaxZoomandMap#getMinZoommethods #3592
Bugfixes
Fix several line dash rendering bugs. #3451
Fix intermittent map flicker when using image sources. #3522
Fix incorrect rendering of semitransparent
backgroundlayers. #3521Fix broken
raster-fade-durationproperty. #3532Fix handling of extrusion heights with negative values (by clamping to
0). #3463Fix GeoJSON sources not placing labels/icons correctly after map rotation. #3366
Fix icon/label placement not respecting order for layers with numeric names. #3404
Fix
queryRenderedFeaturesworking incorrectly on colliding labels. #3459Fix a bug where changing extrusion properties at runtime sometimes threw an error. #3487 #3468
Fix a bug where
map.loaded()always returnedtruewhen using raster tile sources. #3302Fix a bug where moving the map out of bounds sometimes threw
failed to invert matrixerror. #3518Fixed
queryRenderedFeaturesthrowing an error if no parameters provided. #3542Fixed a bug where using multiple
\nin a text field resulted in an error. #3570
- 0.26.x
0.26.0
13 Oct 2016- breaking
Add
Controlsuffix to all controls :warning: warning - breaking
Calculate style layer
refs automatically and get rid of user-specifiedrefs :warning: warning Add
fill-extrude-heightandfill-extrude-basestyle properties (3d buildings) :cityscape
New Features & Improvements
Add
fill-extrude-heightandfill-extrude-basestyle properties (3d buildings) :cityscapeAdd customizable
colorSpaceinterpolation to functions #3245Add
identityfunction type #3274Add depth testing for symbols with
'pitch-alignment': 'map'#3243Add
dataloadingevents for styles and sources #3306- breaking
Add
Controlsuffix to all controls :warning: warning - breaking
Calculate style layer
refs automatically and get rid of user-specifiedrefs :warning: warning
Performance Improvements
Ensure removing style or source releases all tile resources #3359
Bugfixes
Fix bug causing an error when
Marker#setLngLatis called #3294Fix bug causing incorrect coordinates in
touchendon Android Chrome #3319Fix bug causing incorrect popup positioning at top of screen #3333
Restore
tileproperty todataevents fired when a tile is removed #3328Fix bug causing "Improve this map" link to not preload map location #3356