We’ve released Mapbox GL JS v2.2.0 with improved GeoJSON update performance in Safari, level roofs on 3D terrain for all fill extrusions, and a new Continuous Integration (CI) test mode so developers can include Mapbox in their automated testing suite and ensure a high quality experience for their customers.
Improved data update performance
Updating GeoJSON sources with setData(geojson) is now much faster in Safari, resulting in smoother data rendering for layers with frequently-updated data like vehicle or asset positions. Instacart leverages Mapbox GL to help users track their order in real-time and this update means their users will experience smooth animations as their order approaches their front door, regardless of browser.
Level roofs on 3D terrain
Roofs on 3D buildings are now level relative to the earth rather than the terrain. Level roofs are now drawn for all fill-extrusion layers drawn on top of terrain. Previously, the top face of extruded features on layers using custom data followed the elevation of terrain. Extrusions are now drawn correctly with a level top for all custom data layers.
Continuous Integration (CI) Test Mode
Test mode lets developers include GL JS in automated tests without an access token. Developers can ensure complete test coverage and rapidly iterate on code with confidence they are delivering high quality applications to their customers. Maps created in test mode don’t load resources from Mapbox and do not trigger billing. The GL JS API still works as expected and your tests can load test styles and tiles locally. In test mode you can still:
- Listen for interaction events such as click and mouseover on Layers.
- Interact with Markers and Popups
- Query features data with map.queryRenderedFeatures()
- Update the camera center, zoom or bearing and use map.easeTo() and map.flyTo()
Upgrading to v2.2.0
See the v2.2.0 release notes for a full list of changes.