Class Marker

java.lang.Object
com.geodesk.util.Marker

public abstract class Marker extends Object
A marker on a Leaflet-based interactive map.
  • Field Details

  • Constructor Details

    • Marker

      public Marker()
  • Method Details

    • tooltip

      public Marker tooltip(String tooltip)
      Sets the content to be displayed whenever the cursor is hovered over this Marker.
      Parameters:
      tooltip - HTML-formatted content
      Returns:
      this Marker
    • url

      public Marker url(String url)
      Sets the URL which is navigated when the user clicks on this Marker.
      Parameters:
      url - a URL
      Returns:
      this Marker
    • options

      public Marker options(Map<String,Object> moreOptions)
      Specifies options for this Marker. See the Leaflet documentation for a list of available options.
      Parameters:
      moreOptions - a key-value map
      Returns:
      this Marker
    • option

      public Marker option(String key, Object value)
      Speficies a single option for this Marker. See the Leaflet documentation for a list of available options.
      Parameters:
      key - the name of the option (e.g. `opacity` or `lineCap`)
      value - the value of the option
      Returns:
    • color

      public Marker color(String color)
      Specifies the color of this Marker.
      Parameters:
      color - a named color or RGB spec (e.g. #3388ff)
      Returns:
      this Marker
    • defaultTooltip

      public String defaultTooltip()
    • isVisible

      public boolean isVisible()
    • writePoint

      protected void writePoint(Appendable out, double x, double y) throws IOException
      Throws:
      IOException
    • writeCoordinates

      protected void writeCoordinates(Appendable out, CoordinateSequence coords) throws IOException
      Throws:
      IOException
    • bounds

      public abstract Bounds bounds()
    • writeStub

      protected abstract void writeStub(Appendable out) throws IOException
      Throws:
      IOException
    • write

      public void write(Appendable out) throws IOException
      Throws:
      IOException