com.google.gwt.maps.client.geocode
Class Placemark

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.google.gwt.maps.client.geocode.Placemark

public final class Placemark
extends com.google.gwt.core.client.JavaScriptObject

This class represents a JSON result returned from the Google Geocoding service. This object contains an address encoded in eXtensible Address Language(xAL) from OASIS.


Constructor Summary
protected Placemark()
          A protected constructor is required for JS overlays.
 
Method Summary
 int getAccuracy()
          An attribute indicating how accurately the Google servers were able to geocode the given address.
 java.lang.String getAddress()
          Returns the entire address for this result.
 java.lang.String getAdministrativeArea()
          The xAL field for "AdministrativeArea", often referred to as 'state'.
 java.lang.String getCity()
          xAL field for "LocalityName" returned by the query.
 java.lang.String getCountry()
          The xAL field "CountryNameCode" for the country code.
 java.lang.String getCounty()
          The xAL field for "SubAdministrativeAreaName".
 java.lang.String getLocality()
           
 LatLng getPoint()
          Returns the point corresponding to the decoded address.
 java.lang.String getPostalCode()
          The xAL field for "PostalCode".
 java.lang.String getState()
          The xAL field for "AdministrativeArea".
 java.lang.String getStreet()
          The xAL field for "ThoroughfareName".
 java.lang.String getSubAdministrativeArea()
          The xAL field for "SubAdministrativeAreaName", often called "county".
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Placemark

protected Placemark()
A protected constructor is required for JS overlays.

Method Detail

getAccuracy

public int getAccuracy()
An attribute indicating how accurately the Google servers were able to geocode the given address.

Returns:
one of the integer values defined in GeoAddressAccuracy

getAddress

public java.lang.String getAddress()
Returns the entire address for this result.

Returns:
a nicely formatted and properly capitalized version of the address including city, state, postal code and country.

getAdministrativeArea

public java.lang.String getAdministrativeArea()
The xAL field for "AdministrativeArea", often referred to as 'state'.

Returns:
the name of the administrative area.

getCity

public java.lang.String getCity()
xAL field for "LocalityName" returned by the query.

Returns:
the name of the city for the address.

getCountry

public java.lang.String getCountry()
The xAL field "CountryNameCode" for the country code.

Returns:
a two letter country code for the address.

getCounty

public java.lang.String getCounty()
The xAL field for "SubAdministrativeAreaName".

Returns:
the name of the county

getLocality

public java.lang.String getLocality()

getPoint

public LatLng getPoint()
Returns the point corresponding to the decoded address.

Returns:
the point corresponding to the decoded address.

getPostalCode

public java.lang.String getPostalCode()
The xAL field for "PostalCode".

Returns:
the postal code to use with the address.

getState

public java.lang.String getState()
The xAL field for "AdministrativeArea".

Returns:
the name of the state.

getStreet

public java.lang.String getStreet()
The xAL field for "ThoroughfareName".

Returns:
the name of the street.

getSubAdministrativeArea

public java.lang.String getSubAdministrativeArea()
The xAL field for "SubAdministrativeAreaName", often called "county".

Returns:
the name of the sub-administrative area