Packagecom.afcomponents.umap.display.geocodermanager
Classpublic class BingGeocodeService
InheritanceBingGeocodeService Inheritance DefaultGeocoderService Inheritance flash.events.EventDispatcher
ImplementsIGeocoderService

Specifies a Bing geocodier service. This service can be used separetly or through the GeocoderManager class. The service requires a valid MapPoint proxy singleton configured and token acquired.


Example
Consider a short usage example:
 import com.afcomponents.umap.core.UMap;
 import com.afcomponents.umap.display.geocodermanager.GeocoderManager;
 import com.afcomponents.umap.events.GeocoderEvent;
 import com.afcomponents.umap.providers.microsoft.MapPointProxy;
 import com.afcomponents.umap.providers.microsoft.MapPointTokenRequest;
 import com.afcomponents.umap.events.MapPointProxyEvent;
  
 // create UMap instance
 var map:UMap = new UMap();
 map.setSize (550,400);
 addChild (map);
  
 // initalize proxy
 MapPointProxy.initialize("http://www.umapper.com/demo/dmitry/msproxy.php");
  
 // request token, and wait for valid token
 var proxy:MapPointProxy = MapPointProxy.getInstance();
 proxy.getToken();
 proxy.addEventListener(MapPointProxyEvent.REQUEST_COMPLETE, proxyComplete);
  
 // create geocoder manager
 var geo:GeocoderManager = new GeocoderManager(GeocoderManager.BING_SERVICE);
 geo.addEventListener(GeocoderEvent.SUCCESS, geocoderSuccess);
  
 // wait for token ready event and do geocoding
 function proxyComplete(event:MapPointProxyEvent):void
 {
   if (event.request is MapPointTokenRequest)
   {
     // token ready, perform geocoding
     geo.geocodeAddress("Denver, CO");
   }
 }
  
 // GeocoderEvent.SUCCESS listener function
 function geocoderSuccess(event:GeocoderEvent):void
 {
   // extract result marker, add it to map and open the info window
   map.addOverlay(geo.getMarker(event.results)[0]).openInfoWindow();
 }
 

See also

com.afcomponents.umap.display.geocodermanager.GeocoderManager
com.afcomponents.umap.providers.microsoft.MapPointProxy
com.afcomponents.umap.events.GeocoderEvent


Public Properties
 PropertyDefined by
 Inheritedcache : Array
DefaultGeocoderService
 InheriteddefaultParam : Object
DefaultGeocoderService
  language : String
Gets or sets the language 2-letter ISO code.
BingGeocodeService
 InheritedmaxCacheSize : uint
DefaultGeocoderService
 Inheritedqueue : Array
DefaultGeocoderService
 Inheritedrequest : GeocoderRequest
DefaultGeocoderService
  results : Array
[read-only] Returns array of GeocoderResults objects.
BingGeocodeService
  token : String
BingGeocodeService
Protected Properties
 PropertyDefined by
 Inherited_cache : Array
DefaultGeocoderService
 Inherited_defaultParam : Object
DefaultGeocoderService
 Inherited_loader : *
DefaultGeocoderService
 Inherited_pipe : Boolean
DefaultGeocoderService
 Inherited_queue : Array
DefaultGeocoderService
 Inherited_request : GeocoderRequest
DefaultGeocoderService
 Inherited_requestCounter : uint
DefaultGeocoderService
 Inherited_results : Array
DefaultGeocoderService
 Inherited_xmlData : XML
DefaultGeocoderService
Public Methods
 MethodDefined by
  
BingGeocodeService(param:Object = null)
BingGeocodeService
 Inherited
DefaultGeocoderService
 Inherited
dispose():void
DefaultGeocoderService
  
geocodeAddress(address:String, maxRows:int, param:Object = null):GeocoderRequest
BingGeocodeService
 Inherited
geocodeByBounds(bounds:LatLngBounds, maxRows:int, param:Object = null):GeocoderRequest
DefaultGeocoderService
 Inherited
DefaultGeocoderService
  
geocodeLatLng(latLng:LatLng, maxRows:int, param:Object = null):GeocoderRequest
BingGeocodeService
 Inherited
DefaultGeocoderService
 Inherited
loadQuery(server:*, param:Object = null):GeocoderRequest
DefaultGeocoderService
 Inherited
reload():void
DefaultGeocoderService
Protected Methods
 MethodDefined by
  
createLoader():void
BingGeocodeService
  
BingGeocodeService
 Inherited
error():void
DefaultGeocoderService
  
loadComplete(event:Event):void
BingGeocodeService
  
loadError(event:IOErrorEvent):void
BingGeocodeService
  
BingGeocodeService
  
loadSecurityError(event:SecurityError):void
BingGeocodeService
 Inherited
parse(data:String):Boolean
DefaultGeocoderService
 Inherited
ready():void
DefaultGeocoderService
Public Constants
 ConstantDefined by
 InheritedLIMIT_ROWS : int = 30
[static]
DefaultGeocoderService
Property detail
languageproperty
language:String  [read-write]

Gets or sets the language 2-letter ISO code.

Implementation
    public function get language():String
    public function set language(value:String):void
resultsproperty 
results:Array  [read-only]

Returns array of GeocoderResults objects.

Implementation
    public function get results():Array
tokenproperty 
token:String  [read-write]

Implementation
    public function get token():String
    public function set token(value:String):void
Constructor detail
BingGeocodeService()constructor
public function BingGeocodeService(param:Object = null)

Parameters
param:Object (default = null)
Method detail
createLoader()method
protected override function createLoader():void
disposeLoader()method 
protected override function disposeLoader():void
geocodeAddress()method 
public override function geocodeAddress(address:String, maxRows:int, param:Object = null):GeocoderRequest

Parameters
address:String
 
maxRows:int
 
param:Object (default = null)

Returns
GeocoderRequest
geocodeLatLng()method 
public override function geocodeLatLng(latLng:LatLng, maxRows:int, param:Object = null):GeocoderRequest

Parameters
latLng:LatLng
 
maxRows:int
 
param:Object (default = null)

Returns
GeocoderRequest
loadComplete()method 
protected override function loadComplete(event:Event):voidParameters
event:Event
loadError()method 
protected override function loadError(event:IOErrorEvent):voidParameters
event:IOErrorEvent
loadRequest()method 
protected override function loadRequest(request:GeocoderRequest):voidParameters
request:GeocoderRequest
loadSecurityError()method 
protected override function loadSecurityError(event:SecurityError):voidParameters
event:SecurityError