Provides access to members that serve tiled maps.
| Description | ||
|---|---|---|
![]() |
GetCacheName | Gets the cache name for a given layer within a map. |
![]() |
GetLayerTile | Gets a tile for a given tile location from a given layer. |
![]() |
GetMapTile | Gets a tile for a given tile location from a given map. |
![]() |
GetTileCacheInfo | Gets the cache configuration for a given map. |
![]() |
GetVirtualCacheDirectory | Gets the virtual cache directory for a given layer within a map. |
![]() |
HasLayerCache | Indicates if a given layer has a single tile cache. |
![]() |
HasSingleFusedMapCache | Indicates if a given map has a single fused map tile cache. |
![]() |
IsFixedScaleMap | Indicates if a given map is a fixed scale map. |
| CoClasses and Classes | Description |
|---|---|
| MapServer | The MapServer component provides programmatic access to the contents of a map document on disk, and creates images of the map contents based on user requests. Designed for use in building map-based web services and web applications. |
A tiled map has a number of LODs (Levels of Detail). Each LOD, which corresponds to a map at given map scale, contains many tiles. Each tile consists of pixels, and number of pixels in a tile (described as TileROWs and TileCOLs) is the same at all levels, but the pixel size, in map space, of a tile varies with LOD.
The ITiledMapServer, ITileCacheInfo and ILODInfo interfaces are used to access a tiled map that is served through ArcGIS Server.
To get the pixel size (in map space) at a given LOD, use following code snippet:
Dim pTiledMap As ITiledMapServer
Dim pTileCacheInfo As ITileCacheInfo
Set pTiledMapInfo = pMapServer
Set pTileCacheInfo = pTiledMap.GetTileCacheInfo("usa")
Dim Resolution As Double
Dim pLODInfos As ILODInfos
Dim pLODInfo As ILODInfo
Set pLODInfos = pTileCacheInfo.LODInfos
Set pLODInfo = pLODs.Element(i)
Resolution = pLOD.Resolution
The dimension of a tile can be retrieved by ITileMapServer::TileRows and TileCols respectively.
TileRows = pTiledMap::TileRows TileCols = pTiledMap::TileCols
Each tile is assigned a row and column number (TROW, TCOL) in a tile coordinate system. TROW, which starts from 0, increases from ‘top to bottom’ (i.e tile row number increases as map y coordinate decreases). TCOL, also starting from 0, increases from ‘left to right’ (i.e. tile column number increases as map x coordinate increases).
The size of tile, in map space, at a given LOD can be obtained by:
TileWidth = TileCols * Resolution
TileHeight = TileRows * Resolution
The tiling origin, in map space, is the same for all LODs, and can be obtained from ITileCacheInfo.Origin property.
xorigin = pTileCacheInfo.Origin.X yorigin = pTileCacheInfo.Origin.Y
Given a map coordinate (x, y) the tile coordinates (TCOL, TROW) of the tile containing it for a given LOD are given by:
TCOL = floor ( (x – xorigin) / TileWidth ) TROW = floor ( (yorigin – y) / TileHeight )
The corner points in map coordinates of a tile with tile coordinates (TROW, TCOL) are:
xmin = xorigin + (TCOL * TileWidth)
xmax = xmin + TileWidth
ymax = yorigin - (TROW * TileHeight)
ymin = ymax - TileHeight
Tiles are semi-open, include the boundaries corresponding to xmin, ymax.