github maplibre/maplibre-gl-js v6.1.0

3 hours ago

✨ Features and improvements

  • 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 (#7944) (by @mondsichtung)
  • Add GeoJSONSource.getClusterOptions to get a source's current cluster options (cluster, clusterMaxZoom, clusterRadius) (#7948) (by @lazerg)
  • Support global-state expressions in sky.*, light.* and projection.type properties (#7966, #7967, #7968) (by @CommanderStorm)
  • Add MapOptions.rotateSpeed and MapOptions.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=img for non-interactive default markers and role=button when 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/setUrl is 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 of atan/sin/cos), avoiding float32 cancellation and imprecise hardware transcendentals near the equator; the runtime GPU atan-error measurement/correction this superseded has also been removed (#7419) (by @clement-igonet)
  • 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, crashing it with TypeError: Cannot read properties of undefined (reading 'signal') (#8004) (by @jan-grzybek)
  • 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 (#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)

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

NewReleases is sending notifications on new releases.