Class GSAbstractLayer

GSAbstractLayer is a base type for map layers.

Class Summary
Constructor Attributes Constructor Name and Description
 
GSAbstractLayer(options)
Creates a new GSAbstractLayer.
Property Summary
Property Attributes Property Name and Description
 
The layer name
Method Summary
Method Attributes Method Name and Description
 
Returns the minimum bounds (NZMG) that encompass this layer's content
 
Returns true if this layer is a base layer
 
Returns a boolean value indicating the visibility of this layer
 
Called by the map when removing this layer
 
setVisible(visible)
Sets the visibility of this layer
 
setZIndex(zIndex)
Sets the z-index property of this layer
 
Outputs a JSON representation of this layer
 
Returns a string representation of this layer for debugging purposes
Class Detail
GSAbstractLayer(options)
Creates a new GSAbstractLayer. This class should not be instantiated directly but subclassed to provide layering of new content types
Parameters:
{Object} options Optional
an object literal specifying options for this layer. The following options may be specified:
{int} options.zIndex
the zIndex to display this layer at
{boolean} options.visible
true if this layer should initially be visible on the map (defaults to true)
Property Detail
{String} name
The layer name
Method Detail
{GSBounds} getBounds()
Returns the minimum bounds (NZMG) that encompass this layer's content
Throws:
{Error}
if this method is not overriden by the subclass
Returns:
{GSBounds} the minimum bounds that encompass this layer's features

{boolean} isBaseLayer()
Returns true if this layer is a base layer
Returns:
{boolean} true if this layer is a base layer

{boolean} isVisible()
Returns a boolean value indicating the visibility of this layer
Returns:
{boolean} true if this layer is currently visible on the map

remove()
Called by the map when removing this layer

setVisible(visible)
Sets the visibility of this layer
Parameters:
{boolean} visible
true if this layer should be visible

setZIndex(zIndex)
Sets the z-index property of this layer
Parameters:
{int} zIndex
the zIndex to use for this layer

{String} toJson()
Outputs a JSON representation of this layer
Returns:
{String} a JSON string

{String} toString()
Returns a string representation of this layer for debugging purposes
Returns:
{String} the string representation of the features contained by this layer

Documentation generated by JsDoc Toolkit 2.3.2 on Wed Mar 07 2012 11:47:26 GMT+1300 (NZDT)