Package | com.google.maps |
Class | public class TileLayerBase |
Inheritance | TileLayerBase ![]() |
Implements | ITileLayer |
Method | Defined by | ||
---|---|---|---|
TileLayerBase(copyrightCollection:ICopyrightCollection, minResolution:Number, maxResolution:Number, alpha:Number)
Constructs a TileLayerBase instance.
| TileLayerBase | ||
getAlpha():Number
Returns the opacity (alpha value) of this tile layer.
| TileLayerBase | ||
Retrieves the copyright collection responsible for handling copyright
for this tile layer.
| TileLayerBase | ||
Retrieves the map type for this tile layer.
| TileLayerBase | ||
getMaxResolution():Number
Returns the finest zoom level.
| TileLayerBase | ||
getMinResolution():Number
Returns the coarsest zoom level.
| TileLayerBase | ||
loadTile(tilePos:Point, zoom:Number):DisplayObject
Creates and loads a tile (x, y) at the given zoom level.
| TileLayerBase | ||
setMapType(mapType:IMapType):void
Sets the map type for this tile layer.
| TileLayerBase |
TileLayerBase | () | constructor |
public function TileLayerBase(copyrightCollection:ICopyrightCollection, minResolution:Number, maxResolution:Number, alpha:Number)
Constructs a TileLayerBase instance. This should be called only from within the constructor of a class that extends TileLayerBase.
ParameterscopyrightCollection:ICopyrightCollection |
|
minResolution:Number |
|
maxResolution:Number |
|
alpha:Number |
package com.mycompany.maps { import com.google.maps.TileLayerBase; public class MyTileLayer extends TileLayerBase { public function MyTileLayer(copyrightCollection:ICopyrightCollection, minResolution:Number = NaN, maxResolution:Number = NaN, alpha:Number=Alpha.OPAQUE) { super(copyrightCollection, minResolution, maxResolution, alpha); } } // : // Overridden methods to implement a custom tile layer // : }
getAlpha | () | method |
public function getAlpha():Number
Returns the opacity (alpha value) of this tile layer. The range of values for getAlpha() is [0,1]. A value of 0 means that the layer is invisible (fully transparent); a value of 1, fully opaque.
ReturnsNumber — The opacity (alpha) for this tile layer.
|
getCopyrightCollection | () | method |
public function getCopyrightCollection():ICopyrightCollection
Retrieves the copyright collection responsible for handling copyright for this tile layer.
ReturnsICopyrightCollection —
Layer's copyright collection object;
|
getMapType | () | method |
public function getMapType():IMapType
Retrieves the map type for this tile layer.
ReturnsIMapType —
Map type.
|
getMaxResolution | () | method |
public function getMaxResolution():Number
Returns the finest zoom level.
ReturnsNumber — Maximum resolution.
|
getMinResolution | () | method |
public function getMinResolution():Number
Returns the coarsest zoom level.
ReturnsNumber — Minimum resolution.
|
loadTile | () | method |
public function loadTile(tilePos:Point, zoom:Number):DisplayObject
Creates and loads a tile (x, y) at the given zoom level. You must override this and return a DisplayObject holding your custom tile. Do not call the base class version of this method in your sub-class' implementation.
ParameterstilePos:Point — Tile coordinates.
|
|
zoom:Number — Tile zoom.
|
DisplayObject — Display object representing the tile.
|
public override function loadTile( tilePos:Point, zoom:Number):DisplayObject { var loader:Loader = new Loader(); var tileUrl:String = "http://tiles.mycompany.com/tile_" + tilePos.x + "_" + tilePos.y + "_" + zoom + ".png"; loader.load(new URLRequest(tileUrl)); return loader; }
setMapType | () | method |
public function setMapType(mapType:IMapType):void
Sets the map type for this tile layer.
ParametersmapType:IMapType — Map type.
|