Releases: mapbox/mapbox-gl-js
Releases · mapbox/mapbox-gl-js
v2.6.0
✨ Features and improvements
- 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
andwinkelTripel
. Change the projection by setting it in the map constructor:new Map({ projection: 'winkelTripel', ... })
. (#11124)- Limitations: Non-mercator projections do not yet support terrain, fog, free camera or CustomLayerInterface.
- Add a new
"cooperativeGestures": true
map option that prevents the map from capturing page scrolling and panning. When enabled, scroll zooming requiresctrl
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 thefilter
of a symbol layer. (#10795) - Improve user accessibility: conveying only
aria-label
in controls, replacearia-pressed
witharia-expanded
in the attribution control, interactive markers with popups express anaria-expanded
state, and interactive markers have the role "button". (#11064) - Add support for conditionally styling most paint properties according to the presence or absence of specific images. (#11049)
- Add support for attaching events to multiple layers with
map.on()
, allowing users to get retrieve features under the mouse or touch event based on the order in which they are rendered. (#11114)(h/t @omerbn)
🐞 Bug fixes
- Fix
map.setFeatureState(...)
not updating rendering when terrain is enabled. (#11209) - Fix marker positioning before initial map load (#11025)
- Fix slow tile loading performance on maps with CJK glyphs on certain Chrome/GPU combinations. (#11047)
- Update NavigationControl when
min
andmax
zoom are changed (#11018) - Prevent video sources from entering fullscreen on iOS Safari (#11067)
- Fix a rare triangulation issue that could cause an infinite loop (#11110)
- Fix
null
feature values returned as"null"
byqueryRenderedFeatures(...)
(#11110) - Fix rendering issue with power of two square images and
'raster-resampling': 'nearest'
(#11162)
v2.6.0-beta.2
update changelogs and versions for v2.6.0-beta.2 (#11231)
v2.6.0-beta.1
bump version and add changelog for v2.6.0 (#11154)
v1.13.2
v2.5.1
v2.5.0
Features ✨ and improvements 🏁
- Added
queryRenderedFeatures
support to heatmap layers. (#10996) - Added support for using
line-gradient
andline-dasharray
paint properties together on line layers. (#10894) - Added
preclick
event allowing popups to close and open in a new location on one click. (#10926) - Improved collision detection for labels along lines, slightly improving label density. (#10918)
- Improved Popup
addClassName
,removeClassName
andtoggleClassName
methods to work on popup instances that are not added to the map. (#10889)⚠️ Note: Direct modifications to the popup container CSS class no longer persist. These methods should be used instead.
🐞 Bug fixes
- Fixed
maxBounds
property not working across the 180th meridian. (#10903) - Fixed
map.getBounds()
returning too-large bounds under some conditions. (#10909) - Fixed markers not updating position when toggling terrain. (#10985)
- Fixed gap on edge of map on retina displays. (#10936)
- Fixed SDF images rendering inside text. (#10989)
- Fixed an issue with slow tile loading performance on maps with CJK glyphs on certain Chrome/GPU combinations. (#11047)
style-spec@13.22.0
✨ Features and improvements
- Added
protected
field to mapbox-api-supported validation. (#10968)
style-spec@13.22.0-beta.1
Run install-mbx-ci for all tags (#11023)
v2.4.0
2.4.0
✨ Features and improvements
- Add
showUserHeading
option toGeolocateControl
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 usingsymbol-placement: line
text labels. (#10647)- Note: This change will bring the following changes for CJK text blocks:
-
- For vertical CJK text, all the characters including Latin and Numbers will be vertically placed now. Previously, Latin and Numbers were horizontally placed.
-
- For horizontal CJK text, there may be a slight horizontal shift due to the anchor shift.
-
- Note: This change will bring the following changes for CJK text blocks:
- Improve character alignment in labels with mixed CJK and Latin characters by adding support for
descender
andascender
font metrics. (#8781) - Improve terrain performance by reducing number of framebuffer switches during draping. (#10701)
- Improve terrain performance by prioritizing allocation of large render cache batches. (#10701)
- Improve behavior of vertically aligned line labels with horizontal text by adding stickiness to their flip state, preventing them from flickering. (#10622)
🐞 Bug fixes
- Fix a potential rendering artifact when using custom
fill-extrusion
dataset with terrain. (#10812) - Fix anchor calculation for
line-center
line labels when the anchor is very near to line segment endpoints. (#10776) - Fix
ImageSource
breaking in Firefox/Safari if it's not immediately visible.(#10698) - Fix gradient skybox rendering issue on some ARM Mali GPU's.(#10703)
style-spec@13.21.0
13.21.0
✨ Features and improvements
- Add support for
text-writing-mode
property when usingsymbol-placement: line
text labels. (#10647)- Note: This change will bring following changes for CJK text block:
-
- For vertical CJK text, all the characters including Latin and Numbers will be vertically placed now. Previously, Latin and Numbers are horizontally placed.
-
- For horizontal CJK text, it may have a slight horizontal shift due to the anchor shift.
-
- Note: This change will bring following changes for CJK text block: