MapDescription

A class that describes the content of a map.

Property

Type

Description

BackgroundSymbol

FillSymbol

The background fill of the map.

CustomGraphics

GraphicElement[]

An array of graphics to render in a map.

GeoTransformation

GeoTransformation

The datum transform used to draw a map.

HonorLayerReordering

bool

Indicates if this object's custom layer order is honored

LayerDescriptions

LayerDescription[]

An array of layer descriptions in a map. Each layer is represented by a layer description.

MapArea

MapArea

The map area (extent) used to draw the map.

Name

string

Name of the map.

Rotation

double

The angle/rotation of the map in degrees, measured anti-clockwise.

SelectionColor

Color

Default selection color for all layers.

SpatialReference

SpatialReference

The spatial reference (projection) used to draw the map.

TimeReference

TimeReference

Allows the client to pass in a TimeValue in some other time zone other than the map service's.

TimeRelation

esriTimeRelation

Time relation for the time query

TimeValue

TimeValue

At or during what time the features will be displayed or queried.

TransparentColor

Color

The color rendered completely transparent when the map is drawn.

Remarks

This object is used to both access map properties and change map settings. Properties on this object can be set to change how map images are rendered by a map service. Please note the difference between MapServerInfo and this class. MapServerInfo is only designed to retrieve information about a map, such as the name of the map or a layer. Properties on MapServerInfo cannot be changed to alter map display.

Setting a transparent color is only valid for image formats that support transparency. These include: png, png24 and gif. A transparent color can also be set on ImageDisplay. The color set for ImageDisplay takes precedence over the transparent color set in the this object.

Use the SpatialReference property to retrieve or set a spatial reference for a map. If the spatial reference for a map has been changed, remember to assign the new spatial reference to any subsequent geometry used to change the map area or to identify or to select features.

Use the SelectionColor property when you wish to change the default selection color for all layers in the map. The default selection color is cyan. This color applies to all layers within the map. If you want to use different selection colors for individual layers, use SelectionColor on LayerDescription. The default selection symbols for a map are: a circle for points, a solid line for lines and a hollow fill (solid outline) for polygons. If you want to change the selection symbol for a layer, use SelectionSymbol on LayerDescription.

The default MapDescription for a data frame contains the default description properties for a map it will generate. The default MapDescriptioncan be retrieved via the MapServerInfo.DefaultMapDescription property. The MapDescription object can be modified to change contents and properties of the generated map image. A number of modifications can be implemented.

One of the main purposes of time aware map service is that a client can see how things changed over the time. In order to see the position of a feature at a given time instance or time span, you need to set TimeValue to the MapDescription which will be used with ExportMapImage to produce map image for that time.

When TimeReference is set to Null, MapServer assumes the TimeValue is in layer's TimeReference while searching features from layer. For example, there may be two layers in the map, one is in Pacific Standard Time (PST) and the other is in Eastern Standard Time (EST). If the TimeValue you are passing in is PST, but you have TimeReference is set to Null, when MapServer searches for feature for the first layer, it will assume the input TimeValue is in PST and find the correct features. While it searches for the features from the second layer, it will assume the input TimeValue is in EST and will get incorrect features.

HonorLayerReordering

When it is False, the order of LayerDescription objects in IMapDescription::LayerDescriptions array as well as any dynamically added LayerDesription object are ignored.

If you sent this value to True, then MapServer:

  • honors the order of LayerDescription objects in LayerDescriptions array while drawing or identifying
  • allows per-request addition of a new layer dynamically from registered workspace or removal of any existing layer.

Note: setting this value has no effect unless enabledDynamicLayers property of a mapservice is set to True by the author. SupportsDynamicLayers property of MapServerInfo returns the value set by the author.

Warning: moving group layer may have unexpected result.

10/23/2013