Package | com.google.maps.services |
Class | public final class ClientGeocoder |
Implements | flash.events.IEventDispatcher, IClientGeocoder |
Method | Defined by | ||
---|---|---|---|
ClientGeocoder(options:ClientGeocoderOptions = null)
Constructs a ClientGeocoder instance for performing geocoding.
| ClientGeocoder | ||
geocode(address:String):void
Initiates a geocoding request.
| ClientGeocoder | ||
Retrieves the geocoder object's options.
| ClientGeocoder | ||
resetCache():void
Resets the geocoding cache, clearing all results retrieved by this
and other ClientGeocoder objects.
| ClientGeocoder | ||
reverseGeocode(latLng:LatLng):void
Initiates a reverse geocoding request.
| ClientGeocoder | ||
setOptions(options:ClientGeocoderOptions):void
Updates the geocoder options.
| ClientGeocoder |
Method | Defined by | ||
---|---|---|---|
clearWrapper():void
Remove all event listeners and clear the wrapper.
| ClientGeocoder |
ClientGeocoder | () | constructor |
public function ClientGeocoder(options:ClientGeocoderOptions = null)
Constructs a ClientGeocoder instance for performing geocoding.
Parametersoptions:ClientGeocoderOptions (default = null ) — Full or partial set of geocoding options. When a partial
set of options is specified, the geocoder object's complete set of
options will be a combination of this partial set and the defaults.
In API versions prior to 1.8, the ClientGeocoder constructor took a
different set of parameters. These parameters are now included within
class ClientGeocoderOptions. See the example code for details of how
to replace old code with new code.
This change makes this class consistent with the majority of other
classes in the API.
|
// Old-style code (prior to version 1.8). var geocoder:ClientGeocoder = new ClientGeocoder("AU", myLatLngBounds); // New-style code var geocoder:ClientGeocoder = new ClientGeocoder( new ClientGeocoderOptions({ countryCode: "AU", viewport: myLatLngBounds }));
clearWrapper | () | method |
protected function clearWrapper():void
Remove all event listeners and clear the wrapper.
geocode | () | method |
public function geocode(address:String):void
Initiates a geocoding request. Dispatches GeocodingEvent.GEOCODING_SUCCESS or GeocodingEvent.GEOCODING_FAILURE on completion.
Parametersaddress:String — Address to geocode.
|
— A null or empty address will cause an ArgumentError
to be thrown.
|
getOptions | () | method |
public function getOptions():ClientGeocoderOptions
Retrieves the geocoder object's options. Use the setOptions() method to modify geocoder options.
ReturnsClientGeocoderOptions —
Full set of options for the geocoder object.
|
resetCache | () | method |
public function resetCache():void
Resets the geocoding cache, clearing all results retrieved by this and other ClientGeocoder objects.
reverseGeocode | () | method |
public function reverseGeocode(latLng:LatLng):void
Initiates a reverse geocoding request. Dispatches GeocodingEvent.GEOCODING_SUCCESS or GeocodingEvent.GEOCODING_FAILURE on completion.
ParameterslatLng:LatLng — LatLng to reverse geocode.
|
— A null LatLng will cause an ArgumentError
to be thrown.
|
setOptions | () | method |
public function setOptions(options:ClientGeocoderOptions):void
Updates the geocoder options. The options parameter may specify a complete or partial set of geocoder options.
Parametersoptions:ClientGeocoderOptions — New full or partial set of geocoder options.
|