Description
Class added v1.4. Bing Maps geocoder. See
Locator for geocoding with ArcGIS Server locators.
Class hierarchy
esri.virtualearth.VEGeocoder
Constructor
| esri.virtualearth.VEGeocoder(options) |
Creates a new VEGeocoder object. The parameters can be included in any order. Either tokenURL or serverToken is required in the constructor. All other parameters are optional. |
Properties
Methods
Events
Constructor Detail
esri.virtualearth.VEGeocoder(options)
Creates a new VEGeocoder object. The parameters can be included in any order. Either tokenURL or serverToken is required in the constructor. All other parameters are optional.
Parameters:
|
<Object>
options |
Required |
See options list for parameters.
|
Options:
|
<String>
culture |
Specifies the culture in which to return results. The default value is "en-US". For a list of supported cultures, see http://msdn.microsoft.com/en-us/library/cc981048.aspx.
|
|
<String>
environment |
Whether to use the Bing Maps staging or production environment. Trial Bing Maps accounts must always use staging. Subscription accounts can use either staging or production.
|
|
<String>
serverToken |
Note: Either tokenURL or serverToken is required in the constructor.
The Bing Maps Web services token used by the ArcGIS VEAdapter to make Bing Maps geocode service requests.
|
|
<String>
tokenDuration |
The duration of the token in minutes. The minimum value is 15 and the maximum value is 480 (8 hours).
|
|
<String>
tokenUrl |
Note: Either tokenURL or serverToken is required in the constructor.
The root URL of the "Get Virtual Earth Token" page. For more information, see Getting started with Bing Maps in the ArcGIS JavaScript API.
|
Properties Detail
Whether to use the Bing Maps staging or production environment. Trial Bing Maps accounts must always use staging. Subscription accounts can use either staging or production.
Known values: staging | production
Default value: staging
The Bing Maps services token used by the ArcGIS VEAdapter to make Bing Maps geocode service requests.
Duration of the Bing Maps token in minutes. The minimum is 15, and the maximum is 480 (8 hours).
Default value: 480
Methods Detail
addressToLocations(query, callback?, errback?)
Sends a geocode request to Bing Maps to find candidates for a single address specified in the query argument. On completion, the onAddressToLocationsComplete event is fired and the optional callback function is invoked.
Input Parameters:
|
<String> query |
Required |
The address to locate. |
|
<Function> callback |
Optional |
The function to call when the method has completed. The arguments in the function are the same as the onAddressToLocationsComplete event. |
|
<Function> errback |
Optional |
An error object is returned if an error occurs during task execution. |
Sets the culture in which to return results.
Return value: none
Input Parameters:
Updates server token.
Return value: none
Input Parameters:
|
<String> token |
Required |
The new token to update with. |
Events Detail
onAddressToLocationsComplete(geocodeResults)
Fires when VEGeocode.addressToLocation() has completed. The result is an array of
VEGeocodeResult. This is the same signature returned if the optional callback is specified.
Arguments:
|
<VEGeocodeResult[]> geocodeResults
|
Contains an array of candidates that match the given address as well as their scores.
|
Fires when an error occurs when executing the task.
Arguments: