AutoCAD Map 3D 2009 Geospatial Platform Reference

AutoCAD Map 3D Geospatial Platform API

virtual void MgLayerBase::SetLayerDefinition ( MgResourceIdentifier layerDefinition,
MgResourceService resourceService 
) [virtual]

Sets the the layer definition for this layer.

Remarks:
This method can be used to alter the definition of a layer, including the layer's data source definition or stylization rules. For example to change the Filter used to retrieve features on a FeatureLayer, the old definition can be retrieved, altered, and stored in the session repository. Then the SetLayerDefinition method can be called with the ResourceId of the altered layer definition in the session repository.
Note:
If you change the layer's definition, you must also change the cached scale ranges and force an update of any layer metadata held in the DWF Viewer's eMap.
.NET Syntax
void SetLayerDefinition(MgResourceIdentifier layerDefinition, MgResourceService resourceService);
Java Syntax
void SetLayerDefinition(MgResourceIdentifier layerDefinition, MgResourceService resourceService);
PHP Syntax
void SetLayerDefinition(MgResourceIdentifier layerDefinition, MgResourceService resourceService);

Parameters:
layerDefinition (MgResourceIdentifier) Identifier of the layer definition in a resource repository
resourceService (MgResourceService) An MgResourceService that can be used to retrieve the layer definition.
Returns:
Returns nothing.