v11.4.0
·
5 commits
to release/v11.4
since this release
11.4.0 May 22, 2024
Breaking changes ⚠️
- [compose] Remove
locationComponentSettingsfromMapboxMapcomposable function,MapEffectwith location component API should be used instead. More compose-friendly location component API will be introduced in future releases. - [compose] Remove
TileCacheBudget(com.mapbox.maps.TileCacheBudget)constructor and introduceTileCacheBudget(TileCacheBudgetInMegabytes)andTileCacheBudget(TileCacheBudgetInTiles)constructor instead. - [compose] Remove
layoutParamsfromViewAnnotationcomposable function, the internalComposeViewwrapping theViewAnnotation.contentwill always useWRAP_CONTENT; In case of tests where the assertion happens before the measure, user can force the content size usingViewAnnotationOptions.width/heightAPIs. - [compose] Constructor in
PromoteIddata class from compose now takesPropertyNameand optionalSourceIdinstead of itself. - [compose] Use new
SlotsContentinstead of genericMapto handle the style content for slots. IntroducedslotsContentbuilder function. - [compose] Use new
LayerPositionedContentinstead of genericMapto handle the layer positioned style content. IntroducedlayerPositionedContentbuilder function. - [compose] Use new
StyleImportsConfiginstead of genericMapto handle the style import configurations. IntroducedstyleImportsConfigbuilder function. - [compose] Move
MapboxStandardStyleto a different package and introduceLightPresetwith available presets as constants. - [compose]
MapViewportStatepropertiescameraState,mapViewportStatusChangedReasonandmapViewportStatusare null when the state is not attached to a map. - [compose]
MapViewportStateconstructor parameter has been renamed toinitialCameraState.
Features ✨ and improvements 🏁
- [compose] Add
AtmosphereStateparameter toGenericStylecomposable function. - [compose] Introduce
ProjectionandAtmosphereStateAPI onMapStyleandMapboxStandardStyle. - [compose] Add
StyleImageto construct following image layer properties:IconImage,FillPattern,LinePattern,BearingImage,ShadowImage,TopImage. - [compose] Add
ModelIdconstructor to add model id and uri. - [compose] Add
TerrainStateparameter toGenericStyle,MapStyleandMapboxStandardStylecomposable functions. - Introduce
addStyleImportFromJSON,addStyleImportFromURI,updateStyleImportWithJSON,updateStyleImportWithURI,moveStyleImportAPIs toMapboxMapandStyle. - Handle updating geo-json data exceptions and propagate them to
MapboxMap.subscribeMapLoadingError(mapLoadingErrorCallback). - Introduce
SlotLayerin Style DSL. - Add statistics for graphics pipeline program creation.
- Enable
raster-elevationfor tiled raster sources. - Improve tile processing performance by filtering out tiny polygon holes.
- Reduce number of evaluations of step expression in
line-gradientproperties. - Add support for
line-trim-offsetwithline-pattern. - Enable two dimensional data handling in Mapbox Raster tiles.
- Trim zoom ranges for the style at tileset descriptor resolving.
- Extend
SymbolLayer.iconColorSaturationrange from [0, 1] to [-1, 1] and change default value to 0. - Reduce time spent on model layer re-evaluation during light change.
- Expose experimental
Style.styleSlotsallowing to get the ordered list of slots. - Deprecate
MapboxMap.cameraForCoordinateBounds,MapboxMap.cameraForGeometryand some synchronous overloadedMapboxMap.cameraForCoordinatesin favour of single synchronous, asynchronous and suspendMapboxMap.cameraForCoordinates. SynchronousMapboxMap.cameraForCoordinatesreturns empty camera (could be checked withCameraOptions.isEmpty) if the map's size is not yet calculated. - Add feature metrics collection. Mapbox Maps SDK collects anonymous data about which of its features are used. Mapbox uses this data to understand how our software is being used and prioritize plans to improve it. These metrics tell us whether a feature has been used ("flyTo was called"), but not how ("flyTo was called with this position"). No user-level metrics or identifiers are collected as part of this initiative.
- Avoid locking main thread when it is not needed on map destroy.
- Add experimental
MapView.setSnapshotLegacyModefunction to help avoidingMapView.snapshotnative crash on some Samsung devices running Android 14. - Add experimental
RasterParticleLayerin Style DSL and Compose. - Add
mapView.location.slotAPI to assign a slot for the location indicator.
Bug fixes 🐞
- [compose] Fix an issue with
rememberGeoJsonSourceState, where theValueandGeoJsonDatacan not be serialised. - [compose] Remember default
ComposeMapInitOptionsandGesturesSettingsso that we don't reconstruct these classes whenMapboxMaprecomposes. - [compose] Filter relevant events for
ViewAnnotation.onUpdatedListenerand skip events from other view annotations. - [compose] Do not consume tap event for
Compass, so that user setclickablecan be processed. - [compose] Fix slots and layerposition content not being cleaned up during recomposition.
- [compose] Propagate onRemoved and onClear to children nodes of MapStyleNode to do proper clean up.
- [compose] Fix lost style import config during style switch by waiting for style load event.
- [compose] Make the initial compass visibility to be false, so the compass wouldn't show and hide initially if the user is facing north.
- [compose] Fix
java.io.NotSerializableException: com.mapbox.bindgen.Valuefor SourceState. - [compose] Queue viewport operations when the
MapViewportStateis no yet attached to the map, to avoid losing events. - Fix
Snapshotter.cameraForCoordinatesargumentspadding,bearingandpitchto be nullable. - Fix config with format expression that contains text property overrides.
- Make non-vector tile parsing cancellable.
- Move cutoff opacity calculation to CPU side.
- Fix icon/pattern missing issue if the missing image is only added after map gets rendered.
- Introduce a dedicated thread for 3d landmarks parsing.
- Fix crash on start when no free disk space left.
- Fix TilePrefetch for GeoJSON sources.
- Fix snapshotter latency when 3d tiles involved.
- Fix renderer destruction being blocked by 3d models parsing completion.
- Fix memory leak when camera animations are skipped.
- Fix Mapbox attribution and telemetry links not opening in a browser.
- Fix incorrect size of the tile memory budget for vector tiles when the budget is set in megabytes.
- Fix
LogoView.logoEnablednot being in sync withMapView.logo.enabledstate. - Fix raster-particle not being visible on some Android devices.
- Fixed invalid circle order while using
circle-sort-key. - Fixed duplicate circles in static viewport mode.
- Fixed a crash during style change.
Dependencies
- Update gl-native to v11.4.0 and common to v24.4.0.