Company
Date Published
Author
Karim Naaji, Ricky Reusser
Word count
593
Language
English
Hacker News points
None

Summary

Mapbox GL JS v2.3 introduces new 3D features, performance enhancements, and expanded data-driven styling options, including a fog effect that adds depth to maps and allows designers to simplify styles. Fog can be easily implemented using the map.setFog(..) function, offering controls for color, range, and horizon-blend. The update also includes a new API for client-side elevation querying, which uses Digital Elevation Model tiles to generate terrain elevation profiles quickly and without server requests. Performance improvements involve a reduced GPU memory footprint for terrain, optimized tile cover to minimize DEM tile requests, and per-frame batching of DOM operations to enhance update performance. Additionally, data-driven styling has been expanded to line-dasharray and line-cap properties, allowing for more efficient layer management. The update is available via CDN and NPM, and further details can be found in the v2.3.0 release notes.