| Package | com.yahoo.maps.api.core.location |
| Class | public class Address |
| Inheritance | Address flash.events.EventDispatcher |
| Implements | ILocation |
var address:Address = new Address("Seattle, WA");
_map.setCenterAddress(address);
var address:Address = new Address("San Francisco, CA");
address.addEventListener(GeocoderEvent.GEOCODE_SUCCESS, handleGeocodeSuccess);
address.geocode();
function handleGeocodeSuccess(event:GeocoderEvent):void
{
// handle event
}
| Property | Defined by | ||
|---|---|---|---|
| address : String [read-only]
The address location.
| Address | ||
| canonicalizedAddress : String [read-only]
The canonicalized address location.
| Address | ||
| geocoded : Boolean [read-only]
Returns true if this address has been geocoded.
| Address | ||
| geocoderResultSet : GeocoderResultSet
[read-only]
Returns the ResultSet provided by the geocoder.
| Address | ||
| locale : String
The locale to geocode this address to.
| Address | ||
| Method | Defined by | ||
|---|---|---|---|
|
Address(address:String)
Creates a new Address object.
| Address | ||
|
canonicalize(address:String):String
[static]
Normalizes the address string by removing double spaces and commas.
| Address | ||
|
geocode():void
Geocodes the address input using the built-in
Geocoder class. | Address | ||
|
toString():String
Returns the address string.
| Address | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| Address | ||||
| Address | ||||
| address | property |
address:String [read-only]The address location.
Implementation public function get address():String
| canonicalizedAddress | property |
canonicalizedAddress:String [read-only]
The canonicalized address location.
Replaces commas and double spaces with a single space, and converts to lower case.
public function get canonicalizedAddress():String
| geocoded | property |
geocoded:Boolean [read-only]Returns true if this address has been geocoded.
Implementation public function get geocoded():Boolean
| geocoderResultSet | property |
geocoderResultSet:GeocoderResultSet [read-only]Returns the ResultSet provided by the geocoder.
Implementation public function get geocoderResultSet():GeocoderResultSet
| locale | property |
locale:String [read-write]The locale to geocode this address to. (Defaults to MapLocales.EN)
Implementation public function get locale():String
public function set locale(value:String):void
| Address | () | constructor |
public function Address(address:String)Creates a new Address object.
Parametersaddress:String — An address string (ie: "701 First Avenue, Sunnyvale, CA")
|
| canonicalize | () | method |
public static function canonicalize(address:String):StringNormalizes the address string by removing double spaces and commas.
Parametersaddress:String — The address string to normalize
|
String |
| geocode | () | method |
public function geocode():void
Geocodes the address input using the built-in Geocoder class.
See also
| toString | () | method |
public override function toString():StringReturns the address string.
ReturnsString |
| geocoderFailure | event |
| geocoderSuccess | event |