| Package | com.afcomponents.umap.display.geocodermanager |
| Class | public class GeocoderManager |
| Inheritance | GeocoderManager Manager MapObjectContainer MapObject flash.display.Sprite |
import com.afcomponents.umap.display.geocodermanager.GeocoderManager;
import com.afcomponents.umap.core.UMap;
import com.afcomponents.umap.events.GeocoderEvent;
import com.afcomponents.umap.types.GeocoderRequest;
var map:UMap = new UMap();
map.setSize (500,400);
stage.addChild (map);
var geo:GeocoderManager = new GeocoderManager();
geo.addEventListener(GeocoderEvent.SUCCESS,ready);
var results:GeocoderRequest = geo.service.geocodeAddress("Rome",20);
function ready(event:GeocoderEvent):void
{
if (event.request == results)
map.addOverlay(geo.getLayer(event.results));
}
| Property | Defined by | ||
|---|---|---|---|
![]() | asDisplayObject : DisplayObject
Returns reference to the object as a DisplayObject instance.
| MapObject | |
![]() | core : UMap
Returns reference to the core UMap object.
| MapObject | |
| defaultParam : Object
Object witch contains default paramets for
geocodingRequest
| GeocoderManager | ||
![]() | id : uint
Gets or sets the ID of the object.
| MapObject | |
| maxCacheSize : uint
Gets or sets maximum size of cache.
| GeocoderManager | ||
![]() | name : String
Gets or sets the name of the object.
| MapObject | |
![]() | owner : IMapObjectContainer
Returns reference to the owner container object.
| MapObject | |
| service : IGeocoderService
[read-only]
Gets or sets reference to the сurrent geocoder service.
| GeocoderManager | ||
| Method | Defined by | ||
|---|---|---|---|
|
GeocoderManager(service:* = null, defaultParam:Object = null)
GeocoderManager constructor creates new grocoder manager.
| GeocoderManager | ||
![]() |
addObject(object:IMapObject):void
Adds new IMapObject to the container.
| MapObjectContainer | |
![]() |
bringForward(object:IMapObject):void
Moves the attached IMapObject forward in the display list.
| MapObjectContainer | |
![]() |
bringToFront(object:IMapObject):void
Brings the attached IMapObject to the top of the display list.
| MapObjectContainer | |
|
cancelRequest():void
Cancel current request.
| GeocoderManager | ||
![]() |
clearObjects(filter:Class = null):void
Removes all attached objects.
| MapObjectContainer | |
|
dispose():void
Releases all the resources accuired by the object.
| GeocoderManager | ||
|
findById(requestId:uint):GeocoderRequest
Find
GeocoderRequest in cache by requestId. | GeocoderManager | ||
|
geocodeAddress(address:String, maxRows:int, param:Object = null):GeocoderRequest
| GeocoderManager | ||
|
| GeocoderManager | ||
|
| GeocoderManager | ||
|
getLatLng(results:Array = null):Array
Convert an array of
GeocoderResults objects to an array of LalLng objects. | GeocoderManager | ||
|
Convert an array of
GeocoderResults objects to a Layer with Marker objects
| GeocoderManager | ||
|
getMarker(results:Array = null, markerStyle:Object = null, infoWindowStyle:Object = null):Array
| GeocoderManager | ||
![]() |
getObject(id_or_name:*, filter:Class = null):IMapObject
Searches for an object with specified id or name.
| MapObjectContainer | |
![]() |
getObjectById(id:uint, filter:Class = null):IMapObject
Searches for an object with specified id.
| MapObjectContainer | |
![]() |
getObjectByName(name:String, matchCase:Boolean = false, filter:Class = null):IMapObject
Searches for an object with specified name.
| MapObjectContainer | |
![]() |
getObjects(filter:Class = null):Array
Returns an array of IMapObjects that where added to the container.
| MapObjectContainer | |
![]() |
init():void
| Manager | |
![]() |
isOwnerVisible():Boolean
Recursevly checks visibility of parent objects
| MapObjectContainer | |
![]() |
ready():void
| Manager | |
![]() |
remove():void
Removes the object from the owner container object.
| MapObject | |
|
removeFromCache(requestId:uint):Boolean
Remove
GeocoderRequest from cache by requestId
| GeocoderManager | ||
![]() |
removeObject(object:IMapObject):void
Removes IMapObject from the container.
| MapObjectContainer | |
|
resetCache():void
Clears cache request.
| GeocoderManager | ||
|
resetQueue():void
Clears queue request.
| GeocoderManager | ||
![]() |
sendBackward(object:IMapObject):void
Sends the attached IMapObject backward in the display list.
| MapObjectContainer | |
![]() |
sendToBack(object:IMapObject):void
Sends the attached IMapObject to the bottom of the display list.
| MapObjectContainer | |
![]() |
setOwner(owner:IMapObjectContainer):void
Adds the object to the specified IMapObjectContainer.
| MapObjectContainer | |
|
setService(value:*):Boolean
| GeocoderManager | ||
![]() |
toString():String
Returns a textual representation of the object.
| MapObject | |
![]() |
updateComponentProperty(property:String, value:*):void
| Manager | |
![]() |
updateMapType(mapType:IMapType):void
| Manager | |
![]() |
updatePosition(latlng:LatLng):void
| Manager | |
![]() |
updateSize(width:Number, height:Number):void
| Manager | |
![]() |
updateZoom(zoom:Number):void
| Manager | |
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| Dispatched when request has been canceled. | GeocoderManager | |||
| Dispatched when error occurs while loading data for the request. | GeocoderManager | |||
| Dispatched when request startes loading. | GeocoderManager | |||
| Dispatched when request has been completed. | GeocoderManager | |||
| Constant | Defined by | ||
|---|---|---|---|
| GEO_NAMES_SERVICE : Class [static]
Defines the class for the Geonames Service.
| GeocoderManager | ||
| YAHOO_GEO_PLANET_SERVICE : Class [static]
Defines the class for the Yahoo GeoPlanet Service.
| GeocoderManager | ||
| YAHOO_LOCAL_SERVICE : Class [static]
Defines the class for the Yahoo Local Service.
| GeocoderManager | ||
| defaultParam | property |
defaultParam:Object [read-write]
Object witch contains default paramets for geocodingRequest
public function get defaultParam():Object
public function set defaultParam(value:Object):void
| maxCacheSize | property |
maxCacheSize:uint [read-write]Gets or sets maximum size of cache. If number of requests exceeds cache length the oldest result will be erased.
Implementation public function get maxCacheSize():uint
public function set maxCacheSize(value:uint):void
| service | property |
service:IGeocoderService [read-only]Gets or sets reference to the сurrent geocoder service.
Implementation public function get service():IGeocoderService
| GeocoderManager | () | constructor |
public function GeocoderManager(service:* = null, defaultParam:Object = null)GeocoderManager constructor creates new grocoder manager. You can defined geocoderService witch will be used by geocoderManager.
Parametersservice:* (default = null) — type of geocoder service
|
|
defaultParam:Object (default = null) — object witch contains default paramets for geocodingRequest
|
| cancelRequest | () | method |
public function cancelRequest():voidCancel current request.
| dispose | () | method |
public override function dispose():voidReleases all the resources accuired by the object.
| findById | () | method |
public function findById(requestId:uint):GeocoderRequest
Find GeocoderRequest in cache by requestId.
requestId:uint — id of request.
|
GeocoderRequest —
GeocoderRequest object if it was fond in cache and null if wasn't.
|
| geocodeAddress | () | method |
public function geocodeAddress(address:String, maxRows:int, param:Object = null):GeocoderRequestParameters
address:String |
|
maxRows:int |
|
param:Object (default = null) |
GeocoderRequest |
| geocodeByBounds | () | method |
public function geocodeByBounds(bounds:LatLngBounds, maxRows:int, param:Object = null):GeocoderRequestParameters
bounds:LatLngBounds |
|
maxRows:int |
|
param:Object (default = null) |
GeocoderRequest |
| geocodeLatLng | () | method |
public function geocodeLatLng(latLng:LatLng, maxRows:int, param:Object = null):GeocoderRequestParameters
latLng:LatLng |
|
maxRows:int |
|
param:Object (default = null) |
GeocoderRequest |
| getLatLng | () | method |
public function getLatLng(results:Array = null):Array
Convert an array of GeocoderResults objects to an array of LalLng objects.
results:Array (default = null) — Array witch contains geocoding results returned by a service.
If a value of null is passed results for a previous request will be used.
|
Array — array of LatLng objects.
|
| getLayer | () | method |
public function getLayer(results:Array, markerStyle:Object = null, infoWindowStyle:Object = null):Layer
Convert an array of GeocoderResults objects to a Layer with Marker objects
results:Array — Array witch contains geocoding results returned by a service.
If a value of null is passed results for a previous request will be used.
|
|
markerStyle:Object (default = null) — Object that defines marker's style.
|
|
infoWindowStyle:Object (default = null) — Info window style object associated with the Overlay.
|
Layer —
Layer with markers
|
| getMarker | () | method |
public function getMarker(results:Array = null, markerStyle:Object = null, infoWindowStyle:Object = null):ArrayParameters
results:Array (default = null) |
|
markerStyle:Object (default = null) |
|
infoWindowStyle:Object (default = null) |
Array |
| removeFromCache | () | method |
public function removeFromCache(requestId:uint):Boolean
Remove GeocoderRequest from cache by requestId
requestId:uint |
Boolean — a value of true if GeocoderRequest was found and removed;
false if it wasn't
|
| resetCache | () | method |
public function resetCache():voidClears cache request.
| resetQueue | () | method |
public function resetQueue():voidClears queue request.
| setService | () | method |
public function setService(value:*):BooleanParameters
value:* |
Boolean |
| CANCEL_REQUEST | event |
com.afcomponents.umap.events.GeocoderEvent
com.afcomponents.umap.events.GeocoderEvent.CANCEL_REQUEST
Dispatched when request has been canceled.
| ERROR | event |
com.afcomponents.umap.events.GeocoderEvent
com.afcomponents.umap.events.GeocoderEvent.ERROR
Dispatched when error occurs while loading data for the request.
| STARTED_LOAD | event |
com.afcomponents.umap.events.GeocoderEvent
com.afcomponents.umap.events.GeocoderEvent.STARTED_LOAD
Dispatched when request startes loading.
| SUCCES | event |
com.afcomponents.umap.events.GeocoderEvent
Dispatched when request has been completed.
| GEO_NAMES_SERVICE | constant |
public static const GEO_NAMES_SERVICE:ClassDefines the class for the Geonames Service.
See also
| YAHOO_GEO_PLANET_SERVICE | constant |
public static const YAHOO_GEO_PLANET_SERVICE:ClassDefines the class for the Yahoo GeoPlanet Service.
See also
| YAHOO_LOCAL_SERVICE | constant |
public static const YAHOO_LOCAL_SERVICE:ClassDefines the class for the Yahoo Local Service.
See also