New to Telerik UI for WinFormsStart a free 30-day trial

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.RadMap.dll

Syntax:

C#
public static class MapTileSystemHelper

Inheritance: objectMapTileSystemHelper

Fields

C#
public const double EarthRadius = 6378137
C#
public const double MaxLatitude = 85.05112878
C#
public const double MaxLongitude = 180
C#
public const double MinLatitude = -85.05112878
C#
public const double MinLongitude = -180

Methods

Determines the ground resolution (in meters per pixel) at a specified latitude and level of detail.

C#
public static double GroundResolution(double latitude, int levelOfDetail)
Parameters:latitudedouble

Latitude (in degrees) at which to measure the ground resolution.

levelOfDetailint

Level of detail, from 1 (lowest detail) to 23 (highest detail).

Returns:

double

The ground resolution, in meters per pixel.

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

C#
public static PointL LatLongToPixelXY(double latitude, double longitude, int levelOfDetail, bool allowWraparound)
Parameters:latitudedouble

Latitude of the point, in degrees.

longitudedouble

Longitude of the point, in degrees.

levelOfDetailint

Level of detail, from 1 (lowest detail) to 23 (highest detail).

allowWraparoundbool

if set to true wraparound is allowed.

Returns:

PointL

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

C#
public static PointL LatLongToPixelXY(double latitude, double longitude, int levelOfDetail)
Parameters:latitudedouble

Latitude of the point, in degrees.

longitudedouble

Longitude of the point, in degrees.

levelOfDetailint

Level of detail, from 1 (lowest detail) to 23 (highest detail).

Returns:

PointL

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

C#
public static PointL LatLongToPixelXY(PointG location, int levelOfDetail)
Parameters:locationPointG

Location of the point, in degrees.

levelOfDetailint

Level of detail, from 1 (lowest detail) to 23 (highest detail).

Returns:

PointL

Determines the map scale at a specified latitude, level of detail, and screen resolution.

C#
public static double MapScale(double latitude, int levelOfDetail, int screenDpi)
Parameters:latitudedouble

Latitude (in degrees) at which to measure the map scale.

levelOfDetailint

Level of detail, from 1 (lowest detail) to 23 (highest detail).

screenDpiint

Resolution of the screen, in dots per inch.

Returns:

double

The map scale, expressed as the denominator N of the ratio 1 : N.

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

C#
public static long MapSize(int levelOfDetail)
Parameters:levelOfDetailint

Level of detail, from 1 (lowest detail) to 23 (highest detail).

Returns:

long

The map width and height in pixels.

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

C#
public static PointG PixelXYToLatLong(long pixelX, long pixelY, int levelOfDetail, bool allowWraparound)
Parameters:pixelXlong

X coordinate of the point, in pixels.

pixelYlong

Y coordinates of the point, in pixels.

levelOfDetailint

Level of detail, from 1 (lowest detail) to 23 (highest detail).

allowWraparoundbool

if set to true wraparound is allowed.

Returns:

PointG

PointG.

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

C#
public static PointG PixelXYToLatLong(long pixelX, long pixelY, int levelOfDetail)
Parameters:pixelXlong

X coordinate of the point, in pixels.

pixelYlong

Y coordinates of the point, in pixels.

levelOfDetailint

Level of detail, from 1 (lowest detail) to 23 (highest detail).

Returns:

PointG

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

C#
public static PointG PixelXYToLatLong(PointL point, int levelOfDetail)
Parameters:pointPointL

X and Y coordinates of the point, in pixels.

levelOfDetailint

Level of detail, from 1 (lowest detail) to 23 (highest detail).

Returns:

PointG

Converts pixel XY coordinates into tile XY coordinates of the tile containing the specified pixel.

C#
public static Point PixelXYToTileXY(long pixelX, long pixelY)
Parameters:pixelXlong

Pixel X coordinate.

pixelYlong

Pixel Y coordinate.

Returns:

Point

Converts a QuadKey into tile XY coordinates.

C#
public static void QuadKeyToTileXY(string quadKey, out int tileX, out int tileY, out int levelOfDetail)
Parameters:quadKeystring

QuadKey of the tile.

tileXint

Output parameter receiving the tile X coordinate.

tileYint

Output parameter receiving the tile Y coordinate.

levelOfDetailint

Output parameter receiving the level of detail.

Converts tile XY coordinates into pixel XY coordinates of the upper-left pixel of the specified tile.

C#
public static PointL TileXYToPixelXY(int tileX, int tileY)
Parameters:tileXint

Tile X coordinate.

tileYint

Tile Y coordinate.

Returns:

PointL

Converts tile XY coordinates into a QuadKey at a specified level of detail.

C#
public static string TileXYToQuadKey(int tileX, int tileY, int levelOfDetail)
Parameters:tileXint

Tile X coordinate.

tileYint

Tile Y coordinate.

levelOfDetailint

Level of detail, from 1 (lowest detail) to 23 (highest detail).

Returns:

string

A string containing the QuadKey.