Packages

mapbox-gl

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

Your version

2.9.0

17 Jun 2022Where it was published

2.15.0 is the newest release of 2.x.

In short

6 new4 fixed

Release note

Features

  • 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.

  • Add an option for providing a geolocation adapter to GeolocateControl. (#10400) (h/t behnammodi)

  • Add Map.Title property to locale options to localise the map aria-label. (#11549) (h/t andrewharvey)

  • Allow duplicated coordinates in tile request URLs. (#11441) (h/t ozero)

Bug fixes

  • Fix an issue which causes line layers to occasionally flicker.

  • Fix markers in fog sometimes becoming more visible when behind terrain.

  • Fix an issue where setting terrain exageration to 0 could prevent the zoom to be resolved.

  • Copy stylesheet to allow toggling different styles using setStyle without overwriting some of the properties.