com.lamatek.tags.google
Class GoogleMapPointTag

java.lang.Object
  extended by TagSupport
      extended by com.lamatek.tags.google.GoogleMapPointTag
All Implemented Interfaces:
java.io.Serializable

public class GoogleMapPointTag
extends TagSupport
implements java.io.Serializable

GoogleMapPointTag This class represents a <googlemaps;point> tag. Developers should not subclass or override this class or it's methods.

Version:
0.40
Author:
Tom Cole

Constructor Summary
GoogleMapPointTag()
           
 
Method Summary
 int doEndTag()
          Overrides doEndTag() from TagSupport.
 int doStartTag()
          Overrides doStartTag() from TagSupport.
 boolean geocode()
          Starts the geocoding process if the longitude and latitude either: Have not been previously geocoded, or Have not been set.
 java.lang.String getAddress()
          Returns the address used when creating this marker, or null if this point was created using an IP or longitude/latitude pair.
 java.lang.String getCity()
          Returns the city used when creating this marker, or null if this point was created using an IP or longitude/latitude pair.
 java.lang.String getCountry()
          Returns the ISO compliant 2-digit country code used when creating this marker, or null if this point was created using an IP or longitude/latitude pair.
 java.lang.String getId()
          Returns the unique id for this point.
 java.lang.String getIp()
          Returns the IP address used when creating this marker, or null if this point was created using a street address or longitude/latitude pair.
 double getLatitude()
          Returns the latitude (in decimal form) for this point.
 double getLongitude()
          Returns the longitude (in decimal form) for this point.
 java.lang.String getState()
          Returns the state or province used when creating this marker, or null if this point was created using an IP or longitude/latitude pair.
 java.lang.String getZipcode()
          Returns the zip or postal code used when creating this marker, or null if this point was created using an IP or longitude/latitude pair.
 void setAddress(java.lang.String address)
          Sets the street address used to geocode the longitude/latitude.
 void setCenter(boolean center)
          Sets this point as the initial centerpoint of the entire map.
 void setCity(java.lang.String city)
          Sets the city name used to geocode the longitude/latitude.
 void setCountry(java.lang.String country)
          Sets the ISO compliant 2-character country code used to geocode the longitude/latitude.
 void setId(java.lang.String id)
          Sets the unique id for this point.
 void setIp(java.lang.String ip)
          Sets the IP address used to geocode the longitude/latitude.
 void setLatitude(double latitude)
          Sets the latitude (in decimal form) for this point.
 void setLatitudeAsString(java.lang.String value)
          Attempts to set the latitude using a String, by converting it to a double.
 void setLongitude(double longitude)
          Sets the longitude (in decimal form) for this point.
 void setLongitudeAsString(java.lang.String value)
          Attempts to set the longitude using a String, by converting it to a double.
 void setState(java.lang.String state)
          Sets the state or province used to geocode the longitude/latitude.
 void setZipcode(java.lang.String zipcode)
          Sets the zip or postal used to geocode the longitude/latitude.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GoogleMapPointTag

public GoogleMapPointTag()
Method Detail

doEndTag

public int doEndTag()
Overrides doEndTag() from TagSupport. Developers should not override this method.


geocode

public boolean geocode()
Starts the geocoding process if the longitude and latitude either:
  1. Have not been previously geocoded, or
  2. Have not been set.
Automatically determines if this is an IP address or street address geocode, and forwards to the appropriate geocoder.

Returns:
True if geocoding resolved a longitude/latitude pair. False is not.

doStartTag

public int doStartTag()
Overrides doStartTag() from TagSupport. Developers should not override this method.


setCenter

public void setCenter(boolean center)
Sets this point as the initial centerpoint of the entire map.

Parameters:
center - True if the map should be centered around this point. False if not.

setLatitude

public void setLatitude(double latitude)
Sets the latitude (in decimal form) for this point. If using IP or street addresses, this is called automatically by the resulting Geocoder.

Parameters:
latitude - The latitude (in decimal form)

setLongitude

public void setLongitude(double longitude)
Sets the longitude (in decimal form) for this point. If using IP or street addresses, this is called automatically by the resulting Geocoder.

Parameters:
longitude - The longitude (in decimal form)

setLatitudeAsString

public void setLatitudeAsString(java.lang.String value)
Attempts to set the latitude using a String, by converting it to a double.

Parameters:
value - A valid latitude, specified as a String.

setLongitudeAsString

public void setLongitudeAsString(java.lang.String value)
Attempts to set the longitude using a String, by converting it to a double.

Parameters:
value - A valid longitude, specified as a String.

getAddress

public java.lang.String getAddress()
Returns the address used when creating this marker, or null if this point was created using an IP or longitude/latitude pair.

Returns:
Address string or null.

setAddress

public void setAddress(java.lang.String address)
Sets the street address used to geocode the longitude/latitude.

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

getCity

public java.lang.String getCity()
Returns the city used when creating this marker, or null if this point was created using an IP or longitude/latitude pair.

Returns:
Us or Intl. city string or null.

setCity

public void setCity(java.lang.String city)
Sets the city name used to geocode the longitude/latitude. This can be US or international.

Parameters:
city - A valid city name.

getCountry

public java.lang.String getCountry()
Returns the ISO compliant 2-digit country code used when creating this marker, or null if this point was created using an IP or longitude/latitude pair.

Returns:
Country code as a string or null.

setCountry

public void setCountry(java.lang.String country)
Sets the ISO compliant 2-character country code used to geocode the longitude/latitude.

Parameters:
country - A valid 2-character country code.

getIp

public java.lang.String getIp()
Returns the IP address used when creating this marker, or null if this point was created using a street address or longitude/latitude pair.

Returns:
The IPv4 or IPv6 address as a string or null.

setIp

public void setIp(java.lang.String ip)
Sets the IP address used to geocode the longitude/latitude.

Parameters:
ip - A valid ip address (i.e. 216.113.235.52).

getState

public java.lang.String getState()
Returns the state or province used when creating this marker, or null if this point was created using an IP or longitude/latitude pair.

Returns:
State or province string or null.

setState

public void setState(java.lang.String state)
Sets the state or province used to geocode the longitude/latitude.

Parameters:
state - A valid state or province.

getZipcode

public java.lang.String getZipcode()
Returns the zip or postal code used when creating this marker, or null if this point was created using an IP or longitude/latitude pair.

Returns:
Zipcode or postal code as a string or null.

setZipcode

public void setZipcode(java.lang.String zipcode)
Sets the zip or postal used to geocode the longitude/latitude.

Parameters:
zipcode - A valid US ZIP or international postal code.

getLatitude

public double getLatitude()
Returns the latitude (in decimal form) for this point. This may have been set programmatically, or if using addresses, may have been geocoded after calling the geocode() method. If using addresses, developers should be sure to call geocode() before calling this method.

Returns:
The latitude of this point or -181 if non-codable.

getLongitude

public double getLongitude()
Returns the longitude (in decimal form) for this point. This may have been set programmatically, or if using addresses, may have been geocoded after calling the geocode() method. If using addresses, developers should be sure to call geocode() before calling this method.

Returns:
The longitude of this point or -181 if non-codable.

getId

public java.lang.String getId()
Returns the unique id for this point.

Returns:
The points id.

setId

public void setId(java.lang.String id)
Sets the unique id for this point. Other overlays will use this id to reference this point in their construction.

Parameters:
id - A unique id for this point.