Common 2D/3D event
LayerChanged Event. Triggered when one of the map's layers has changed in some way :
- If a layer has be removed from the map, property layerRemoved will host the removed layer definition.
- If a layer has be added to the map, property layerAdded will host the added layer definition.
- If properties (among visibility, opacity, position and grayScaled) of a layer has changed, property layerChanged will host the modified layer definition and property, oldValue and newValues will host the modified property with its old and new value.
One can listen to this event with Gp.Map.listen() method
Properties:
Name | Type | Description |
---|---|---|
layerAdded | Object | definition of the layer that has been added : object key is the layer Id and object value is a Gp.LayerOptions object. |
layerRemoved | Object | definition of the layer that has been removed : object key is the layer Id and object value is a Gp.LayerOptions object. |
layerChanged | Object | definition of the layer that has been modified : object key is the layer Id and object value is a Gp.LayerOptions object. |
property | String | layer property name that has changed |
oldValue | String | old layer property value |
newValue | String | new layer property value |