Packagecom.google.maps
Classpublic class TileLayerBase
InheritanceTileLayerBase Inheritance com.google.maps.wrappers.WrapperBase
ImplementsITileLayer

TileLayerBase is an abstract base class used to provide custom tile layers for the map. Sub-class this and override the appropriate methods to create a custom tile layer. You must override the loadTile() method. You are free to override the other methods as necessary for your application.



Public Methods
 MethodDefined 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
  
Returns the finest zoom level.
TileLayerBase
  
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
Constructor detail
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.

Parameters
copyrightCollection:ICopyrightCollection
 
minResolution:Number
 
maxResolution:Number
 
alpha:Number

Example
   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
     //  :
   }

Method detail
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.

Returns
Number — 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.

Returns
ICopyrightCollection — Layer's copyright collection object;
getMapType()method 
public function getMapType():IMapType

Retrieves the map type for this tile layer.

Returns
IMapType — Map type.
getMaxResolution()method 
public function getMaxResolution():Number

Returns the finest zoom level.

Returns
Number — Maximum resolution.
getMinResolution()method 
public function getMinResolution():Number

Returns the coarsest zoom level.

Returns
Number — 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.

Parameters
tilePos:Point — Tile coordinates.
 
zoom:Number — Tile zoom.

Returns
DisplayObject — Display object representing the tile.

Example
   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.

Parameters
mapType:IMapType — Map type.