LayerDrawingDescription

Derived Types: FeatureLayerDrawingDescription, RasterLayerDrawingDescription

An abstract class that groups together its drawing description derived types.

Remarks

By setting this property, a user can override how features of an existing layer in a map service are drawn. The user can also set the renderer for a new layer added to a map service dynamically. MapServer does not allow all layer type drawing descriptions to be modified. Please check MapLayerInfo CanModifyDrawingDescription property to find out whether you can change the renderer.

It is important to note that this is a stateless change. MapServer does not remember this change for the next request, which means that once the request is processed, MapServer does not remember that change and the next request is received. MapServer processes the request with the layer's original state (the way it is defined in the source map document).

To set the layer back to its original state in your application session, you can set this property to Null or get the DefaultMapDescription from the server by calling the GetServerInfo function.

You can create a new DrawingDescription object with the new renderer and set the object to this property. Sometimes you may want to modify a symbol for only one type of feature (in the case of UniqueValueRenderer) or a symbol of a ClassBreak. In this case, you can get the default renderer information by calling GetDefaultLayerDrawingDescription, then modify it and set it to this property. Note that GetDefaultLayerDrawingDescription may return a simplified version of the symbol or a renderer that may not be supported.

MapServer also has a helper function to assist you create the renderer. You can use the GenerateDataClasses method to get the UniqueValueRenderer or ClassBreaksRenderer created by MapServer.

11/8/2016