| Package | com.afcomponents.umap.providers |
| Class | public class MapType |
| Implements | IMapType |
| Subclasses | ArcGISMapType |
You can use it to define custom map types. Each map type should contain one or more ITileLayer objects.
Use TileLayer class for the default implemetation of this interface.
See also
| Property | Defined by | ||
|---|---|---|---|
| caption : String
Gets or sets map types caption that will be used in the
MapTypeControl. | MapType | ||
| copyrightMessage : String
Gets or sets the copyright message prefix.
| MapType | ||
| errorMessage : String
Gets or sets the error message that will be displayed if tile data is unavailable.
| MapType | ||
| layerCount : uint [read-only]
Returns the number of
ITileLayer objects registered with the map type. | MapType | ||
| layers : Array [read-only]
Returns an Array which holds ITileLayer objects registered with the map type.
| MapType | ||
| linkColor : uint
Gets or sets the text color of the temrs of use link.
| MapType | ||
| maxZoom : uint
Returns maximum zoom level for the map type.
| MapType | ||
| minZoom : uint
Returns minimum zoom level for the map type.
| MapType | ||
| name : String
Returns the name of the map type.
| MapType | ||
| projection : IProjection
Gets or sets the
IProjection that should be used with this map type. | MapType | ||
| serverCount : uint [read-only]
Indicates the tile size in pixels.
| MapType | ||
| textColor : uint
Gets or sets the text color of the copyright message.
| MapType | ||
| Method | Defined by | ||
|---|---|---|---|
|
MapType(name:String, textColor:uint = 0x000000, linkColor:uint = 0x7777CC, caption:String = null, errorMessage:String = "", copyrightMessage:String = "")
Creates new MapType object.
| MapType | ||
|
addLayer(layer:ITileLayer):void
Adds new
ITileLayer object to the tile layer collection. | MapType | ||
|
dispose():void
Releases all the resources accuired by the object.
| MapType | ||
|
getCopyrights(bounds:LatLngBounds, zoom:Number):String
Returns an String with the copyright message for the specified view bounds and zoom level.
| MapType | ||
|
toString():String
Returns a textual representation of the object.
| MapType | ||
| caption | property |
caption:String [read-write]
Gets or sets map types caption that will be used in the MapTypeControl.
public function get caption():String
public function set caption(value:String):void
| copyrightMessage | property |
copyrightMessage:String [read-write]Gets or sets the copyright message prefix.
Implementation public function get copyrightMessage():String
public function set copyrightMessage(value:String):void
| errorMessage | property |
errorMessage:String [read-write]Gets or sets the error message that will be displayed if tile data is unavailable.
Implementation public function get errorMessage():String
public function set errorMessage(value:String):void
| layerCount | property |
layerCount:uint [read-only]
Returns the number of ITileLayer objects registered with the map type.
public function get layerCount():uint
| layers | property |
layers:Array [read-only]Returns an Array which holds ITileLayer objects registered with the map type.
Implementation public function get layers():Array
| linkColor | property |
linkColor:uint [read-write]Gets or sets the text color of the temrs of use link.
Implementation public function get linkColor():uint
public function set linkColor(value:uint):void
| maxZoom | property |
maxZoom:uint [read-write]Returns maximum zoom level for the map type.
Implementation public function get maxZoom():uint
public function set maxZoom(value:uint):void
| minZoom | property |
minZoom:uint [read-write]Returns minimum zoom level for the map type.
Implementation public function get minZoom():uint
public function set minZoom(value:uint):void
| name | property |
name:String [read-write]Returns the name of the map type.
Implementation public function get name():String
public function set name(value:String):void
| projection | property |
projection:IProjection [read-write]
Gets or sets the IProjection that should be used with this map type.
By default the MercatorProjection is used.
public function get projection():IProjection
public function set projection(value:IProjection):void
| serverCount | property |
serverCount:uint [read-only]Indicates the tile size in pixels. Default 256.
Implementation public function get serverCount():uint
| textColor | property |
textColor:uint [read-write]Gets or sets the text color of the copyright message.
Implementation public function get textColor():uint
public function set textColor(value:uint):void
| MapType | () | constructor |
public function MapType(name:String, textColor:uint = 0x000000, linkColor:uint = 0x7777CC, caption:String = null, errorMessage:String = "", copyrightMessage:String = "")Creates new MapType object.
Specify name of the map type and additional parameters.
Don't forget to add at least one ITileLayer object that will be used to display the map data.
name:String — Map type's name
|
|
textColor:uint (default = 0x000000) — Color of the copyright text.
|
|
linkColor:uint (default = 0x7777CC) — Color of the terms of use link.
|
|
caption:String (default = null) — Map type's caption that will be displayed in the MapTypeControl's button. If ommited, equals map type's name.
|
|
errorMessage:String (default = "") |
|
copyrightMessage:String (default = "") |
See also
| addLayer | () | method |
public function addLayer(layer:ITileLayer):void
Adds new ITileLayer object to the tile layer collection.
Please note that after adding new tile layer, minimum, maximum zoom levels, and server counter will be updated.
layer:ITileLayer — Valid ITileLayer object.
|
| dispose | () | method |
public function dispose():voidReleases all the resources accuired by the object.
| getCopyrights | () | method |
public function getCopyrights(bounds:LatLngBounds, zoom:Number):StringReturns an String with the copyright message for the specified view bounds and zoom level.
Parametersbounds:LatLngBounds |
|
zoom:Number |
String |
| toString | () | method |
public function toString():String
Returns a textual representation of the object.
Template: (property name=value, property name=value, ...)
String |