Class MapEntryTag
java.lang.Object
jakarta.servlet.jsp.tagext.TagSupport
org.deltava.taglib.JSTag
org.deltava.taglib.mapbox.MapEntryTag
- All Implemented Interfaces:
jakarta.servlet.jsp.tagext.IterationTag, jakarta.servlet.jsp.tagext.JspTag, jakarta.servlet.jsp.tagext.Tag, Serializable
- Direct Known Subclasses:
BoundsTag, LineTag, MarkerArrayTag, MarkerTag, PointArrayTag, PointTag
An abstract class to support MapBox JSP tags.
- Since:
- 12.0
- Version:
- 12.0
- Author:
- Luke
-
Field Summary
Fields inherited from class JSTag
_jsVarNameFields inherited from class jakarta.servlet.jsp.tagext.TagSupport
id, pageContextFields inherited from interface jakarta.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface jakarta.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintExecuted before the Tag is rendered.protected static StringgenerateIconMarker(GeoLocation loc, int paletteCode, int iconCode, String infoBox, String label) Generates a call to googleIconMarker() to generate a Google Maps icon marker.protected static StringgenerateMarker(GeoLocation loc, String color, String infoBox, String label) Generates a call to googleMarker() to generate a Google Maps marker.protected intReturns the MapBox API version used on this page.Methods inherited from class JSTag
release, setConst, setVar, writeVariableNameMethods inherited from class jakarta.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
-
Constructor Details
-
MapEntryTag
MapEntryTag()
-
-
Method Details
-
doStartTag
public int doStartTag() throws jakarta.servlet.jsp.JspExceptionExecuted 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:
doStartTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doStartTagin classjakarta.servlet.jsp.tagext.TagSupport- Returns:
- TagSupport.SKIP_BODY always
- Throws:
IllegalStateException- if the MapBox API or mapbox.js not included in requestjakarta.servlet.jsp.JspException
-
getAPIVersion
protected int getAPIVersion()Returns the MapBox 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 colorinfoBox- the InfoBox HTML text, or null if nonelabel- the marker label text, or null if none- Returns:
- a JavaScript function call definition
-
generateIconMarker
protected static String generateIconMarker(GeoLocation loc, int paletteCode, int iconCode, String infoBox, 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 codeinfoBox- the InfoBox HTML text, or null if nonelabel- the marker label text, or null if none- Returns:
- a JavaScript function call definition
-