org.deltava.taglib.googlemap
Class GoogleMapEntryTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by org.deltava.taglib.JSTag
          extended by org.deltava.taglib.googlemap.GoogleMapEntryTag
All Implemented Interfaces:
Serializable, IterationTag, JspTag, Tag
Direct Known Subclasses:
LineTag, MapTypeTag, MarkerArrayTag, MarkerTag, PointArrayTag, PointTag

public abstract class GoogleMapEntryTag
extends JSTag

An abstract class to support Google Maps JSP tags.

Since:
1.0
Version:
2.4
Author:
Luke
See Also:
Serialized Form

Field Summary
(package private) static String API_JS_NAME
          Internal name used to check for Google Maps API inclusion.
 
Fields inherited from class org.deltava.taglib.JSTag
_jsVarName
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
GoogleMapEntryTag()
           
 
Method Summary
 int doStartTag()
          Executed before the Tag is rendered.
protected  String generateIconMarker(GeoLocation loc, int paletteCode, int iconCode, String label)
          Generates a call to googleIconMarker() to generate a Google Maps icon marker.
protected  String generateMarker(GeoLocation loc, String color, String label)
          Generates a call to googleMarker() to generate a Google Maps marker.
 
Methods inherited from class org.deltava.taglib.JSTag
release, setVar
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

API_JS_NAME

static final String API_JS_NAME
Internal name used to check for Google Maps API inclusion.

See Also:
Constant Field Values
Constructor Detail

GoogleMapEntryTag

public GoogleMapEntryTag()
Method Detail

doStartTag

public int doStartTag()
               throws JspException
Executed before the Tag is rendered. This will check for the presence of required JavaScript files in the request. Tags that do not require this check can override this method.

Specified by:
doStartTag in interface Tag
Overrides:
doStartTag in class TagSupport
Returns:
TagSupport.SKIP_BODY always
Throws:
IllegalStateException - if the Google Maps API or googleMaps.js not included in request
JspException

generateMarker

protected String generateMarker(GeoLocation loc,
                                String color,
                                String label)
Generates a call to googleMarker() to generate a Google Maps marker.

Parameters:
loc - the location
color - the icon color
label - the label HTML text, or null if none
Returns:
a JavaScript function call definition

generateIconMarker

protected String generateIconMarker(GeoLocation loc,
                                    int paletteCode,
                                    int iconCode,
                                    String label)
Generates a call to googleIconMarker() to generate a Google Maps icon marker.

Parameters:
loc - the location
paletteCode - the Google Earth palette code
iconCode - the Google Earth icon code
label - the label HTML text, or null if none
Returns:
a JavaScript function call definition


Copyright © 2004-2009 Global Virtual Airlines Group. All Rights Reserved.