Class Area

All Implemented Interfaces:
com.jbstrap.core.event.handlers.BrowserEventHandler, PopupDrawnEventHandler, PopupHideEventHandler, LayerStyleLayer<Area>, TooltipLayer<Area>, MultiCoordinatesLayer

This class represents an area shape on the map. You can add a tooltip to the area. Read more about tooltip configuration in the TooltipLayer class. You can add a layer style to the area. Read more about layer style configuration in the LayerStyleLayer class.
Since:
4.0
See Also:
  • Field Details

  • Constructor Details

    • Area

      public Area(String name, List<Coordinates> coordinates)
      Creates an area with the layer's unique name and a list of point coordinates.
      Parameters:
      name - The unique name of the area Use the name parameter to get the layer from a layer group. LayerGroup
      coordinates - A list of area point coordinates These points are connected by line segments, following the order of the points. Coordinates
      Throws:
      NullPointerException - Thrown if the value of the name parameter is null
    • Area

      public Area(String name, Coordinates... coordinates)
      Creates an area with the layer's unique name and a list of point coordinates.
      Parameters:
      name - The unique name of the area Use the name parameter to get the layer from a layer group. LayerGroup
      coordinates - A list of area point coordinates These points are connected by line segments, following the order of the points. Coordinates
      Throws:
      NullPointerException - Thrown if the value of the name parameter is null
  • Method Details

    • getCoordinatesList

      public List<Coordinates> getCoordinatesList()
      Gets a list of area layer coordinates.
      Returns:
      Area layer point coordinates
    • setCoordinatesList

      public Area setCoordinatesList(List<Coordinates> coordinates)
      Sets a list of area layer point coordinates. The coordinates in the list are the coordinates of the area points connected by line segments, following an order specified in the list. The last point is connected by a line segment with the first point, forming a closed area shape.
      Parameters:
      coordinates - A list of area layer point coordinates
      Returns:
      Area class instance
    • onPopupDrawn

      public void onPopupDrawn(PopupDrawnEvent event)
      Registering the events for the popup draw event in the popup component.
      Specified by:
      onPopupDrawn in interface PopupDrawnEventHandler
      Parameters:
      event - The popup drawn event component
    • onPopupHide

      public void onPopupHide(PopupHideEvent event)
      Registering the events for the popup hide event in the popup component.
      Specified by:
      onPopupHide in interface PopupHideEventHandler
      Parameters:
      event - The popup hide event component