Package org.deltava.taglib.googlemap
Class GoogleMapEntryTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.deltava.taglib.JSTag
org.deltava.taglib.googlemap.GoogleMapEntryTag
- All Implemented Interfaces:
Serializable
,IterationTag
,JspTag
,Tag
- Direct Known Subclasses:
BoundsTag
,LineTag
,MarkerArrayTag
,MarkerTag
,PointArrayTag
,PointTag
An abstract class to support Google Maps JSP tags.
- Since:
- 1.0
- Version:
- 6.0
- Author:
- Luke
-
Field Summary
Modifier and TypeFieldDescription(package private) static final String
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
-
Method Summary
Modifier and TypeMethodDescriptionint
Executed before the Tag is rendered.protected static String
generateIconMarker
(GeoLocation loc, int paletteCode, int iconCode, String label) Generates a call to googleIconMarker() to generate a Google Maps icon marker.protected static String
generateMarker
(GeoLocation loc, String color, String label) Generates a call to googleMarker() to generate a Google Maps marker.protected int
Returns the Google Maps API version used on this page.Methods inherited from class org.deltava.taglib.JSTag
release, setConst, setVar, writeVariableName
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
-
Field Details
-
API_JS_NAME
Internal name used to check for Google Maps API inclusion.- See Also:
-
-
Constructor Details
-
GoogleMapEntryTag
GoogleMapEntryTag()
-
-
Method Details
-
doStartTag
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 interfaceTag
- Overrides:
doStartTag
in classTagSupport
- Returns:
- TagSupport.SKIP_BODY always
- Throws:
IllegalStateException
- if the Google Maps API or googleMaps.js not included in requestJspException
-
getAPIVersion
protected int getAPIVersion()Returns the Google Maps API version used on this page.- Returns:
- the API major version
-
generateMarker
Generates a call to googleMarker() to generate a Google Maps marker.- Parameters:
loc
- the locationcolor
- the icon colorlabel
- the label HTML text, or null if none- Returns:
- a JavaScript function call definition
-
generateIconMarker
protected static 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 locationpaletteCode
- the Google Earth palette codeiconCode
- the Google Earth icon codelabel
- the label HTML text, or null if none- Returns:
- a JavaScript function call definition
-