Packagecom.afcomponents.umap.providers.cloudmade
Classpublic class CloudMadeProvider
InheritanceCloudMadeProvider Inheritance DefaultProvider Inheritance flash.events.EventDispatcher

Provider for use with cloudmade.com service.

To use their service you need to obtain the api-key. Then decide which tile set you wish to use (standard or mobile) together with the tile size (256 or 64).


Example
Here is the usage sample:
 import com.afcomponents.umap.core.UMap;
 import com.afcomponents.umap.providers.cloudmade.CloudMadeProvider;
  
 var provider:CloudMadeProvider = new CloudMadeProvider("API KEY", CloudMadeProvider.STYLE_MOBILE, CloudMadeProvider.SIZE_64);
    map.setProvider(provider);

See also

http://cloudmade.com


Public Properties
 PropertyDefined by
 Inheritedlogo : DisplayObject
Returns a display object with the provider's logo.
DefaultProvider
 InheritedmapTypes : Array
Array which holds map types supported by this Provider.
DefaultProvider
Protected Properties
 PropertyDefined by
 Inherited_core : UMap
Reference to the core UMap class.
DefaultProvider
 Inherited_logo : DisplayObject
Display object which containes the provider logo.
DefaultProvider
 Inherited_logoURL : URLRequest
URI of the provider logo.
DefaultProvider
 Inherited_mapTypes : Array
Array of map types.
DefaultProvider
Public Methods
 MethodDefined by
  
CloudMadeProvider(apikey:String, style:String, size:uint)
ColudMadeProvider constructor.
CloudMadeProvider
 Inherited
addMapType(type:IMapType):Boolean
Adds new map type to the map types Array.
DefaultProvider
 Inherited
clearLogo():void
Clears the logo.
DefaultProvider
 Inherited
dispose():void
Frees the resources accuired by the Provider.
DefaultProvider
 Inherited
Returns default copyright string.
DefaultProvider
 Inherited
getMapTypeByName(mapTypeName:String):IMapType
Returns map type reference by it's name.
DefaultProvider
 Inherited
init(core:UMap):void
Initializes the provider and starts the loading process.
DefaultProvider
 Inherited
loadCopyright(center:LatLng, bounds:LatLngBounds, zoom:Number, event:String = ""):void
Loads copyrights for the specified center, bounds, zoom and event.
DefaultProvider
 Inherited
setLogo(logo:*):void
Setups the logo for the provider, loads it if necessary.
DefaultProvider
Protected Methods
 MethodDefined by
 Inherited
getMapTypeCopyright(bounds:LatLngBounds, zoom:Number, mapType:IMapType = null):void
Queries specified map type for copyright string and generates COPYRIGHT_CHANGED event.
DefaultProvider
 Inherited
initMapTypes():void
Override this function to define map types.
DefaultProvider
Public Constants
 ConstantDefined by
  SIZE_256 : uint = 256
[static] Defines the value for the 256 px tiles.
CloudMadeProvider
  SIZE_64 : uint = 64
[static] Defines the value for the 64 px tiles.
CloudMadeProvider
  STYLE_MOBILE : String = "2"
[static] Defines the value for the mobile tile set.
CloudMadeProvider
  STYLE_STANDARD : String = "1"
[static] Defines the value for the standard tile set.
CloudMadeProvider
Constructor detail
CloudMadeProvider()constructor
public function CloudMadeProvider(apikey:String, style:String, size:uint)

ColudMadeProvider constructor. Creates new provider instance. Don't forget to specify the api-key!

Parameters
apikey:String — API key which can be obtained from the CloudMade site.
 
style:String — Specifies the image tile's style: use either CloudMadeProvider.STYLE_STANDARD, or CloudMadeProvider.STYLE_MOBILE.
 
size:uint — Specifes the size of the tiles: use either CloudMadeProvider.SIZE_256, or CloudMadeProvider.SIZE_64.

See also

Constant detail
SIZE_256constant
public static const SIZE_256:uint = 256

Defines the value for the 256 px tiles.

SIZE_64constant 
public static const SIZE_64:uint = 64

Defines the value for the 64 px tiles.

STYLE_MOBILEconstant 
public static const STYLE_MOBILE:String = "2"

Defines the value for the mobile tile set.

STYLE_STANDARDconstant 
public static const STYLE_STANDARD:String = "1"

Defines the value for the standard tile set.