| Package | com.afcomponents.umap.providers |
| Class | public class DefaultProvider |
| Inheritance | DefaultProvider flash.events.EventDispatcher |
| Implements | IProvider |
| Subclasses | CloudMadeProvider, DummyProvider, XMLProvider |
Contains the folowing functionality:
| Property | Defined by | ||
|---|---|---|---|
| logo : DisplayObject [read-only]
Returns a display object with the provider's logo.
| DefaultProvider | ||
| mapTypes : Array [read-only]
Array which holds map types supported by this Provider.
| DefaultProvider | ||
| Property | Defined by | ||
|---|---|---|---|
| _core : UMap
Reference to the core UMap class.
| DefaultProvider | ||
| _logo : DisplayObject
Display object which containes the provider logo.
| DefaultProvider | ||
| _logoURL : URLRequest
URI of the provider logo.
| DefaultProvider | ||
| _mapTypes : Array
Array of map types.
| DefaultProvider | ||
| Method | Defined by | ||
|---|---|---|---|
|
DefaultProvider(logo:* = null)
Provider constructor.
| DefaultProvider | ||
|
addMapType(type:IMapType):Boolean
Adds new map type to the map types Array.
| DefaultProvider | ||
|
clearLogo():void
Clears the logo.
| DefaultProvider | ||
|
dispose():void
Frees the resources accuired by the Provider.
| DefaultProvider | ||
|
getDefaultCopyright():String
Returns default copyright string.
| DefaultProvider | ||
|
getMapTypeByName(mapTypeName:String):IMapType
Returns map type reference by it's name.
| DefaultProvider | ||
|
Initializes the provider and starts the loading process.
| DefaultProvider | ||
|
Loads copyrights for the specified center, bounds, zoom and event.
| DefaultProvider | ||
|
setLogo(logo:*):void
Setups the logo for the provider, loads it if necessary.
| DefaultProvider | ||
| Method | Defined by | ||
|---|---|---|---|
|
Queries specified map type for copyright string and generates COPYRIGHT_CHANGED event.
| DefaultProvider | ||
|
initMapTypes():void
Override this function to define map types.
| DefaultProvider | ||
| _core | property |
protected var _core:UMapReference to the core UMap class.
| _logo | property |
protected var _logo:DisplayObjectDisplay object which containes the provider logo.
| logo | property |
logo:DisplayObject [read-only]Returns a display object with the provider's logo. Override it for custom logo.
Implementation public function get logo():DisplayObject
| _logoURL | property |
protected var _logoURL:URLRequestURI of the provider logo.
| _mapTypes | property |
protected var _mapTypes:ArrayArray of map types.
| mapTypes | property |
mapTypes:Array [read-only]Array which holds map types supported by this Provider.
Implementation public function get mapTypes():Array
| DefaultProvider | () | constructor |
public function DefaultProvider(logo:* = null)Provider constructor.
Defines an empty array of map types.
Use init() function to initalize the provider.
logo:* (default = null) — An object that specifes the provider logo. Can be one of the following:
DisplayObject instance.String which defines path to the external asset.URLRequest object which defines path to the external asset.null value disables the logo. |
| addMapType | () | method |
public function addMapType(type:IMapType):BooleanAdds new map type to the map types Array.
Parameterstype:IMapType — Valid map type object.
|
Boolean — A value of true if the map type was sucessfully added to the map types array; false if it was not.
|
| clearLogo | () | method |
public function clearLogo():voidClears the logo.
| dispose | () | method |
public function dispose():voidFrees the resources accuired by the Provider.
| getDefaultCopyright | () | method |
public function getDefaultCopyright():StringReturns default copyright string.
ReturnsString |
| getMapTypeByName | () | method |
public function getMapTypeByName(mapTypeName:String):IMapTypeReturns map type reference by it's name.
ParametersmapTypeName:String — Name of the map type to search.
|
IMapType —
Reference to the found map type; null if it wasn't found.
|
| getMapTypeCopyright | () | method |
protected function getMapTypeCopyright(bounds:LatLngBounds, zoom:Number, mapType:IMapType = null):voidQueries specified map type for copyright string and generates COPYRIGHT_CHANGED event.
Parametersbounds:LatLngBounds |
|
zoom:Number |
|
mapType:IMapType (default = null) |
| init | () | method |
public function init(core:UMap):voidInitializes the provider and starts the loading process.
Parameterscore:UMap — Reference to the core object.
|
| initMapTypes | () | method |
protected function initMapTypes():void
Override this function to define map types.
Provider should add map types in this function.
After that, provider should dispatch ProviderEvent.COMPLETE event both from self and core.
The easiest way to achieve that, will be to call super.initMapTypes() function.
See also
| loadCopyright | () | method |
public function loadCopyright(center:LatLng, bounds:LatLngBounds, zoom:Number, event:String = ""):void
Loads copyrights for the specified center, bounds, zoom and event.
After the copyright data has been loaded, class should dispatch
ControlEvent.COPYRIGHT_CHANGED event with the new copyright information.
center:LatLng — The coordinates of the map center.
|
|
bounds:LatLngBounds — The bounds of the map view.
|
|
zoom:Number — Current map zoom level.
|
|
event:String (default = "") — Indicates the map event.
|
| setLogo | () | method |
public function setLogo(logo:*):voidSetups the logo for the provider, loads it if necessary.
Parameterslogo:* — An object that specifes the provider logo. Can be one of the following:
DisplayObject instance.String which defines path to the external asset.URLRequest object which defines path to the external asset.null value disables the logo. |