com.lamatek.tags.google
Class GoogleMapInsertTag

java.lang.Object
  extended by TagSupport
      extended by com.lamatek.tags.google.GoogleMapInsertTag

public class GoogleMapInsertTag
extends TagSupport

GoogleMapInsertTag Represents a <googlemaps:insert> tag, which attaches a pannable, zoomable image to the map. Developers should now extend this class or override it's methods.

Version:
0.96
Author:
Tom Cole

Constructor Summary
GoogleMapInsertTag()
           
 
Method Summary
 void addMapType(java.lang.String mapType)
          Adds a map type to the allowed list.
 int doStartTag()
          Overrides doStartTag() in TagSupport.
 int getBaseZoom()
          Returns the zoom level at which this image should be displayed at fullscale.
 int getHeight()
          Returns the full scale height (in pixels) of this image.
 java.lang.String getId()
          Returns the unique id for this insert.
 java.lang.String getMapType(int i)
          Returns the map type name at the given interation, or null if none exists.
 int getMapTypeCount()
          Returns the number of map type names that are to display this image insert, or 0 if there are none.
 java.lang.String getMapTypes()
          Returns the comma separated list of map type names that display this image insert.
 java.lang.String getPoint()
          Returns the id of the point tag that points to the centerpoint of this image.
 java.lang.String getUrl()
          Returns the url to the image to attach to the map.
 int getWidth()
          Returns the full scale width (in pixels) of this image.
 void setBaseZoom(int baseZoom)
          Sets the base zoom level where the image should be displayed at full scale.
 void setHeight(int height)
          Sets the full scale height (in pixels) of this image.
 void setId(java.lang.String id)
          Sets a map unique id for this insert.
 void setMapTypes(java.lang.String mapTypes)
          Sets the map types that should display this image insert.
 void setPoint(java.lang.String point)
          Sets the id of the point tag that points to the centerpoing of this image.
 void setUrl(java.lang.String url)
          Sets the url to the image that is to be attached to the map.
 void setWidth(int width)
          Sets the full scale width (in pixels) of this image.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GoogleMapInsertTag

public GoogleMapInsertTag()
Method Detail

setId

public void setId(java.lang.String id)
Sets a map unique id for this insert.

Parameters:
id - A unique identifier for this insert.

getId

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

Returns:
The inserts id.

getBaseZoom

public int getBaseZoom()
Returns the zoom level at which this image should be displayed at fullscale. The image will be scaled smaller/larger as the zoom level goes above/below this value.

Returns:
The base zoom level for this image.

setBaseZoom

public void setBaseZoom(int baseZoom)
Sets the base zoom level where the image should be displayed at full scale.

Parameters:
baseZoom - The zoom level this image is displayed at full scale.

getHeight

public int getHeight()
Returns the full scale height (in pixels) of this image.

Returns:
The height of the image in pixels.

setHeight

public void setHeight(int height)
Sets the full scale height (in pixels) of this image.

Parameters:
height - The height of the image, in pixels.

getPoint

public java.lang.String getPoint()
Returns the id of the point tag that points to the centerpoint of this image.

Returns:
The id of a point tag in this map.

setPoint

public void setPoint(java.lang.String point)
Sets the id of the point tag that points to the centerpoing of this image. The image will be placed on the map based on the longitude/latitude of this point.

Parameters:
point - The id of a point that is part of this map.

getUrl

public java.lang.String getUrl()
Returns the url to the image to attach to the map.

Returns:
A relative or absolute url.

setUrl

public void setUrl(java.lang.String url)
Sets the url to the image that is to be attached to the map. This may be either a relative or absolute url.

Parameters:
url - A relative or asolute url to a valid image file.

getWidth

public int getWidth()
Returns the full scale width (in pixels) of this image.

Returns:
The width of the image, in pixels.

setWidth

public void setWidth(int width)
Sets the full scale width (in pixels) of this image.

Parameters:
width - The full-scale width of the image, in pixels.

doStartTag

public int doStartTag()
Overrides doStartTag() in TagSupport. Developers should not override this method. If they do, they must call super.doStartTag() to ensure the tag get added to the tree properly.


addMapType

public void addMapType(java.lang.String mapType)
Adds a map type to the allowed list. The mapType parameter should correspond to the labels on the map type control buttons, and these are case sensitive. For example, use "Map", "Hybrid" or "Satellite" for the default map types.

Parameters:
mapType - A map type that should display this image insert.

setMapTypes

public void setMapTypes(java.lang.String mapTypes)
Sets the map types that should display this image insert. The mapTypes attribute must be a comma separated list of map type names, as denoted by the map type control buttons. For example, to display this image insert on all the standard map types you could specify "Map, Hybrid, Satellite". The map type names are case sensitive.

If you specify no names (by not setting this or passing it 'null') then all registered map types will display the image insert.

Parameters:
mapTypes - A comma separated list of valid map type names.

getMapTypes

public java.lang.String getMapTypes()
Returns the comma separated list of map type names that display this image insert. This method only returns a value if map types were set using setMapTypes(), otherwise it returns null.

Returns:
The comma separated list of included map type names.

getMapTypeCount

public int getMapTypeCount()
Returns the number of map type names that are to display this image insert, or 0 if there are none.

Returns:
The number of map type names included.

getMapType

public java.lang.String getMapType(int i)
Returns the map type name at the given interation, or null if none exists.

Returns:
The registered map type name at the given iterator, or null of none is defined.