Packagecom.esri.ags.virtualearth
Classpublic class VEGeocoder
InheritanceVEGeocoder Inheritance flash.events.EventDispatcher
Implementsmx.core.IMXMLObject

Bing Maps (formerly Microsoft Virtual Earth) geocoder.

Note: Bing Maps tiles and geocoding were added in version 1.2.

See Locator for geocoding with ArcGIS Server.


Example
MXML to setup a VEGeocoder:
 <esri:VEGeocoder id="veGeocoder"
     environment="production"
     tokenURL="http://myserver:8080/VE/vetoken.jsp"
 />

ActionScript to setup a VEGeocoder:
 var veGeocoder:VEGeocoder = new VEGeocoder();
 veGeocoder.environment = "production";
 veGeocoder.tokenURL = http://myserver:8080/VE/vetoken.jsp;

See also

Concepts - Geocoding with Bing Maps in the ArcGIS API for Flex
Concepts - Getting started with Bing Maps in the ArcGIS API for Flex


Public Properties
 PropertyDefined by
  addressToLocationsLastResult : Array
The addressToLocationsLastResult.
VEGeocoder
  concurrency : String
Value that indicates how to handle multiple calls to the same task.
VEGeocoder
  culture : String
The culture.
VEGeocoder
  environment : String
The Bing Maps environment to use.
VEGeocoder
  requestTimeout : Number
The request timeout in seconds.
VEGeocoder
  serverToken : String
The serverToken.
VEGeocoder
  showBusyCursor : Boolean
If true, a busy cursor is displayed while a service is executing.
VEGeocoder
  tokenDuration : Number
The duration of the token (until it expires).
VEGeocoder
  tokenURL : String
The URL to the "Get Virtual Earth Token" page.
VEGeocoder
Public Methods
 MethodDefined by
  
VEGeocoder(environment:String = "staging")
Creates a new VEGeocoder object.
VEGeocoder
  
addressToLocations(query:String, responder:IResponder = null):AsyncToken
Sends a geocode request to Bing Maps to find candidates for a single address specified in the query argument.
VEGeocoder
Events
 EventSummaryDefined by
   Dispatched when an addressToLocations request successfully completes.VEGeocoder
   Dispatched when VEGeocoder fails.VEGeocoder
Property detail
addressToLocationsLastResultproperty
addressToLocationsLastResult:Array  [read-write]

The addressToLocationsLastResult.

This property can be used as the source for data binding.

Implementation
    public function get addressToLocationsLastResult():Array
    public function set addressToLocationsLastResult(value:Array):void

See also

concurrencyproperty 
concurrency:String  [read-write]

Value that indicates how to handle multiple calls to the same task. The default value is multiple. The following values are permitted:

The default value is multiple.

This property can be used as the source for data binding.

Implementation
    public function get concurrency():String
    public function set concurrency(value:String):void

See also

cultureproperty 
culture:String  [read-write]

The culture.

The default value is en-US.

This property can be used as the source for data binding.

Implementation
    public function get culture():String
    public function set culture(value:String):void

See also

environmentproperty 
environment:String  [read-write]

The Bing Maps environment to use. Either "staging" or "production".

The default value is staging.

This property can be used as the source for data binding.

Implementation
    public function get environment():String
    public function set environment(value:String):void
requestTimeoutproperty 
requestTimeout:Number  [read-write]

The request timeout in seconds. A value less than or equal to zero prevents request timeout.

The default value is -1.

This property can be used as the source for data binding.

Implementation
    public function get requestTimeout():Number
    public function set requestTimeout(value:Number):void
serverTokenproperty 
serverToken:String  [read-write]

The serverToken.

This property can be used as the source for data binding.

Implementation
    public function get serverToken():String
    public function set serverToken(value:String):void
showBusyCursorproperty 
showBusyCursor:Boolean  [read-write]

If true, a busy cursor is displayed while a service is executing.

The default value is false.

This property can be used as the source for data binding.

Implementation
    public function get showBusyCursor():Boolean
    public function set showBusyCursor(value:Boolean):void
tokenDurationproperty 
tokenDuration:Number  [read-write]

The duration of the token (until it expires). If tokenURL is set, this will be passed to the tokenURL and a new token will be retrieved every (tokenDuration - 1) minutes.

The default value is 480 minutes.

This property can be used as the source for data binding.

Implementation
    public function get tokenDuration():Number
    public function set tokenDuration(value:Number):void
tokenURLproperty 
tokenURL:String  [read-write]

The URL to the "Get Virtual Earth Token" page. The token retrieved from this URL will be set as the serverToken.

This property can be used as the source for data binding.

Implementation
    public function get tokenURL():String
    public function set tokenURL(value:String):void

See also

Constructor detail
VEGeocoder()constructor
public function VEGeocoder(environment:String = "staging")

Creates a new VEGeocoder object.

Parameters
environment:String (default = "staging") — Bing Maps server environment (staging or production)
Method detail
addressToLocations()method
public function addressToLocations(query:String, responder:IResponder = null):AsyncToken

Sends a geocode request to Bing Maps to find candidates for a single address specified in the query argument. On completion, the addressToLocationsComplete event is fired and the optional callback responder is invoked.

Parameters
query:String — The address string.
 
responder:IResponder (default = null) — The array of fields to include in the returned result set. If you specify the shape field in the list of return fields, it is ignored. For non-intersection addresses you can specify the candidate fields as defined in the geocode service. For intersection addresses you can specify the intersection candidate fields.

Returns
AsyncToken
Event detail
addressToLocationsCompleteevent 
Event object type: com.esri.ags.virtualearth.VEGeocoderEvent
VEGeocoderEvent.type property = com.esri.ags.virtualearth.VEGeocoderEvent.ADDRESS_TO_LOCATIONS_COMPLETE

Dispatched when an addressToLocations request successfully completes.

Defines the value of the type property of an addressToLocationsComplete event object.

faultevent  
Event object type: mx.rpc.events.FaultEvent

Dispatched when VEGeocoder fails.