MapProjectionDelegate

Definition of a map projection delegate.

interface MapProjectionDelegate

Functions

coordinateForProjectedMeters
Link copied to clipboard

Calculate a longitude-latitude pair for a Spherical Mercator projected meters.

abstract fun coordinateForProjectedMeters(projectedMeters: ProjectedMeters): Point
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
getMapProjection
Link copied to clipboard

Get current map projection for Mapbox map.

Please note that even if MapboxMap is configured to use MapProjection.Globe starting from MapProjection.TRANSITION_ZOOM_LEVEL and above this method will return MapProjection.Mercator.

abstract fun getMapProjection(): MapProjection
getMetersPerPixelAtLatitude
Link copied to clipboard

Calculate distance spanned by one pixel at the specified latitude at current zoom level.

abstract fun getMetersPerPixelAtLatitude(latitude: Double): Double

Calculate distance spanned by one pixel at the specified latitude and zoom level.

abstract fun getMetersPerPixelAtLatitude(latitude: Double, zoom: Double): Double
hashCode
Link copied to clipboard
open override fun hashCode(): Int
project
Link copied to clipboard

Calculate a point on the map in Mercator Projection for a given coordinate at the specified zoom scale.

abstract fun project(point: Point, zoomScale: Double): MercatorCoordinate
projectedMetersForCoordinate
Link copied to clipboard

Calculate Spherical Mercator ProjectedMeters coordinates.

abstract fun projectedMetersForCoordinate(point: Point): ProjectedMeters
setMapProjection
Link copied to clipboard

Set map projection for Mapbox map.

abstract fun setMapProjection(mapProjection: MapProjection)
toString
Link copied to clipboard
open override fun toString(): String
unproject
Link copied to clipboard

Calculate a coordinate for a given point on the map in Mercator Projection.

abstract fun unproject(coordinate: MercatorCoordinate, zoomScale: Double): Point

Inheritors

MapboxMap
Link copied to clipboard