com.lamatek.tags.google.beans
Interface Geocoder

All Known Implementing Classes:
GeocoderBean, IntlAddressGeocoder, USAddressGeocoder

public interface Geocoder

Geocoder

Version:
0.40 Parent interface for all address based geocoders.
Author:
Tom Cole

Method Summary
 boolean geocode()
          Attempts to geocode the location based on the current information.
 double getLatitude()
          Returns the latitude (in decimal form) of the location geocoded.
 double getLongitude()
          Returns the longitude (in decimal form) of the location geocoded.
 java.lang.String getPrecision()
          Returns any precision information provided by the underlying geocoder.
 java.lang.String getWarning()
          Returns any warnings given by the underlying geocoder.
 void setAddress(java.lang.String address)
          Sets the street address of the location to geocode.
 void setCity(java.lang.String city)
          Sets the city name of the location to geocode.
 void setCountry(java.lang.String country)
          Sets the country code for the location to geocode.
 void setState(java.lang.String state)
          Sets the state/province of the location to geocode.
 void setZip(java.lang.String zip)
          Sets the ZIP or Postal code of the location to geocode.
 

Method Detail

setAddress

void setAddress(java.lang.String address)
Sets the street address of the location to geocode.

Parameters:
address - A valid street address (i.e. 74 Connor Lane)

setCity

void setCity(java.lang.String city)
Sets the city name of the location to geocode.

Parameters:
city - The US or Internation city name.

setState

void setState(java.lang.String state)
Sets the state/province of the location to geocode.

Parameters:
state - The US state or International province name.

setZip

void setZip(java.lang.String zip)
Sets the ZIP or Postal code of the location to geocode.

Parameters:
zip - The US ZIP or International postal code.

setCountry

void setCountry(java.lang.String country)
Sets the country code for the location to geocode.

Parameters:
country - The ISO compliant 2-character country code.

getLongitude

double getLongitude()
Returns the longitude (in decimal form) of the location geocoded.

Returns:
The longitude (in decimal form) of the location as a double.

getLatitude

double getLatitude()
Returns the latitude (in decimal form) of the location geocoded.

Returns:
The latitude (in decimal form) of the location as a double.

geocode

boolean geocode()
Attempts to geocode the location based on the current information.

Returns:
True if the geocoding was successful or false if it was not.

getPrecision

java.lang.String getPrecision()
Returns any precision information provided by the underlying geocoder. If none is present, or the coder does not support this feature, then this method will return null.

Returns:
Any precision information or null if none is available.

getWarning

java.lang.String getWarning()
Returns any warnings given by the underlying geocoder.

Returns:
Any warning information or null if none is available.