A control for switching between various layers. This gets the layers from the map itself. This handles special layers EMS.Layer.PHOTO and EMS.Layer.HYBRID slightly differently if they are present.
Please note that this control will only work if positioned <EMS.Position.LEFT>. You can attach it to the bottom or top but not to the right.
| EMS. | A control for switching between various layers. |
| Properties | |
| height | {Integer} is the height of the control in pixels. |
| background | {String} background image. |
| northArrow | {EMS.Control.NorthArrow} is the north arrow control. |
| position | {Mixed} is either OpenLayers.Pixel or a EMS.Position. |
| Functions | |
| destroy | |
| draw | Draws the control itself. |
| EMS. | Internal class of the EMS.Control.LayerSwitcher for rendering a button. |
| Constants | |
| FONT | {String} CSS style applied to the button if text is passed in. |
| COLOR | {String} CSS color used for text. |
| HEIGHT | {Integer} height in pixels of the button. |
| Properties | |
| layer | {OpenLayers.Layer} is the layer this button is attached to. |
| first | {Boolean} property indicating the button is first in the set. |
| last | {Boolean} property indicating the button is last in the set, it may also be first as well. |
| Constructor | |
| EMS. | |
| Functions | |
| destroy | Cleans up the listeners. |
| update | Called post draw to update any labelling. |
| draw | {DOMElement} newly created element ready for insertion. |
| isSelected | {Boolean} will return true if the button is considered selected. |
| select | Puts the button into a select state. |
| unselect | Turns the select state off. |
| EMS. | Internal class of the EMS.Control.LayerSwitcher for rendering a photo button. |
| Functions | |
| destroy | |
| draw | Extension of the button to add the hide and show link to button if there is a EMS.Layer.HYBRID available. |
| update | Called post draw to update any labelling. |
| select | Puts the button into a select state. |
| unselect | Turns the select state off. |
{EMS.Control.NorthArrow} is the north arrow control. If defaulted, it will just use the control with the default option.
{Mixed} is either OpenLayers.Pixel or a EMS.Position. This defaults to be the top left.
draw: function( px )
Draws the control itself.
| px | {Mixed} is either OpenLayers.Pixel or a EMS.Position. |
{DOMElement}
Internal class of the EMS.Control.LayerSwitcher for rendering a button.
| Constants | |
| FONT | {String} CSS style applied to the button if text is passed in. |
| COLOR | {String} CSS color used for text. |
| HEIGHT | {Integer} height in pixels of the button. |
| Properties | |
| layer | {OpenLayers.Layer} is the layer this button is attached to. |
| first | {Boolean} property indicating the button is first in the set. |
| last | {Boolean} property indicating the button is last in the set, it may also be first as well. |
| Constructor | |
| EMS. | |
| Functions | |
| destroy | Cleans up the listeners. |
| update | Called post draw to update any labelling. |
| draw | {DOMElement} newly created element ready for insertion. |
| isSelected | {Boolean} will return true if the button is considered selected. |
| select | Puts the button into a select state. |
| unselect | Turns the select state off. |
{OpenLayers.Layer} is the layer this button is attached to.
Internal class of the EMS.Control.LayerSwitcher for rendering a photo button. This is a specialised form of the EMS.Control.LayerSwitcher.Button particularly made for the EMS.Layer.PHOTO layer. The difference being between this and a normal button, there will be a link allowing turning on or off of the EMS.Layer.HYBRID layer (if it is present in the map). Inherits from:
draw: function()
Extension of the button to add the hide and show link to button if there is a EMS.Layer.HYBRID available.
destroy: function()
Draws the control itself.
draw: function( px )
Cleans up the listeners.
destroy: function()
Called post draw to update any labelling.
update: function()
{DOMElement} newly created element ready for insertion.
draw: function()
{Boolean} will return true if the button is considered selected.
isSelected: function()
Puts the button into a select state.
select: function()
Turns the select state off.
unselect: function()
destroy: function()
Extension of the button to add the hide and show link to button if there is a EMS.Layer.HYBRID available.
draw: function()
Called post draw to update any labelling.
update: function()
Puts the button into a select state.
select: function()
Turns the select state off.
unselect: function()