MTNavigable

interface MTNavigable

Defines methods for navigating the map.

Inheritors

Functions

abstract suspend fun areTilesLoaded(): Boolean

Returns whether all currently requested tiles are loaded.

abstract fun centerOnIpPoint()

Centers the map on the visitor's location inferred from their public IP address.

abstract fun easeTo(cameraOptions: MTCameraOptions)

Changes any combination of center, zoom, bearing and pitch with an animated transition between old and new values.

abstract fun fitBounds(bounds: MTBounds, options: MTFitBoundsOptions? = null)

Adjusts the camera to ensure the entire bounding box is visible.

abstract fun fitToIpBounds()

Fits the camera to the coarse bounds inferred from the user's public IP address.

abstract fun flyTo(cameraOptions: MTCameraOptions, flyToOptions: MTFlyToOptions?)

Changes any combination of center, zoom, bearing, and pitch, animating the transition along a curve that evokes flight.

abstract suspend fun getBearing(): Double

Returns the map's current bearing.

abstract suspend fun getBounds(): MTBounds

Returns the geographical bounds currently visible in the viewport.

abstract suspend fun getCameraTargetElevation(): Double

Returns the elevation of the point currently targeted by the camera, in meters above sea level.

abstract suspend fun getCenter(): LngLat

Returns the map's current center.

abstract suspend fun getCenterClampedToGround(): Boolean

Returns whether the map's center is clamped to the ground.

abstract suspend fun getCenterElevation(): Double

Returns the elevation of the map's center point in meters above sea level.

abstract suspend fun getMaxBounds(): MTBounds?

Returns the geographical constraints currently applied to the map, if any.

abstract suspend fun getMaxPitch(): Double

Returns the map's maximum pitch.

abstract suspend fun getMinPitch(): Double

Returns the map's minimum pitch.

abstract suspend fun getPitch(): Double

Returns the map's current pitch.

abstract suspend fun getPixelRatio(): Double

Returns the pixel ratio currently used to render the map.

abstract suspend fun getRenderWorldCopies(): Boolean

Returns whether the map is set to render multiple world copies.

abstract suspend fun getRoll(): Double

Returns the map's current roll.

abstract fun jumpTo(cameraOptions: MTCameraOptions)

Changes any combination of center, zoom, bearing, and pitch, without an animated transition

abstract fun panBy(offset: MTPoint)

Pans the map by the specified offset.

abstract fun panTo(coordinates: LngLat)

Pans the map to the specified location with an animated transition.

abstract suspend fun project(coordinates: LngLat): MTPoint

Projects geographical coordinates to a point on the container.

abstract fun setBearing(bearing: Double)

Sets bearing of the map.

abstract fun setCenter(center: LngLat)

Sets the geographical center of the map.

abstract fun setCenterElevation(elevation: Double)

Sets the elevation of the map's center point, in meters above sea level.

abstract fun setIsCenterClampedToGround(isCenterClampedToGround: Boolean)

Sets the center clamped to the ground.

abstract fun setMaxBounds(bounds: MTBounds?)

Applies or clears the geographical constraints that clamp user interaction.

abstract fun setPadding(padding: MTPaddingOptions)

Sets the padding in pixels around the viewport.

abstract fun setPitch(pitch: Double)

Sets the map's pitch.

abstract fun setPixelRatio(pixelRatio: Double)

Overrides the pixel ratio used to render the map.

abstract fun setRoll(roll: Double)

Sets the map's roll angle.

abstract fun setVerticalFieldOfView(verticalFieldOfView: Double)

Sets the map's vertical field of view in degrees (defaults to 36.87 degrees).

abstract fun snapToNorth(options: MTAnimationOptions? = null)

Snaps the map so that north is up (bearing 0), animating the transition.

abstract fun stop()

Stops any animated transition underway.

abstract suspend fun unproject(point: MTPoint): LngLat

Unprojects a point on the container to geographical coordinates.