MapProjectionDelegate

Definition of a map projection delegate.

interface MapProjectionDelegate

Functions

cameraForCoordinateBounds
Link copied to clipboard

Convert to a camera options from a given LatLngBounds, padding, bearing and pitch values.

abstract fun cameraForCoordinateBounds(coordinateBounds: CoordinateBounds, padding: EdgeInsets, bearing: Double?, pitch: Double?): CameraOptions
cameraForCoordinates
Link copied to clipboard

Convert to a camera options from a given list of points, padding, bearing and pitch values.

abstract fun cameraForCoordinates(coordinates: List<Point>, padding: EdgeInsets, bearing: Double?, pitch: Double?): CameraOptions
cameraForGeometry
Link copied to clipboard

Convert to a camera options from a given geometry, padding, bearing and pitch values.

abstract fun cameraForGeometry(geometry: Geometry, padding: EdgeInsets, bearing: Double?, pitch: Double?): CameraOptions
coordinateBoundsForCamera
Link copied to clipboard

Convert to a LatLngBounds from a given camera options.

abstract fun coordinateBoundsForCamera(cameraOptions: CameraOptions): CoordinateBounds
coordinateBoundsZoomForCamera
Link copied to clipboard

Returns the coordinate bounds and zoom for a given camera.

Note that if the given camera shows the antimeridian, the returned wrapped bounds might not represent the minimum bounding box.

See also {@link #coordinateBoundsZoomForCameraUnwrapped}

abstract fun coordinateBoundsZoomForCamera(cameraOptions: CameraOptions): CoordinateBoundsZoom
coordinateBoundsZoomForCameraUnwrapped
Link copied to clipboard

Returns the unwrapped coordinate bounds and zoom for a given camera.

This method is particularly useful, if the camera shows the antimeridian.

abstract fun coordinateBoundsZoomForCameraUnwrapped(cameraOptions: CameraOptions): CoordinateBoundsZoom
coordinateForPixel
Link copied to clipboard

Calculate a geographical coordinate(i.e., longitude-latitude pair) that corresponds to a screen coordinate.

The screen coordinate is in MapOptions.size platform pixels relative to the top left of the map (not of the whole screen).

abstract fun coordinateForPixel(screenCoordinate: ScreenCoordinate): Point
coordinateForProjectedMeters
Link copied to clipboard

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

abstract fun coordinateForProjectedMeters(projectedMeters: ProjectedMeters): Point
coordinatesForPixels
Link copied to clipboard

Calculate geographical coordinates(i.e., longitude-latitude pair) that corresponds to screen coordinates.

The screen coordinates are in MapOptions.size platform pixels relative to the top left of the map (not of the whole screen).

abstract fun coordinatesForPixels(pixels: List<ScreenCoordinate>): List<Point>
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
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
pixelForCoordinate
Link copied to clipboard

Calculate a screen coordinate that corresponds to a geographical coordinate (i.e., longitude-latitude pair).

The screen coordinate is in MapOptions.size platform pixels relative to the top left of the map (not of the whole screen).

abstract fun pixelForCoordinate(point: Point): ScreenCoordinate
pixelsForCoordinates
Link copied to clipboard

Calculate screen coordinates that corresponds to geographical coordinates (i.e., longitude-latitude pair).

The screen coordinates are in MapOptions.size platform pixels relative to the top left of the map (not of the whole screen).

abstract fun pixelsForCoordinates(coordinates: List<Point>): List<ScreenCoordinate>
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
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