Telogis.GeoBase.MapLayers.AbstractLayer |
MapLayers.AbstractLayer inherits from AbstractDOMEntity.
An abstract class for handling layers on a GeoStream map. Any such map in GeoStream is composed of a number of these layers which should all derive from this class. A MapLayers.TileLayer is added implicitly with the creation of the map, but other types need to be added separately. Note also that the layer created by this constructor is automatically added to the map if one is specified.
Name | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
MapLayers.AbstractLayer(config, beforeAttach) | Arguments
|
Name | Description |
---|---|
destroy () | Disassociates the layer from its map and frees the DOM nodes associated with it. This should be called after the child and objects of the layer have been destroyed. |
getZIndex () | Gets the z index of this layer |
hide () | Hides the layer from the map. See AbstractDOMEntity.hide for arguments and more information. |
removeEvent (string eventType, Function action) | Removes an event from the list of handlers. Arguments
|
setExpiry (Number expirySecs) | Sets the expiry time. When the expiry time elapses the layer will be refreshed. Arguments
|
setMap (Widgets.Map map) | Sets or changes the map to which the layer is attached, and performs appropriate initializations once having done so. Arguments
|
setZIndex () | Sets the z index of this layer. The index has to be greater than 10 and less than 80. General default values for layers are TILE: 20, PATH: 30, REGION: 40, FENCE: 50, CANVAS: 60, OBJECT: 70 |
show () | Shows the layer on the map. See AbstractDOMEntity.show for arguments and more information. |
suspend () | Prevents the MapLayers.AbstractLayer from performing any updates until MapLayers.AbstractLayer.unsuspend is called. |
unsuspend () | Allows the MapLayers.AbstractLayer to resume updates after a call to MapLayers.AbstractLayer.suspend, and also performs those updates that were missed while it was suspended. |
update (Number updateType) | The base update callback called by the MapLayers.AbstractLayer's map whenever it is updated, or by the layer itself when it is changed. This checks whether the layer is suspended, then passes control to the update() method defined by the derived class as appropriate. Arguments
|
whenAdded (Function callback) | Executes a function immediately if the layer has been added to a map. If it has not, the function is queued to be called when the layer's MapLayers.AbstractLayer.Added event handler is triggered. Arguments
|
Name | Type | Description |
---|---|---|
Added | EventHandler | An event triggered when the layer is added to a map. |
map | Widgets.Map | The Widgets.Map that the MapLayers.AbstractLayer is currently associated with. |
Removed | EventHandler | An event triggered when the layer is removed from a map. |
Update | EventHandler | Triggered when the map layer is updated. |