All Implemented Interfaces:
Serializable, Evented, SupportsMouseEvents, HasStyle, Identifiable, LayerPopupFunctions, LayerTooltipFunctions, ExecutableFunctions, PathFunctions

public class Rectangle extends Polygon
A class for drawing rectangle overlays on a map. Extends Polygon.
See Also:
  • Constructor Details

    • Rectangle

      public Rectangle(LatLng... latlngs)
      Instantiates a rectangle from the given geographical points defining its corners.
      Parameters:
      latlngs - the geographical points defining the rectangle
    • Rectangle

      public Rectangle(List<LatLng> latlngs)
      Instantiates a rectangle from the given list of geographical points defining its corners.
      Parameters:
      latlngs - the geographical points defining the rectangle