Web API Reference | MapGuide Open Source

- Overview
- Modules
- Classes

ForceRefresh
GetClassDefinition
GetDisplayInLegend
GetExpandInLegend
GetFeatureClassName
GetFeatureGeometryName
GetFeatureSourceId
GetGroup
GetLayerDefinition
GetLayerType
GetLegendLabel
GetName
GetObjectId
GetSelectable
GetVisible
IsVisible
MgLayerBase
NeedsRefresh
SelectAggregate
SelectFeatures
SetDisplayInLegend
SetGroup
SetLayerDefinition
SetLegendLabel
SetName
SetSelectable
SetVisible
UpdateFeatures
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.

Comments or suggestions? Send us feedback.