Class GSTileLayer

Extends GSAbstractLayer.

Implements a tiled image layer.

Class Summary
Constructor Attributes Constructor Name and Description
 
GSTileLayer(name, minZoom, maxZoom, options)
Constructs a new GSTileLayer
Property Summary
Property Attributes Property Name and Description
 
The highest zoom level of this layer.
 
The lowest zoom level of this layer.
<static>  
GSTileLayer.SATELLITE_MAP
Constant defining the satellite map tile layer
<static>  
GSTileLayer.STREET_MAP
Constant defining the street map tile layer
<static>  
GSTileLayer.TERRAIN_MAP
Constant defining the terrain map tile layer
Properties borrowed from class GSAbstractLayer:
name
Method Summary
Method Attributes Method Name and Description
 
Returns the minimum bounds (NZMG) that encompass this layer's content
 
Gets the URL to retrieve the default image tile for this tile set
 
Returns the number of zoom levels supported by this tile layer
 
Returns the layer's tile size
 
Returns a boolean value indicating the visibility of this layer
 
setVisible(visible)
Sets the visibility of this layer
 
Outputs a JSON representation of this tile layer
Methods borrowed from class GSAbstractLayer:
isBaseLayer, remove, setZIndex, toString
Class Detail
GSTileLayer(name, minZoom, maxZoom, options)
Constructs a new GSTileLayer
Parameters:
{String} name
the name of this tile layer. Will be used as the label for the tile layer on the map type control (if used as a base layer)
{int} minZoom
the minimum zoom level supported by this tile layer
{int} maxZoom
the maximum zoom level supported by this tile layer
{Object} options Optional
an object literal specifying the tile layer options to set:
{String} options.hostname
the hostname to load the tile imagery from. Loading tiles from multiple subdomains is possible by enclosing the subdomain portion of the hostname in curly brackets. At runtime the subdomain part of the hostname will be suffixed with a numerical value between 0 and 3.
{String} options.pathTemplate
the path part of the tile url. The template can be parameterized with {x}, {y}, {mpx}, {minX}, {minY}, {maxX}, and {maxY} tokens
{String} options.defaultTile
a default image to be displayed when an out of bounds tile is requested
{Function} options.getTileUrl
reference to a function which builds the URL to retrieve the image tiles. This function is called each time a tile is needed and accepts 5 arguments: the value of the hostname option, the value of the pathTemplate option, the geographic extent of the tile expressed as a GSBounds object, the mpx value for the current zoom level, and the image mimetype
{int} options.tileSize
the size of the map tiles in pixels
{GSBounds} options.maxExtent
data will not be requested that falls completely outside of these bounds
{String} options.mimetype
the map tile image format (defaults to image/png)
{boolean} options.magicMimetype
if true will automatically switch the tile mimetype to image/gif if this layer is not a base layer, the specified tile mimetype is image/png, the client is IE6, and it's desirable not to use the AlphaImageLoader filter to load the PNG images
{float} options.opacity
the opacity at which to display the tile layer
{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
{int} maxZoom
The highest zoom level of this layer.

{int} minZoom
The lowest zoom level of this layer.

<static> {String} GSTileLayer.SATELLITE_MAP
Constant defining the satellite map tile layer

<static> {String} GSTileLayer.STREET_MAP
Constant defining the street map tile layer

<static> {String} GSTileLayer.TERRAIN_MAP
Constant defining the terrain map tile layer
Method Detail
{GSBounds} getBounds()
Returns the minimum bounds (NZMG) that encompass this layer's content
Returns:
{GSBounds} the minimum bounds that encompass this layer's features

{String} getDefaultTileUrl()
Gets the URL to retrieve the default image tile for this tile set
Returns:
{String} the tile url

{int} getNumZoomLevels()
Returns the number of zoom levels supported by this tile layer
Returns:
{int} the number of zoom levels supported by this tile layer

{int} getTileSize()
Returns the layer's tile size
Returns:
{int} the layer's tile size

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

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

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

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