Packagecom.afcomponents.umap.providers
Classpublic class TileLayer
ImplementsITileLayer
SubclassesBirdsEyeTileLayer, ZoomifyTileLayer

TileLayer class provides the default implemetation for the ITileLayer interface.



Public Properties
 PropertyDefined by
  alpha : Number
TileLayer
  baseURL : String
TileLayer
  copyright : String
TileLayer
  mapType : IMapType
Gets or sets the associated map type.
TileLayer
  maxZoom : uint
TileLayer
  minZoom : uint
TileLayer
  noError : Boolean
TileLayer
  servers : Array
[read-only]
TileLayer
  version : String
TileLayer
Public Methods
 MethodDefined by
  
TileLayer(baseURL:String = null, minZoom:uint = 0, maxZoom:uint = 0, noError:Boolean = false, version:String = "", alpha:Number = 1.0, copyright:String = null)
TileLayer
  
addServer(server:String):void
TileLayer
  
dispose():void
Releases all the resources accuired by the object.
TileLayer
  
getServerURL(url:String, server:uint = 0):String
TileLayer
  
getTileURL(tile:Point, zoom:uint):String
Returns the URL of the map tile with the specified position and zoom level.
TileLayer
  
toString():String
TileLayer
Property detail
alphaproperty
alpha:Number  [read-write]

Implementation
    public function get alpha():Number
    public function set alpha(value:Number):void
baseURLproperty 
baseURL:String  [read-write]

Implementation
    public function get baseURL():String
    public function set baseURL(value:String):void
copyrightproperty 
copyright:String  [read-write]

Implementation
    public function get copyright():String
    public function set copyright(value:String):void
mapTypeproperty 
mapType:IMapType  [read-write]

Gets or sets the associated map type.

Implementation
    public function get mapType():IMapType
    public function set mapType(value:IMapType):void
maxZoomproperty 
maxZoom:uint  [read-write]

Implementation
    public function get maxZoom():uint
    public function set maxZoom(value:uint):void
minZoomproperty 
minZoom:uint  [read-write]

Implementation
    public function get minZoom():uint
    public function set minZoom(value:uint):void
noErrorproperty 
noError:Boolean  [read-write]

Implementation
    public function get noError():Boolean
    public function set noError(value:Boolean):void
serversproperty 
servers:Array  [read-only]

Implementation
    public function get servers():Array
versionproperty 
version:String  [read-write]

Implementation
    public function get version():String
    public function set version(value:String):void
Constructor detail
TileLayer()constructor
public function TileLayer(baseURL:String = null, minZoom:uint = 0, maxZoom:uint = 0, noError:Boolean = false, version:String = "", alpha:Number = 1.0, copyright:String = null)

Parameters
baseURL:String (default = null)
 
minZoom:uint (default = 0)
 
maxZoom:uint (default = 0)
 
noError:Boolean (default = false)
 
version:String (default = "")
 
alpha:Number (default = 1.0)
 
copyright:String (default = null)
Method detail
addServer()method
public function addServer(server:String):void

Parameters
server:String
dispose()method 
public function dispose():void

Releases all the resources accuired by the object.

getServerURL()method 
public function getServerURL(url:String, server:uint = 0):String

Parameters
url:String
 
server:uint (default = 0)

Returns
String
getTileURL()method 
public function getTileURL(tile:Point, zoom:uint):String

Returns the URL of the map tile with the specified position and zoom level. Position of a tile is described by a Point object with the x and y properties.

This function has a default implemetation. It takes the URL from _baseURL property, replaces wildcards with the relevant information based on tile index and zoom level, and finally returns the result.

Here is the list of metadata tags that will be replaced:

WildcardDescriptionExample
[x] X-coordinate of the tile For a (2,5) tile, [x] is replaced by "2" (without the quotes).
[y] Y-coordinate of the tile For a (2,5) tile, [y] is replaced by "5" (without the quotes).
[z] Zoom level For a zoom level = 3, [z] is replaced by "3" (without the quotes).
[t] Tile coordinates and zoom level are reperesented by a single "qrst" string. Used by Google Maps Satellite Images. For a (2,5) tile, and zoom level = 3, [t] is replaced by "ttrt" (without the quotes).
[b] Tile coordinates and zoom level are reperesented by a single "0123" string. Used by Microsoft Tile Images. For a (2,5) tile, and zoom level = 3, [b] is replaced by "212" (without the quotes). Please note that the first zoom level (zoom=0) is omitted.
[version] A version property of the tile layer. For a verision = .ap60, [version] is replaced by ".ap60" (without the quotes).

Parameters
tile:Point — A point that describes tile positon in the bitmap coordinates.
 
zoom:uint — Zoom level of the tile.

Returns
String — A string with the URL of the requested tile.
toString()method 
public function toString():String

Returns
String