Skip to content

android-v10.0.0

Compare
Choose a tag to compare
@kiryldz kiryldz released this 06 Oct 17:08
· 1258 commits to main since this release
ada8624

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 to scrollDecelerationEnabled
    • Rename rotateVelocityAnimationEnabled to rotateDecelerationEnabled
    • Rename scaleVelocityAnimationEnabled to pinchToZoomDecelerationEnabled
    • Rename zoomEnabled to pinchToZoomEnabled and limit its effect to just pinch to zoom
    • Rename panScrollMode to scrollMode
    • Rename zoomRate to zoomAnimationAmount
    • Remove disableRotateWhenScaling
    • Rename increaseRotateThresholdWhenScaling to increaseRotateThresholdWhenPinchingToZoom
    • Rename increaseScaleThresholdWhenRotating to increasePinchToZoomThresholdWhenRotating
    • Split doubleTapToZoomEnabled into doubleTapToZoomInEnabled and doubleTouchToZoomOutEnabled
    • Remove pixelRatio from gesture options (if needed, use the value from map init options so that this option is not duplicated)
    • Rename GesturesSettings#isPanHorizontallyLimited to GesturesSettings#isScrollHorizontallyLimited
    • Rename GesturesSettings#isPanVerticallyLimited to GesturesSettings#isScrollVerticallyLimited
  • 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 some featureCollection is already parsing - it will be parsed till end, applied to the map and replaced immediately by userData.
    • GeoJsonSource.url(userUrl) is also setting data using worker thread meaning that if some featureCollection is already parsing - it will be parsed till end, applied to the map and replaced immediately by userUrl.
    • 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 nullable Layer type. (#673)

  • Update map events data models. (#712)

    • add optional sourceId and tileId in the MapLoadingErrorEventData and OnMapLoadErrorListener.
    • make response in ResourceEventData optional.
    • make etag, modified, expires inside resource request's Response optional.
    • add DataSourceType , RequestPriority , RequestType ,ResponseErrorType , ResponseSourceType enum for resource-request event which conform to java docs from gl-native.
  • 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 now com.mapbox.maps.extension.observable inside the sdk-base module, so it can be reused across different plugins.

    Type of TileID's z/x/y properties is changed from Double to Long.

  • 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 for HttpInterceptor never being called. (#697)

Dependencies

  • Bump gl-native to v10.0.0, common to v20.0.0. (#697)