sdk-maps / com.tomtom.online.sdk.map / MapInfoExtension

MapInfoExtension

interface MapInfoExtension

Interface to provide information about general map settings (e.e.g user location, locale)

Functions

getCenterOfMap

abstract fun getCenterOfMap(): LatLng

Latitude and longitude of map center.

getDefaultZoomLevel

abstract fun getDefaultZoomLevel(): Double

Default zoom level for map. See {@value MapConstants#DEFAULT_ZOOM_LEVEL}.

getUserLocation

abstract fun getUserLocation(): Location?

If location is enabled for map, returns user's location (the same as indicated by GPS dot). If GPS position is not available, this method returns null. It is possible to observe location events using TomtomMap#addLocationUpdateListener(LocationUpdateListener).

isUserLocationInMapBoundingBox

abstract fun isUserLocationInMapBoundingBox(): Boolean

Checks whether user location is inside current map bounding box.

Inheritors

TomtomMap

interface TomtomMap : RouteExtension, MarkerExtension, MapManipulationExtension, MapInfoExtension, MapCallbacksExtension, MapViewExtension, MarkersCallbackExtension, OverlaysCallbackExtension, RouteCallbackExtension, LocationSourceExtension, OnRequestPermissionsResultCallback, CameraCallbacksExtension

Interface that is the main entry point for all methods related to the map. TomtomMap is obtained using the MapFragment#getAsyncMap(OnMapReadyCallback) method on a MapFragment.