C# Class GPSTD_RM.TileSystem

Show file Open project: dideler/gps-tower-defense

Public Methods

Method Description
Clip ( double n, double minValue, double maxValue ) : double

Clips a number so that it falls within specified minimum and maximum values.

LatLongToPixelXY ( GeoCoordinate geoCoordinate, int levelOfDetail ) : Vector2

Converts a point from latitude/longitude WGS-84 coordinates (in degrees) into pixel XY coordinates at a specified level of detail.

Pixel coordinates are relative to the entire map image.

LatLongToPixelXY ( double latitude, double longitude, int levelOfDetail ) : Vector2

Converts a point from latitude/longitude WGS-84 coordinates (in degrees) into pixel XY coordinates at a specified level of detail.

Pixel coordinates are relative to the entire map image.

MapSize ( int levelOfDetail ) : uint

Determines the map width and height (in pixels) at a specified level of detail.

PixelXYToLatLong ( Vector2 pixelPosition, int levelOfDetail ) : GeoCoordinate

Converts a pixel from pixel XY coordinates at a specified level of detail into latitude/longitude WGS-84 coordinates (in degrees).

Pixel coordinates are relative to the entire map image.

PixelXYToLatLong ( double pixelX, double pixelY, int levelOfDetail ) : GeoCoordinate

Converts a pixel from pixel XY coordinates at a specified level of detail into latitude/longitude WGS-84 coordinates (in degrees).

Pixel coordinates are relative to the entire map image.

Method Details

Clip() public static method

Clips a number so that it falls within specified minimum and maximum values.
public static Clip ( double n, double minValue, double maxValue ) : double
n double The number to clip.
minValue double Minimum allowed value.
maxValue double Maximum allowed value.
return double

LatLongToPixelXY() public static method

Converts a point from latitude/longitude WGS-84 coordinates (in degrees) into pixel XY coordinates at a specified level of detail.
Pixel coordinates are relative to the entire map image.
public static LatLongToPixelXY ( GeoCoordinate geoCoordinate, int levelOfDetail ) : Vector2
geoCoordinate GeoCoordinate The WGS-84 coordinate to convert.
levelOfDetail int Level of detail, from 1 (lowest detail) to 23 (highest detail).
return Vector2

LatLongToPixelXY() public static method

Converts a point from latitude/longitude WGS-84 coordinates (in degrees) into pixel XY coordinates at a specified level of detail.
Pixel coordinates are relative to the entire map image.
public static LatLongToPixelXY ( double latitude, double longitude, int levelOfDetail ) : Vector2
latitude double Latitude of the point, in degrees.
longitude double Longitude of the point, in degrees.
levelOfDetail int Level of detail, from 1 (lowest detail) to 23 (highest detail).
return Vector2

MapSize() public static method

Determines the map width and height (in pixels) at a specified level of detail.
public static MapSize ( int levelOfDetail ) : uint
levelOfDetail int Level of detail, from 1 (lowest detail) to 23 (highest detail).
return uint

PixelXYToLatLong() public static method

Converts a pixel from pixel XY coordinates at a specified level of detail into latitude/longitude WGS-84 coordinates (in degrees).
Pixel coordinates are relative to the entire map image.
public static PixelXYToLatLong ( Vector2 pixelPosition, int levelOfDetail ) : GeoCoordinate
pixelPosition Vector2 Vector containing the coordinate of the point, in pixels.
levelOfDetail int Level of detail, from 1 (lowest detail) to 23 (highest detail).
return GeoCoordinate

PixelXYToLatLong() public static method

Converts a pixel from pixel XY coordinates at a specified level of detail into latitude/longitude WGS-84 coordinates (in degrees).
Pixel coordinates are relative to the entire map image.
public static PixelXYToLatLong ( double pixelX, double pixelY, int levelOfDetail ) : GeoCoordinate
pixelX double X coordinate of the point, in pixels.
pixelY double Y coordinates of the point, in pixels.
levelOfDetail int Level of detail, from 1 (lowest detail) to 23 (highest detail).
return GeoCoordinate