Class Circle

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

This class represents a circle shape on the map. You can add a tooltip that you can configure freely. Read more about tooltip configuration in the TooltipLayer class. You can add a layer style to the circle. Read more about layer style configuration in the LayerStyleLayer class.
Since:
4.0
See Also:
  • Constructor Details

    • Circle

      public Circle(String name, Coordinates coordinates)
      Creates a circle shape with 5 km radius.
      Parameters:
      name - Unique ID
      coordinates - Circle center coordinates
      Throws:
      NullPointerException - Thrown if the value of the name or coordinates parameter is null
    • Circle

      public Circle(String name, Coordinates coordinates, int radius)
      Creates a center shape.
      Parameters:
      name - Unique ID
      coordinates - Circle center coordinates
      radius - Circle radius (meters)
      Throws:
      NullPointerException - Thrown if the value of the name or coordinates parameter is null
  • Method Details

    • getCoordinates

      public Coordinates getCoordinates()
      Gets the circle center coordinates.
      Returns:
      Circle center coordinates
    • setCoordinates

      public Circle setCoordinates(Coordinates coordinates)
      Sets the circle center coordinates.
      Parameters:
      coordinates - A Coordinates type object that contains longitude and latitude values
      Returns:
      The instantiated Circle class
    • getRadius

      public int getRadius()
      Gets the circle radius.
      Returns:
      The circle radius in meters
    • setRadius

      public Circle setRadius(int radius)
      Sets the circle radius.
      Parameters:
      radius - The circle radius in meters
      Returns:
      The instantiated Circle class
    • 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