GeoMOOSE base layer.
Do NOT forget to include a GeoMOOSE.registerMapSourceType() directive at the end of subclasses.
GeoMOOSE. | GeoMOOSE base layer. |
Variables | |
mapbookType | The matching “type” attribute from the mapbook XML |
_ol_layer | The OpenLayers Object Managed by the GeoMOOSE layer |
path | The root path of the MapSource. |
cssName | CSS Friendly identifier for the MapSource. |
params | Used to hold the “parameters” found in the mapbook. |
paths | A list of the matching paths for this layer. |
title | Title for the layer |
titles | A hash of the titles keyed on layer path. |
metadata | A hash of the metadata URLs keyed on layer path. |
controls | A hash of OL controls supported by the layer. |
clearPopupsOnMove | Toggle whether to clear popups when the user moves the mouse. |
displayInLayerSwitcher | Toggles whether the map source should be displayed in any of the layer-by-layer catalogs. |
Functions | |
_parseParams | Parse the Mapbook parameters for a map-source |
_parseLayers | Parses the <layer/>s from a Mapbook Entry |
onLayersChange() | Called every time a change is made to the visible layers list. |
_getLayersList() | Returns an array of current layers. |
getStatusDifferences() | Returns a two element object with lists for “on” and “off”, representing layers that are currently different than their definition in the mapbook. |
getLayerByName() | Returns a layer by name. |
isVisible() | By default the isVisible checks to see if any layers are “on”. |
preParseNode(mapbook_xml) | Can be overridden to convert some layer types (e.g. |
constructor | Creates a new instance of a GeoMOOSE MapSource. |
checkPath | Checks to see if this is a matching path for this layer. |
setVisibility | Turn a layer on or off. |
addToMap | Adds the MapSource to the map. |
Variables | |
printable | Indication whether this MapSource is printable. |
Functions | |
isPrintable | Check whether the .printable flag is set. |
_createBlankLayer | Creates a “blank” WMS layer stub to preserve the behavior of a layer when a library is missing. |
deactivate | Deactivates any of the layer controls. |
asLayer | Return a representation of the MapSource as a GeoMOOSE.Layer class. |
The matching “type” attribute from the mapbook XML
mapbookType: null
The OpenLayers Object Managed by the GeoMOOSE layer
_ol_layer: null
The root path of the MapSource.
path: ""
CSS Friendly identifier for the MapSource.
cssName: ""
Used to hold the “parameters” found in the mapbook.
params: {}
A list of the matching paths for this layer.
paths: []
Title for the layer
title: null
A hash of the titles keyed on layer path.
titles: {}
A hash of the metadata URLs keyed on layer path.
metadata: {}
A hash of OL controls supported by the layer.
controls: {}
Toggle whether to clear popups when the user moves the mouse.
clearPopupsOnMove: false
Toggles whether the map source should be displayed in any of the layer-by-layer catalogs.
displayInLayerSwitcher: true
Parse the Mapbook parameters for a map-source
_parseParams: function( mapbook_entry )
Parses the layer/s from a Mapbook Entry
_parseLayers: function( mapbook_entry )
Called every time a change is made to the visible layers list.
onLayersChange: function ( path, visibility )
Returns an array of current layers.
_getLayersList: function()
Returns a two element object with lists for “on” and “off”, representing layers that are currently different than their definition in the mapbook.
getStatusDifferences: function()
Returns a layer by name.
getLayerByName: function( name )
By default the isVisible checks to see if any layers are “on”.
isVisible: function()
Can be overridden to convert some layer types (e.g.
preParseNode: function( mapbook_xml )
Creates a new instance of a GeoMOOSE MapSource.
constructor: function( mapbook_entry )
Checks to see if this is a matching path for this layer.
checkPath: function( path )
Turn a layer on or off.
setVisibility: function( path, visibility )
Adds the MapSource to the map.
addToMap: function( map )
Indication whether this MapSource is printable.
printable: false
Check whether the .printable flag is set.
isPrintable: function()
Creates a “blank” WMS layer stub to preserve the behavior of a layer when a library is missing.
_createBlankLayer: function( name )
Deactivates any of the layer controls.
deactivate: function()
Return a representation of the MapSource as a GeoMOOSE.Layer class.
asLayer: function()