Interface CanvasLayer.Polygon

All Superinterfaces:
CanvasLayer.Geometry
Enclosing interface:
CanvasLayer

public static interface CanvasLayer.Polygon extends CanvasLayer.Geometry
A wrapper class encapsulating Polygon on the canvas.
  • Method Details

    • getGeometry

      org.locationtech.jts.geom.Polygon getGeometry()
      Returns a JTS polygon.
      Specified by:
      getGeometry in interface CanvasLayer.Geometry
    • setStyle

      Applies a style to the polygon.
      Parameters:
      style - polygon style
      Returns:
      current polygon. Useful for a fluent API.
    • setPopupContent

      CanvasLayer.Polygon setPopupContent(String popupContent)
      Adds a popup window to be opened as user clicks on the polygon.
      Parameters:
      popupContent - content of the popup window
      Returns:
      current polygon. Useful for a fluent API.
    • setPopupOptions

      CanvasLayer.Polygon setPopupOptions(PopupWindowOptions options)
      Specifies options for a popup window added by setPopupContent(String).
      Parameters:
      options - popup window options
      Returns:
      current polygon. Useful for a fluent API.
    • setTooltipContent

      CanvasLayer.Polygon setTooltipContent(String tooltipContent)
      Adds a tooltip to be opened as user hovers on the polygon.
      Parameters:
      tooltipContent - content of the tooltip box
      Returns:
      current polygon. Useful for a fluent API.
    • setTooltipOptions

      CanvasLayer.Polygon setTooltipOptions(TooltipOptions options)
      Specifies options for a tooltip added by setTooltipContent(String).
      Parameters:
      options - tooltip options
      Returns:
      current polygon. Useful for a fluent API.
    • setEditable

      CanvasLayer.Polygon setEditable(boolean editable)
      Description copied from interface: CanvasLayer.Geometry
      Sets whether the geometry is to be modifiable on a canvas.
      Specified by:
      setEditable in interface CanvasLayer.Geometry
    • addClickListener

      Registers a new polygon click listener.
      Parameters:
      listener - the listener to be added
      Returns:
      a registration object for removing an event listener added to a source
    • addRightClickListener

      Subscription addRightClickListener(Consumer<CanvasLayer.Polygon.RightClickEvent> listener)
      Registers a new polygon right click listener.
      Parameters:
      listener - the listener to be added
      Returns:
      a registration object for removing an event listener added to a source
    • addModifiedListener

      Registers a new polygon modified listener.
      Parameters:
      listener - the listener to be added
      Returns:
      a registration object for removing an event listener added to a source