Skip to content

v2.0.0

Compare
Choose a tag to compare
@arindam1993 arindam1993 released this 08 Dec 16:29
· 1704 commits to main since this release

⚠️ Breaking changes

  • 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 https://support.mapbox.com.
  • 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.
  • Deprecate Internet Explorer 11, no longer supported from this release. (#8283, #6391)
  • Support for unlocked pitch up to 85°. The default maxPitch is increased from 60° to 85° which can result in viewing above the horizon line. By default, this area will be drawn transparent but a new sky layer can be added to the map in order to fill this space. The legacy behavior can be achieved by simply adding maxPitch: 60 to the map options when instantiating your map.

✨ Features and improvements

  • Add 3D terrain feature. All layer types and markers can now be extruded using the new terrain root level style-spec property or with the function map.setTerrain(). (#1489)
  • Add support for unlocked pitch up to 85° (previously 60°). (#3731)
  • Add a new sky layer acting as an infinite background above the horizon line. This layer can be used from the style-spec and has two types: atmospheric and gradient.
  • Add a free form camera API, allowing for more complex camera manipulation in 3D, accessible using map.getFreeCameraOptions() and map.setFreeCameraOptions().
  • Improve performance by adopting a two-phase tile loading strategy, prioritizing rendering of non-symbol layers first.
  • Improve performance by avoiding parsing vector tiles that were already aborted.
  • Improve performance by adopting a preemptive shader compilation strategy. (#9384)
  • Improve performance by disabling fade-in animation for symbols and raster tiles on initial map load.
  • Improve performance by defaulting to 2 workers on all platforms. (#3153)
  • Improve performance by loading tiles on the main thread at initial map load.
  • Improve performance by using better worker task scheduling.

🐞 Bug fixes

  • Avoid reloading raster and raster-dem tiles when the RTLTextPlugin loads.
  • Add runtime evaluation of label collision boxes for more accurate symbol placement at fractional zoom levels and tilted views.
  • Fix tile cache size for terrain DEM sources.
  • Prevent holding on to DEM memory on the worker.
  • Reduce memory used by fill-extrusions.

🛠️ Workflow

  • Run render tests in browser.