Table of Contents

Method GpsToWebMercator

Namespace
Pinwheel.Vista.RealWorldData
Assembly
Pinwheel.Vista.RealWorldData.Runtime.dll

GpsToWebMercator(GeoPoint, int)

Converts a longitude/latitude point into Web Mercator pixel space at the specified zoom level.

public static GeoPoint GpsToWebMercator(this GeoPoint p, int zoom = 0)

Parameters

p GeoPoint

Point in GPS coordinates, where X is longitude and Y is latitude.

zoom int

Web Mercator zoom level that determines the pixel-space scale.

Returns

GeoPoint

The converted point in Web Mercator pixel coordinates.

Remarks

Latitudes outside Pinwheel.Vista.RealWorldData.GeoPoint.MAX_LAT_COVERAGE_GPS trigger a warning because the projection becomes unreliable near the poles.