v6.1.0
Added 4
- Add support for updating an ImageSource with an already-decoded image (HTMLImageElement, HTMLCanvasElement, ImageBitmap or ImageData) directly via ImageSource.updateImage({image}), skipping the network request
- Add GeoJSONSource.getClusterOptions to get a source's current cluster options (cluster, clusterMaxZoom, clusterRadius)
- Support global-state expressions in sky.*, light.* and projection.type properties
- Add MapOptions.rotateSpeed and MapOptions.pitchSpeed, the degrees the bearing/pitch change per pixel dragged
Changed 1
- Show a grab cursor over draggable markers, including on non-interactive maps
Fixed 8
- Use role=img for non-interactive default markers and role=button when they become interactive
- Fix an error thrown when a paint property transitions between arrays of different length
- Fix renderer crash when RasterTileSource.setTiles/setUrl is called while the source contains errored tiles
- Fix 3D buildings disappearing when the camera pitches up to look near the horizon, by growing tile-culling bounds as the frustum's bottom edge approaches horizontal
- Fix globe latitude precision on some GPUs by reformulating the mercator-to-sphere Y coordinate algebraically, avoiding float32 cancellation and imprecise hardware transcendentals near the equator
- Fix a race in RasterTileSource.loadTile and ImageSource.load where a tile/image aborted during an awaited transformRequest passed an undefined AbortController into the image request queue
- Fix setTerrain not destroying the previously active terrain when switching to a new configuration, which leaked its GPU resources and left the old source still configured as a terrain source
- Fix fill and line layers being rendered twice near the antimeridian on globe when looking at poles or when zoomed out
✨ Features and improvements
- Add support for updating an
ImageSourcewith an already-decoded image (HTMLImageElement,HTMLCanvasElement,ImageBitmaporImageData) directly viaImageSource.updateImage({image}), skipping the network request (#7944) (by @mondsichtung) - Add
GeoJSONSource.getClusterOptionsto get a source's current cluster options (cluster,clusterMaxZoom,clusterRadius) (#7948) (by @lazerg) - Support
global-stateexpressions insky.*,light.*andprojection.typeproperties (#7966, #7967, #7968) (by @CommanderStorm) - Add
MapOptions.rotateSpeedandMapOptions.pitchSpeed, the degrees the bearing/pitch change per pixel dragged (#7949) (by @clement-igonet) - Show a grab cursor over draggable markers, including on non-interactive maps (#8019) (by @hugosmoreira)
🐞 Bug fixes
- Use
role=imgfor non-interactive default markers androle=buttonwhen they become interactive (#7790) (by @cat0825) - Fix an error thrown when a paint property transitions between arrays of different length (#6606) (by @HarelM)
- Fix renderer crash when
RasterTileSource.setTiles/setUrlis called while the source contains errored tiles (#7911) (by @lazerg) - Fix 3D buildings disappearing when the camera pitches up to look near the horizon, by growing tile-culling bounds as the frustum's bottom edge (from pitch and FOV) approaches horizontal (#7633) (by @clement-igonet)
- Fix globe latitude precision on some GPUs (e.g. Mali) by reformulating the mercator-to-sphere Y coordinate algebraically (
exp+ rational arithmetic instead ofatan/sin/cos), avoiding float32 cancellation and imprecise hardware transcendentals near the equator; the runtime GPUatan-error measurement/correction this superseded has also been removed (#7419) (by @clement-igonet) - Fix a race in
RasterTileSource.loadTileandImageSource.loadwhere a tile/image aborted during an awaitedtransformRequestpassed an undefinedAbortControllerinto the image request queue, crashing it withTypeError: Cannot read properties of undefined (reading 'signal')(#8004) (by @jan-grzybek) - Fix
setTerrainnot destroying the previously active terrain when switching to a new configuration, which leaked its GPU resources and left the old source still configured as a terrain source (#7990) (by @lazerg) - Fix fill and line layers being rendered twice near the antimeridian on globe when looking at poles or when zoomed out (#6248) (by @pabueco)