Map service QueryRasterValue method

Queries and returns raster images in JPEG, PNG or TIFF format as a URL or mime data.

QueryRasterValue(string MapName, int SourceTableID, int[ ] RowIDs, string FieldName, ImageType RasterValueType)

Parameter

Description

MapName

The name of the map (data frame) that contains the layer associated with the SourceTableID parameter.

SourceTableID

The layer or standalone table id of the source layer or table.

RowIDs

An array of integers contains unique identifiers for feature or row (ObjectID) in the source layer or table to be queried.

FieldName

The name of raster field (Optional).

RasterValueType

Out image type and return type - URL or mime (Optional).

Return Value

An array of ImageResult objects, each has the return mime type and either the URL to the image or the mime data itself.

Remarks

The ID property of MapLayerInfo or StandaloneTableInfo is used as SourceTableID.

The ImageResult objects in the resultant array are returned in the same order the OIDs are passed in. If the feature does not have any raster data, a null is returned.

RasterFieldName is optional since a layer can have only one raster field. In case of join, you may need to pass in the field name, if an empty string is passed the raster field from the base table will be used.

RasterValueType is optional as well. When a null is passed in as RasterValueType, JPEG and URL are used as the default image format and returned type.

11/8/2016