Class Line

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

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

  • Constructor Details

    • Line

      public Line(String name, List<Coordinates> coordinates)
      Creates an line with the layer's unique name and a list of point coordinates.
      Parameters:
      name - Line layer unique name Use the name parameter to get the layer from a layer group. LayerGroup
      coordinates - A list of line 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
    • Line

      public Line(String name, Coordinates... coordinates)
      Creates a line with the layer's unique name and a list of point coordinates.
      Parameters:
      name - Line layer unique name Use the name parameter to get the layer from a layer group. LayerGroup
      coordinates - A list of line 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 line layer coordinates.
      Returns:
      Line layer point coordinates
    • setCoordinatesList

      public Line setCoordinatesList(List<Coordinates> coordinates)
      Gets a list of line layer coordinates. The coordinates in the list are the coordinates of the line points connected by line segments, following an order specified in the list.
      Parameters:
      coordinates - A list of line layer point coordinates
      Returns:
      Line 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