Online Maps  v3
OnlineMapsProjection Class Referenceabstract

The base class of map projection. More...

Inheritance diagram for OnlineMapsProjection:
OnlineMapsProjectionSphericalMercator OnlineMapsProjectionWGS84

Public Member Functions

abstract void CoordinatesToTile (double lng, double lat, int zoom, out double tx, out double ty)
 Converts geographic coordinates to tile coordinates. More...
 
abstract void TileToCoordinates (double tx, double ty, int zoom, out double lng, out double lat)
 Converts tile coordinates to geographic coordinates. More...
 

Public Attributes

const double DEG2RAD = Math.PI / 180
 Degrees-to-radians conversion constant. More...
 
const double PI2 = Math.PI * 2
 PI * 2 More...
 
const double PI4 = Math.PI * 4
 PI * 4 More...
 
const double RAD2DEG = 180 / Math.PI
 Radians-to-degrees conversion constant. More...
 

Detailed Description

The base class of map projection.

Member Function Documentation

◆ CoordinatesToTile()

abstract void OnlineMapsProjection.CoordinatesToTile ( double  lng,
double  lat,
int  zoom,
out double  tx,
out double  ty 
)
pure virtual

Converts geographic coordinates to tile coordinates.

Parameters
lngLongitude
latLatitude
zoomZoom
txTile X
tyTile Y

Implemented in OnlineMapsProjectionWGS84, and OnlineMapsProjectionSphericalMercator.

◆ TileToCoordinates()

abstract void OnlineMapsProjection.TileToCoordinates ( double  tx,
double  ty,
int  zoom,
out double  lng,
out double  lat 
)
pure virtual

Converts tile coordinates to geographic coordinates.

Parameters
txTile X
tyTile Y
zoomZoom
lngLongitude
latLatitude

Implemented in OnlineMapsProjectionWGS84, and OnlineMapsProjectionSphericalMercator.

Member Data Documentation

◆ DEG2RAD

const double OnlineMapsProjection.DEG2RAD = Math.PI / 180

Degrees-to-radians conversion constant.

◆ PI2

const double OnlineMapsProjection.PI2 = Math.PI * 2

PI * 2

◆ PI4

const double OnlineMapsProjection.PI4 = Math.PI * 4

PI * 4

◆ RAD2DEG

const double OnlineMapsProjection.RAD2DEG = 180 / Math.PI

Radians-to-degrees conversion constant.