Class WLeafletMap.AbstractDrawnItem

Direct Known Subclasses:
WLeafletMap.Circle, WLeafletMap.Polyline
Enclosing class:
WLeafletMap

public abstract static class WLeafletMap.AbstractDrawnItem extends WLeafletMap.AbstractMapItem
An abstract map item drawn the map.

This is the base class for all AbstractMapItems that are drawn on the map. This is an abstract class, so it should not be used directly.

  • Constructor Details

  • Method Details

    • setPen

      public void setPen(WPen pen)
      Set the pen used to draw the outline of the item.

      This sets the pen used to draw the outline of the item.

      By default, the default WPen() is used.

      See Also:
    • getPen

      public WPen getPen()
      Return the pen used to draw the outline of the item.

      See Also:
    • setBrush

      public void setBrush(WBrush brush)
      Set the brush used to fill the item.

      This sets the brush used to fill the item.

      By default, the default WBrush() is used, which means no fill.

      See Also:
    • getBrush

      public WBrush getBrush()
      Return the brush used to fill the item.

      See Also:
    • addStyleOptions

      protected void addStyleOptions(com.google.gson.JsonObject options)
      Adds the style options to the given JSON object.

      This adds the style options (from the pen and brush) to the given JSON object. This should be called on the options that you are adding to the drawn item at creation (in AbstractMapItem#createItemJS()).