Packages

mapbox-gl

3.34.2 · 3 Nov 2026SEE LICENSE IN LICENSE.txt6M / weekRepositoryHomepagenpmAtom feed

Your version

197 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.

  1. 3.x · latest line
  2. 3.0.0

    29 Nov 2023
    • breaking

      Discontinue WebGL 1 support. WebGL 2 is now mandatory for GL JS v3 usage, aligned with universal browser support.

    • breaking

      Remove the optimizeForTerrain map option (layer rendering on globe and terrain is always optimized now).

    • Introduced a new 3D Lights API that supports directional and ambient light sources to give you control of lighting and shadows in your map when using 3D objects.

  3. 2.x
  4. 2.15.0

    25 May 2023
    • Improve performance of symbol layers with identical or no text. Eliminate stuttering when zooming on maps with many identical symbols.

    • Improve performance of clustered sources: 20% faster loading & 40–60% less memory overhead. Improve performance of symbol collisions.

    • Add respectPrefersReducedMotion map option

  5. 2.14.1

    14 Apr 2023
    • Fix a bug where certain bundling configurations involving Vite or ESBuild could produce a broken build. #12658

  6. 2.14.0

    12 Apr 2023
    • Support referrerPolicy option for the transformRequest function when using fetch (#12590) (h/t robertcepa)

    • Enable anisotropic filtering on tiles beyond 20 degrees pitch to prevent it from compromising image crispness on flat or low-tilted maps.

    • Fix LngLatBounds.extend() with literal LngLat object.

  7. 2.13.0

    21 Feb 2023
    • Support draping over terrain and globe in CustomLayer API

    • Improve the rendering performance of terrain slightly by reducing its GPU memory footprint.

    • Add methods for changing a raster tile source dynamically (e.g. setTiles, setUrl).

  8. 2.12.1

    6 Feb 2023
    • Fix a rare bug where certain diacritical characters could break the rendering of a symbol layer.

  9. 2.12.0

    4 Jan 2023
    • Improve performance of patterns and line dashes and improve their appearance when zooming.

    • Improve performance of text and icon placement.

    • Improve performance of loading terrain data

  10. 2.11.1

    6 Dec 2022
    • Fix support for line breaks in labels that follow line geometries

  11. 2.11.0

    14 Nov 2022
    • Add support for cameraForBounds with globe projection

    • Add support for fitBounds and fitScreenCoordinates with globe projection

    • Improve support for getBounds with globe projection.

  12. 2.10.0

    23 Aug 2022
    • Add new marker styling option rotationAlignment: 'horizon' allowing marker rotation to match the curvature of the horizon in globe view

    • Improve panning precision on Globe View and relax constraints on lower zoom levels

    • Add unit option to number-format expression (#11839) (h/t varna)

  13. 2.9.2

    14 Jul 2022
    • Add a workaround in ScaleControl to support localization in browsers without NumberFormat support.

    • Fix GeolocateControl not working in Safari.

  14. 2.9.1

    20 Jun 2022
    • Fix missing lines on some Windows devices.

  15. 2.9.0

    17 Jun 2022
    • Add globe projection. This new projection displays the map as a 3d globe and can be enabled by either passing projection: globe to the map constructor or by calling map.setProjection('globe'). All layers are supported by globe except for Custom Layers and Sky.

    • Extend atmospheric fog with three new style specification properties: high-color, space-color and star-intensity to allow the design of atmosphere around the globe and night skies.

    • Add a new line layer paint property in the style specification: line-trim-offset that can be used to create a custom fade out with improved update performance over line-gradient.

  16. 2.8.2

    22 Apr 2022
    • Fix an issue where the special bundle for CSP-restricted environments was not compatible with further minification in some bundling setups.

  17. 2.8.1

    13 Apr 2022
    • Fix the special bundle for CSP-restricted environments that broke in the 2.8.0 release.

  18. 2.8.0

    7 Apr 2022
    • Improve memory usage by freeing memory more eagerly after loading tiles.

    • Improve memory usage by reducing repeated line labels on overscaled tiles.

    • Improve performance when placing many symbols on terrain.

  19. 2.7.1

    18 Mar 2022
    • Work around a Safari rendering bug by disabling WebGL context antialiasing for Safari 15.4 and 15.5

    • Fix disabling cooperative gesture handling when map is fullscreen in Safari

  20. 2.7.0

    31 Jan 2022
    • Enable preloading tiles for camera animation.

    • Improve quality of transparent line layers by removing overlapping geometry artifacts. (#11082). Note: removing that feature can be done by using the line color alpha channel, e.g. line-color: "rgba(r, g, b, 0.5)" instead of line-opacity.

    • Add perspective correction for non-rectangular image, canvas and video sources.

  21. 2.6.1

    19 Nov 2021
    • Remove Object spread syntax to ensure older build systems continue to work as expected.

  22. 2.6.0

    8 Nov 2021
    • Add support for a variety of new map projections beyond the standard Web Mercator. Alternate projections can be used together with all existing styles and sources. The projections eliminate distortion as you zoom to make them useful at every scale. Supported projections include albers, equalEarth, equirectangular, lambertConformalConic, naturalEarth and winkelTripel. Change the projection by setting it in the map constructor: new Map({ projection: 'winkelTripel', ... }).

    • Add a new "cooperativeGestures": true map option that prevents the map from capturing page scrolling and panning. When enabled, scroll zooming requires ctrl or ⌘ to be pressed and touch panning requires two fingers (#11029, #11116)

    • Add support for dynamic filtering of symbols based on pitch and distance to map center. ["pitch"] and ["distance-from-camera"] expressions can now be used within the filter of a symbol layer.

  23. 2.5.1

    6 Oct 2021
    • Fix an iOS 15 issue where the iOS Safari tab bar interrupts touch interactions.

  24. 2.5.0

    29 Sep 2021
    • Added queryRenderedFeatures support to heatmap layers.

    • Added support for using line-gradient and line-dasharray paint properties together on line layers.

    • Added preclick event allowing popups to close and open in a new location on one click.

  25. 2.4.1

    16 Aug 2021
  26. 2.4.0

    30 Jul 2021
    • Add showUserHeading option to GeolocateControl that draws a triangle in front of the dot to denote both the user's location, and the direction they're facing.(#10817) (h/t to @tsuz)

    • Add support for text-writing-mode property when using symbol-placement: line text labels.

    • Improve character alignment in labels with mixed CJK and Latin characters by adding support for descender and ascender font metrics.

  27. 2.3.1

    21 Jun 2021
    • Fix fog flickering when the map option optimizeForTerrain is set to false

    • Fix collision boxes which were not correctly updated for symbols with text-variable-anchor

  28. 2.3.0

    27 May 2021
    • Add configurable fog as a root style specification

    • Add support for data-driven expressions in line-dasharray and line-cap properties.

    • Add support for data-driven text-line-height

  29. 2.2.0

    25 Mar 2021
    • Improve geojsonSource.setData(...) performance in Safari

    • Add map.getTerrain() method

    • Add showTerrainWireframe map debug option for displaying terrain wireframe

  30. 2.1.1

    8 Feb 2021
    • Fixed a font glyphs performance regression on Firefox. (10363)

  31. 2.1.0

    4 Feb 2021
    • Added localFontFamily map option that enables local generation of all font glyphs.

    • Introduced high resolution local glyph generation for improved rendering quality of glyphs generated using localIdeographFontFamily or localFontFamily options.

    • Added optimizeForTerrain map option allowing to use terrain in layer draw-order or performance priority mode. This fixes terrain not always preserving layer draw-order during animations by making the behavior explicit.

  32. 2.0.1

    23 Dec 2020
    • Added support for using third-party worker-loader plugins in build systems such as Webpack and Rollup (mapboxgl.workerClass). #10219

    • Added mapboxgl.setNow and mapboxgl.restoreNow methods which allow setting custom animation timing for 60 fps, jank-free video recording. #10172

    • Removed outdated CSS hacks that no longer apply. #10202

  33. 2.0.0

    8 Dec 2020
    • breaking

      mapbox-gl-js is no longer under the 3-Clause BSD license. By upgrading to this release, you are agreeing to Mapbox terms of service. Refer to LICENSE.txt for the new licensing terms and details. For questions, contact our team at support.mapbox.com.

    • breaking

      Beginning with v2.0.0, a billable map load occurs whenever a Map object is initialized. Before updating an existing implementation from v1.x.x to v2.x.x, please review the pricing documentation to estimate expected costs.

    • deprecated

      Deprecate Internet Explorer 11, no longer supported from this release. (#8283, #6391)

  34. 1.x
  35. 1.13.3

    19 Jan 2023
    • security

      Upgrade minimist to ^1.2.7 to avoid CVE-2021-44906 (#12442) (h/t @Spasfonx)

    • Fix incorrect billing when customAccessToken is provided along with non-Mapbox tiles

    • Prevent video sources from entering fullscreen on iOS Safari

  36. 1.13.2

    8 Oct 2021
    • Backport a fix for an iOS 15 issue where the iOS Safari tab bar interrupts touch interactions.

  37. 1.13.1

    18 Feb 2021
    • Fix ImageSource not working in some cases in Firefox & Safari. #10230

  38. 1.13.0

    19 Nov 2020
    • Improve accessibility by fixing issues reported by WCAG 2.1. #9991

    • Improve accessibility when opening a popup by immediately focusing on the content. #9774 (h/t @watofundefined)

    • Improve rendering performance of symbols with symbol-sort-key. #9751 (h/t @osvodef)

  39. 1.12.0

    12 Aug 2020
    • Add methods for changing a vector tile source dynamically (e.g. setTiles, setUrl). #8048 (h/t @stepankuzmin)

    • Add a filter option for GeoJSON sources to filter out features prior to processing (e.g. before clustering). #9864

    • Vastly increase precision of line-gradient for long lines. #9694

  40. 1.11.1

    7 Jul 2020
    • Fix a bug that caused map.loaded() to incorrectly return false after a click event.

  41. 1.11.0

    10 Jun 2020
    • Add an option to scale the default Marker icon.(#9414) (h/t adrianababakanian)

    • Improving the shader compilation speed by manually getting the run-time attributes and uniforms.

    • Added clusterMinPoints option for clustered GeoJSON sources that defines the minimum number of points to form a cluster.

  42. 1.10.2

    10 Jun 2020
    • Fix zooming with a double tap in iOS Safari 13

  43. 1.10.1

    15 May 2020
    • Fix markers interrupting touch gestures (#9675, fixed by #9683)

    • Fix bug where map.isMoving() returned true while map was not moving (#9647, fixed by #9679)

    • Fix regression that prevented touchmove events from firing during gestures (#9676, fixed by #9685)

  44. 1.10.0

    27 Apr 2020
    • security

      Upgrade minimist to ^1.2.5 to get fix for security issue CVE-2020-7598 upstream (#9425, fixed by #9425) (h/t watson)

    • Add mapboxgl.prewarm() and mapboxgl.clearPrewarmedResources() methods to allow developers to optimize load times for their maps

    • Add index-of and slice expressions to search arrays and strings for the first occurrence of a specified value and return a section of the original array or string (#9450) (h/t lbutler)

  45. 1.9.1

    3 Apr 2020
    • Fix a bug #9477 in Map#fitBounds(..) wherein the padding passed to options would get applied twice.

    • Fix rendering bug #9479 caused when data-driven *-pattern properties reference images added with Map#addImage(..).

    • Fix a bug #9468 in which an exception would get thrown when updating symbol layer paint property using setPaintProperty.

  46. 1.9.0

    23 Mar 2020
    • Add within expression for testing whether an evaluated feature lies within a given GeoJSON object (#9352).

    • Map API functions such as easeTo and flyTo now support padding: PaddingOptions which lets developers shift a map's center of perspective when building floating sidebars

    • Results from queryRenderedFeatures now have evaluated property values rather than raw expressions

  47. 1.8.1

    26 Feb 2020
    • Fixed a bug where all labels showed up on a diagonal line on Windows when using an integrated Intel GPU from the Haswell generation (#9327, fixed by reverting #9229)

  48. 1.8.0

    20 Feb 2020
    • Reduce size of line atlas by removing unused channels

    • Prevent empty buffers from being created for debug data when unused

    • Add space between distance and unit in scale control (#9276) (h/t gely) and (#9284) (h/t pakastin)

  49. 1.7.0

    27 Jan 2020
    • Add promoteId option to use a feature property as ID for feature state

    • Add a new constructor option to mapboxgl.Popup, closeOnMove, that closes the popup when the map's position changes

    • Allow creating a map without a style (an empty one will be created automatically) ( h/t @stepankuzmin )

  50. 1.6.1

    19 Dec 2019
    • Fix style validation error messages not being displayed

    • Fix deferred loading of rtl-text-plugin not working for labels created from GeoJSON sources

    • Fix RTL text not being rendered with the rtl-text-plugin on pages that don't allow script-src: blob: in their CSP.

  51. 1.6.0

    4 Dec 2019
    • Add ability to insert images into text labels using an image expression within a format expression: "text-field": ["format", "Some text", ["image", "my-image"], "some more text"]

    • Add support for stretchable images (aka nine-part or nine-patch images). Stretchable images can be used with icon-text-fit to draw resized images with unstretched corners and borders.

    • Add in expression. It can check if a value is in an array (["in", value, array]) or a substring is in a string (["in", substring, string])

  52. 1.5.1

    27 Nov 2019
    • Implement workaround for memory leak in Safari when using the CacheStorage API.

    • Implement workaround for memory leak in Safari when using Transferable objects to transfer ArrayBuffers to WebWorkers. If GL-JS detetcts that it is running in Safari, the use of Transferables to transfer data to WebWorkers is disabled.

    • Improve animation performance when using map.setData. (#8913) (h/t msbarry)

  53. 1.5.0

    25 Oct 2019
    • Add disabled icon to GeolocateControl if user denies geolocation permission. #8871)

    • Add outofmaxbounds event to GeolocateControl, which is emitted when the user is outside of map.maxBounds (#8756) (h/t MoradiDavijani)

    • Add mapboxgl.getRTLTextPluginStatus() to query the current status of the rtl-text-plugin to make it easier to allow clearing the plugin when necessary. (ref. #7869)