open class MapView : FrameLayout, UiComponentsLayer, UIMapSettings, SnapshotService
A view used to display a map. When you want to use this view directly, you need to pass forward all life cycle methods to this class (e.g., onPause, onResume).
MapView(context: Context)
Default constructor that uses context to inflate a view and create the map database. Constructor also creates MapView(context: Context, styleUrl: String)
Custom constructor to provide custom style url. Custom style url can be pass from http server or application assets. MapView(context: Context, attrs: AttributeSet?)
Custom constructor to provide custom set of attributes. MapView(context: Context, keys: MutableMap<String!, String!>!)
Custom constructor to provide online API keys dynamically. Keys provided within the map will override any keys set in the AndroidManifest.xml Constructor also creates MapView(context: Context, keys: MutableMap<String!, String!>!, styleUrl: String) MapView(context: Context, mapProperties: MapProperties!)
Custom constructor to provide online API keys dynamically together with a custom style url. Custom style url can be pass from http server or application assets. MapView(context: Context, attrs: AttributeSet?, defStyleAttr: Int)
Custom constructor to provide custom set of attributes and a reference to default style resource. |
open fun addOnMapReadyCallback(callback: OnMapReadyCallback!): Unit
Register |
|
open fun createGpsIndicator(): Unit |
|
open fun createMap(nativeMapView: NativeMapView!): Unit |
|
open fun createMapDatabase(context: Context!): Unit |
|
open fun createSnapshotter(): Unit |
|
open fun forceDestroy(): Unit
Force the map to destroy the surface view and renderer. Once called, no map operations are available anymore. This method should be linked with lifecycle, it is internally used by onDestroy. |
|
open fun getCompassView(): CompassView! |
|
open fun getCopyrightsView(): CopyrightsView! |
|
open fun getCurrentLocationView(): CurrentLocationView! |
|
open fun getLogoView(): LogoView! |
|
open fun getMapChangeListener(): TomtomMapCallback.OnMapChangedListener!
For test only. |
|
open fun getMarkerBalloonsLayerView(): ViewGroup! |
|
open fun getPanningControlsView(): PanningControlsView! |
|
open fun getZoomingControlsView(): ZoomingControlsView! |
|
open fun init(context: Context!): Unit |
|
open fun initView(): Unit |
|
open fun loadDefaultStyle(): Unit |
|
open fun onDestroy(): Unit
You must call this method from the parent Activity/Fragment's corresponding method. When the map is going to be recreated (e.g., onSaveInstanceState was called), there will be no action executed. Otherwise, the native part will be removed and map state will be removed. |
|
open fun onHostSaveInstanceState(): Unit
You must call this method from the method responsible for the saving of the stated hosting components, e.g., |
|
open fun onPause(): Unit
You must call this method from the parent Activity/Fragment's corresponding method. |
|
open fun onRestoreInstanceState(state: Parcelable!): Unit |
|
open fun onResume(): Unit
You must call this method from the parent Activity/Fragment's corresponding lifecycle method. |
|
open fun onSaveInstanceState(): Parcelable? |
|
open fun onStart(): Unit
You must call this method from the parent Activity/Fragment's corresponding lifecycle method. |
|
open fun onStop(): Unit
You must call this method from the parent Activity/Fragment's corresponding method. |
|
open fun onTouchEvent(event: MotionEvent!): Boolean |
|
open fun parseAttrs(context: Context!, attrs: AttributeSet!): Unit |
|
open fun setSnapshotter(snapshotter: Snapshotter): Unit
Method that allows you to change an implementation of |
|
open fun setStyleJson(styleJson: String!): Unit open fun setStyleJson(styleJson: String!, layerSetConfiguration: LayerSetConfiguration!): Unit |
|
open fun setStyleUrl(styleUrl: String!): Unit open fun setStyleUrl(styleUrl: String!, layerSetConfiguration: LayerSetConfiguration!): Unit |
|
open fun setZOrderMediaOverlay(zOrderOnTop: Boolean): Unit
Control whether the map surface view's surface is placed on top of another regular surface view in the window (but still behind the window itself). This is typically used to place mini map on top of an underlying map surface view. |
|
open fun takeSnapshot(callback: SnapshotCallback): Unit
Take a snapshot of a Map. The result will be delivered by |
|
open fun updateMapConfig(holder: SurfaceHolder!): Unit |
|
open fun updateMapSurface(holder: SurfaceHolder!): Unit |
|
open fun verifyGpsStatus(): Unit |