github mapbox/mapbox-gl-js v2.6.0

latest releases: v3.8.0, style-spec@14.8.0, v3.8.0-beta.1...
3 years ago

✨ 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 and winkelTripel. 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 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. (#10795)
  • Improve user accessibility: conveying only aria-label in controls, replace aria-pressedwith aria-expanded in the attribution control, interactive markers with popups express an aria-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 and max 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" by queryRenderedFeatures(...) (#11110)
  • Fix rendering issue with power of two square images and 'raster-resampling': 'nearest' (#11162)

Don't miss a new mapbox-gl-js release

NewReleases is sending notifications on new releases.