Map Service GetLayerTile method

Gets the image tile from a layer cache for a specific location.

 

GetLayerTile(string MapName, int LayerID, int Level, int Row, int Column, string Format)

 

Parameter

Description

MapName

The name of the map (data frame) that contains a layer cache.

LayerID

The layer id of the layer on which a cache is available.

Level

The level of detail (scale) of the layer cache from which a tile will be retrieved.

Row

The row in which a tile is located. Row values start at 0 from top of each cache level.

Column

The column in which a tile is located. Column values start at 0 from the left of each cache level.

Format

The image format to retrieve from a cache. This defines the file extension to be used when retrieving the cached tile. A cache can be generated in multiple image formats.  

 

Return Value

 

A byte array (byte[]) containing the raw image content. The image format for the layer cache can be discovered using the TileImageInfo object returned from a call to GetTileImageInfo on the map service proxy. If the image tile is not available, a SOAP exception will be thrown. A tile may not be generated in situations where no layer data was present in the tile extent.

 

Remarks

 

In general, this method is used to retrieve image tiles that have been pre-generated (cached) for a single layer. The cache properties such as the number and scale of levels and the physical size of image tiles in pixels can be defined by the map service administrator, thus the values can be arbitrary.

 

Examples

C#

VB.NET

Java