OmhMap

interface OmhMap

Abstraction to provide access to the OmhMap. This is the main class of OMH Maps SDK for Android and is the entry point for all methods related to the map. You cannot instantiate a GoogleMap object directly, rather, you must obtain one from the getMapAsync() method on a OmhMapView that you have added to your application.

Functions

Link copied to clipboard
abstract fun addMarker(options: OmhMarkerOptions): OmhMarker?

Adds a marker to this map. The marker's icon is rendered on the map at the position.

Link copied to clipboard

Gets the camera's position.

Link copied to clipboard
abstract fun isMyLocationEnabled(): Boolean

Gets the status of the my-location layer.

Link copied to clipboard
abstract fun moveCamera(coordinate: OmhCoordinate, zoomLevel: Float)

Moves the camera's position to a specific position.

Link copied to clipboard
abstract fun setMyLocationButtonClickListener(omhOnMyLocationButtonClickListener: OmhOnMyLocationButtonClickListener)

Sets a callback that's invoked when the my location button is clicked.

Link copied to clipboard
@RequiresPermission(anyOf = ["android.permission.ACCESS_COARSE_LOCATION", "android.permission.ACCESS_FINE_LOCATION"])
abstract fun setMyLocationEnabled(enable: Boolean)

Enables or disables the my location layer.

Link copied to clipboard

Sets the callback that is invoked when the camera movement has ended.

Link copied to clipboard

Sets the callback that's invoked when the camera starts moving or the reason for camera motion has changed.

Link copied to clipboard
abstract fun setZoomGesturesEnabled(enableZoomGestures: Boolean)

Enables or disables the zoom gestures in the map.