Class GSAbstractLayer
GSAbstractLayer is a base type for map layers.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
GSAbstractLayer(options)
Creates a new
GSAbstractLayer. |
| Property Attributes | Property Name and Description |
|---|---|
|
The layer name
|
| 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
|
|
|
remove()
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
|
|
|
toJson()
Outputs a JSON representation of this layer
|
|
|
toString()
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
trueif this layer should initially be visible on the map (defaults totrue)
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}
trueif this layer is a base layer
{boolean}
isVisible()
Returns a boolean value indicating the visibility of this layer
- Returns:
- {boolean}
trueif 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
trueif 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