v11.2.0-beta.1
Pre-release
Pre-release
·
20 commits
to release/v11.2
since this release
11.2.0-beta.1 February 01, 2024
Features ✨ and improvements 🏁
- Introduce better way of SDK initialization to avoid
java.lang.UnsatisfiedLinkErrorexception on process startup. If the native library is still not found when actual Mapbox API is called, meaningfulMapboxInitializerExceptionis thrown and could be caught and processed on user's side. - Introduce
MapboxMap.getCenterAltitudeModeAPI. - Add
useShortestPathoption toCameraAnimationPlugin.createCenterAnimator, when enabled, shortest path will be applied when the start and end camera center is across the antimeridian, for example from -170 to 170 longitude. Defaults to true. - Introduce
SymbolLayer.iconColorSaturationAPI. - Introduce experimental
RasterLayer.rasterElevationAPI. - Introduce experimental
MapboxMap.startPerformanceStatisticsCollection/MapboxMap.stopPerformanceStatisticsCollectionAPIs allowing to start / stop collecting map rendering performance statistics. - Introduce
GeoJsonSource.tileCacheBudget,RasterSource.tileCacheBudget,RasterDemSource.tileCacheBudget,RasterArraySource.tileCacheBudget,VectorSource.tileCacheBudget,CustomGeometrySource.tileCacheBudget,CustomRasterSource.tileCacheBudget. - Skip unneeded layers properties re-evaluation on zoom change.
- Add the possibility to use constant expressions for
model-emissive-strengthwhen rendering 3D model layers using 2D sources. - Introduce static
HttpServiceFactory.setMaxRequestsPerHostAPI. TileStoreOptions.DiskQuotais now an abort threshold for tilestore size. When we have more than this amount of bytes stored, new downloads will fail.Tilestorestarts to evict tiles with closest expiration date 50Mb before this abort threshold is reached.
Bug fixes 🐞
- Retain previous
CenterAltitudeModeafter gestures are finished. - Avoid marking whole
LayerDslas experimental when only a part of the layer properties are experimental. - Fix R8 error due to missing class
com.tobrun.datacompat.annotation.Default. EaseToandMoveBycamera animation andDefaultViewportTransitionnow will use shortest path when the start and end camera center is across the antimeridian, for example from -170 to 170 longitude.- Remove extra image padding from text shaping offset.
- Address crashes on certain Android devices by disabling the texture pool.
- Fixed elevated rasters with coordinates not aligned to the longitude/latitude grid.
- Fixed a bug that was causing absence of
MapLoadedevent and never ending background task processing. - Fixed a bug that heatmap layer wasn't updating visuals after feature state change.
- Fixed a bug where scientific notation is not supported when parse JSON numbers to
Value.
Dependencies
- Upgrade to Kotlin Data compat v0.8.0.
- Update gl-native to v11.2.0-beta.1 and common to v24.2.0-beta.1.
Known issues
With the new way of Mapbox SDK initialization, your application unit tests may start failing when interacting with Mapbox APIs, even if mocked.
The error may look like:
Exception java.lang.NoClassDefFoundError: Could not initialize class com.mapbox.common.location.Location
or
Caused by: java.lang.RuntimeException: Method w in android.util.Log not mocked. See https://developer.android.com/r/studio-ui/build/not-mocked for details.
at android.util.Log.w(Log.java)
at com.mapbox.common.BaseMapboxInitializer$Companion.init(BaseMapboxInitializer.kt:116)
at com.mapbox.common.BaseMapboxInitializer.init(BaseMapboxInitializer.kt)
at com.mapbox.common.location.Location.<clinit>(Location.java:442)
To fix above errors, BaseMapboxInitializer should be properly mocked before accessing the failing Mapbox class. For example, when using Kotlin MockK you should add the following code:
mockkObject(BaseMapboxInitializer)
every { BaseMapboxInitializer.init<Any>(any()) } just Runs
// your test code
unmockkObject(BaseMapboxInitializer)Alternative solution is to apply unitTests.returnDefaultValues.