Plugin Escape Hatch
This plugin provides an escape hatch to access the native Mapbox SDK for Android API. This allows developers to use the underlying provider’s API directly, should they need to access a feature of the provider that is not supported by the OMH plugin.
You can obtain the native MapView and MapboxMap instances by casting the OmhMap instance to OmhMapImpl:
import com.openmobilehub.android.maps.plugin.mapbox.presentation.maps.OmhMapImpl as MapboxOmhMapImpl
...
(omhMap as MapboxOmhMapImpl).mapView // for MapView
(omhMap as MapboxOmhMapImpl).mapView.mapboxMap // for MapboxMap
For this provider, the following limitations as to the provider’s API apply:
- removing a
SymbolLayerorGeoJsonSourcefrom the map will break the plugin - modifying the
iconImageproperty of theSymbolLayercan make theOmhMarkerbecome out of sync with the underlying layer - altering the feature of the underlying
GeoJsonSourceof anOmhMarkercan make it become out of sync with the marker’s actual position on the map