This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > IT > ITiledMapServer Interface (ArcObjects .NET 10.5 SDK) |
Provides access to members that serve tiled maps. Note: the ITiledMapServer interface has been superseded byITiledMapServer2. Please consider using the more recent version.
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. |
MapServerIP | Map Server Message Proxy. |
MapServerLP | Map Server LAN Proxy. |
ITiledMapServer has methods that allow the caller to discover if a map service is cached, the type of the cache and the tiling scheme for the cache. ITiledMapServer also has methods to determine the virtual directory for the cache and methods to retrieve tiles from the cache.
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 for 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.