Utility class with methods to convert Lat Long locations to Tile Coordinates

Namespace:  EGIS.ShapeFileLib
Assembly:  EGIS.ShapeFileLib (in EGIS.ShapeFileLib.dll)

Syntax

Visual Basic
Public NotInheritable Class TileUtil
C#
public sealed class TileUtil
Visual C++
public ref class TileUtil sealed
JavaScript
EGIS.ShapeFileLib.TileUtil = function();

Type.createClass(
	'EGIS.ShapeFileLib.TileUtil');

Remarks

The TileUtil class is used by the EGIS.Web.Controls TiledSFMap to convert map tile image requests to actual Lat Long position and zoom level for rendering purposes

Note that in order to use Map tiles the [!:EGIS.ShapeFileLib.ShapeFile.UseMercatorProjection] property must be set to true

Tiles are organised in a manner similar to the approach used by google maps and bing maps. Each tiles dimension is by default 256x256 pixels. A tile request is made up of a zoom-level between 0 and 16(inclusive), tile x-ccord and a tile y-coord. At zoom-level 0 the entire world (-180 lon -> +180 lon) is scaled to fit in 1 tile. At level 1 the world will fit in 2 tiles x 2 tiles, at level 2 the world will fit into 4 tiles x 4 tiles, .. etc.

Tiles are numbered from zero in the upper left corner to (NumTiles at zoom-level)-1 as below:

 Copy imageCopy Code
            (0,0) (1,0) (2,0) ..
            (0,1) (1,1) (2,1) ..
            (0,2) (1,2) (2,2) ..
            ..
            

Inheritance Hierarchy

System..::..Object
  EGIS.ShapeFileLib..::..TileUtil

See Also

[!:EGIS.ShapeFileLib.ShapeFile.UseMercatorProjection]