✨ 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,naturalEarthandwinkelTripel. 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": truemap option that prevents the map from capturing page scrolling and panning. When enabled, scroll zooming requiresctrlor⌘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 thefilterof a symbol layer. (#10795) - Improve user accessibility: conveying only
aria-labelin controls, replacearia-pressedwitharia-expandedin the attribution control, interactive markers with popups express anaria-expandedstate, 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. ()