Class MapEntryTag

All Implemented Interfaces:
Serializable, IterationTag, JspTag, Tag
Direct Known Subclasses:
BoundsTag, LineTag, MarkerArrayTag, MarkerTag, PointArrayTag, PointTag

abstract class MapEntryTag extends JSTag
An abstract class to support MapBox JSP tags.
Since:
12.0
Version:
12.0
Author:
Luke
  • Constructor Details

    • MapEntryTag

      MapEntryTag()
  • Method Details

    • 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 MapBox API or mapbox.js not included in request
      JspException
    • getAPIVersion

      protected int getAPIVersion()
      Returns the MapBox API version used on this page.
      Returns:
      the API major version
    • generateMarker

      protected static String generateMarker(GeoLocation loc, String color, String infoBox, String label)
      Generates a call to googleMarker() to generate a Google Maps marker.
      Parameters:
      loc - the location
      color - the icon color
      infoBox - the InfoBox HTML text, or null if none
      label - 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 location
      paletteCode - the Google Earth palette code
      iconCode - the Google Earth icon code
      infoBox - the InfoBox HTML text, or null if none
      label - the marker label text, or null if none
      Returns:
      a JavaScript function call definition