WebMercator

An implementation of MapProjection for the Web Mercator projection

Functions

Link copied to clipboard
open override fun geographicToMapPoint(geographicCoordinate: GeographicCoordinate): MapPoint
Link copied to clipboard
open override fun mapPointToGeographic(mapPoint: MapPoint): GeographicCoordinate

Converts a MapPoint back to a GeographicCoordinate.

Link copied to clipboard
fun scaleAt(geographicCoordinate: GeographicCoordinate): Double

This function computes a map vector where each dimension is the length of a metre at the map point the given coordinates project into. The average of the magnitude in the x & y direction of the resulting vector is computed which is returned as the scale.