android-v10.0.0
10.0.0 October 6, 2021
Breaking changes ⚠️
-
Add
@JvmOverloads
where applicable to provide better experience for Java users. (#656) -
Refactor gestures configuration options to be aligned better across platforms. (#672)
- Rename
flingVelocityAnimationEnabled
toscrollDecelerationEnabled
- Rename
rotateVelocityAnimationEnabled
torotateDecelerationEnabled
- Rename
scaleVelocityAnimationEnabled
topinchToZoomDecelerationEnabled
- Rename
zoomEnabled
topinchToZoomEnabled
and limit its effect to just pinch to zoom - Rename
panScrollMode
toscrollMode
- Rename
zoomRate
tozoomAnimationAmount
- Remove
disableRotateWhenScaling
- Rename
increaseRotateThresholdWhenScaling
toincreaseRotateThresholdWhenPinchingToZoom
- Rename
increaseScaleThresholdWhenRotating
toincreasePinchToZoomThresholdWhenRotating
- Split
doubleTapToZoomEnabled
intodoubleTapToZoomInEnabled
anddoubleTouchToZoomOutEnabled
- Remove
pixelRatio
from gesture options (if needed, use the value from map init options so that this option is not duplicated) - Rename
GesturesSettings#isPanHorizontallyLimited
toGesturesSettings#isScrollHorizontallyLimited
- Rename
GesturesSettings#isPanVerticallyLimited
toGesturesSettings#isScrollVerticallyLimited
- Rename
-
Apply geojson data (using
data
,url
,feature
,featureCollection
,geometry
functions) is fully async now. (#699)
Following APIs are impacted:GeoJsonSource.data(userData)
is also setting data using worker thread meaning that if somefeatureCollection
is already parsing - it will be parsed till end, applied to the map and replaced immediately byuserData
.GeoJsonSource.url(userUrl)
is also setting data using worker thread meaning that if somefeatureCollection
is already parsing - it will be parsed till end, applied to the map and replaced immediately byuserUrl
.- Following APIs are changed:
GeoJsonSource.feature(value: Feature, onDataParsed: ((GeoJsonSource) -> Unit)? = null) => GeoJsonSource.feature(value: Feature) GeoJsonSource.geometry(value: Geometry, onDataParsed: ((GeoJsonSource) -> Unit)? = null) => GeoJsonSource.geometry(value: Geometry) GeoJsonSource.featureCollection(value: FeatureCollection, onDataParsed: ((GeoJsonSource) -> Unit)? = null) => GeoJsonSource.featureCollection(value: FeatureCollection) @SourceDsl class Builder( val sourceId: String, private val onGeoJsonParsed: OnGeoJsonParsed ) => @SourceDsl class Builder( val sourceId: String )
- Following APIs are removed:
interface OnGeoJsonParsed GeoJsonSource.addOnGeoJsonParsedListener(listener: OnGeoJsonParsed) GeoJsonSource.removeOnGeoJsonParsedListener(listener: OnGeoJsonParsed) // DSL function removed fun geoJsonSource( id: String, config: GeoJsonSource.Builder.() -> Unit, onGeoJsonParsed: OnGeoJsonParsed ): GeoJsonSource = GeoJsonSource.Builder(id, onGeoJsonParsed).apply(config).build()
-
Update
getLayerAs
function to return nullableLayer
type. (#673) -
Update map events data models. (#712)
- add optional
sourceId
andtileId
in theMapLoadingErrorEventData
andOnMapLoadErrorListener
. - make
response
inResourceEventData
optional. - make
etag
,modified
,expires
inside resource request'sResponse
optional. - add
DataSourceType
,RequestPriority
,RequestType
,ResponseErrorType
,ResponseSourceType
enum forresource-request
event which conform to java docs from gl-native.
- add optional
-
Refactor MapEvents listeners, so that each listener will include one event data property. (#718)
This unblocks us to add properties to the event data incrementally without breaking our public API.List of affected listeners:
OnCameraChangeListener
OnMapIdleListener
OnMapLoadedListener
OnMapLoadErrorListener
OnRenderFrameFinishedListener
OnRenderFrameStartedListener
OnSourceAddedListener
OnSourceDataLoadedListener
OnSourceRemovedListener
OnStyleDataLoadedListener
OnStyleImageMissingListener
OnStyleImageUnusedListener
OnStyleLoadedListener
Package name for Map event's data models is nowcom.mapbox.maps.extension.observable
inside thesdk-base
module, so it can be reused across different plugins.Type of TileID's z/x/y properties is changed from
Double
toLong
. -
Abstract classes
CustomLayerHost
,ElevationData
,MapClient
,Observer
,OfflineRegionObserver
,HttpServiceInterceptorInterface
,HttpServiceInterface
,LogWriterBackend
,OfflineSwitchObserver
,ReachabilityInterface
,TileStoreObserver
have become interfaces. (#697)
Features ✨ and improvements 🏁
- Introduce 3D globe (experimental). (#667)
- Append gl-native and common API reference documentation to the output of Dokka documentation generation. (#711)
- Set
Process.THREAD_PRIORITY_DISPLAY
as render thread priority to improve overall performance. (#701) - Add
HttpServiceFactory.reset()
to release the HTTP service implementation. (#697)
Bug fixes 🐞
- Throw exception when gestures plugin functionality is used but plugin was not created. (#653)
- Throw exception when camera plugin functionality is used but plugin was not created. (#668)
- Fix black screen when resuming activity with
MapView
on x86 emulator, Android API <= 23. (#671) - Fix map render deadlock on Android 8 on power on button. (#688)
- Fix context leak in
LocationProviderImpl
. (#690) - Fix native memory leak by explicitly nulling map reference from renderer. (#687)
- Fix wrong attribute reference in runtime exception text when token is missing. (#708)
- Fix applying position property to scale bar plugin. (#677)
- Fix initialisation location puck when no style loaded from code by changing
Plugin#onStart()
call after style loaded started. (#680) - Fix attribution/logo jumble when RTL layout is configured. (#674)
- Fix rendering artifacts for a model layer when
model-opacity
property is used. (#697) - Improve rendering performance by avoiding unnecessary re-layout for cached tiles. (#697)
- Fix
onResponse
callback forHttpInterceptor
never being called. (#697)
Dependencies
- Bump gl-native to v10.0.0, common to v20.0.0. (#697)