java.lang.Object
org.vaadin.addons.componentfactory.leaflet.types.LatLngBounds
All Implemented Interfaces:
Serializable, BasicType

public class LatLngBounds extends Object implements BasicType
Represents a rectangular geographical area on a map.
Since:
2020-03-21
Version:
1.0
Author:
Gabor Kokeny Email: kokeny19@gmail.com
See Also:
  • Constructor Details

    • LatLngBounds

      public LatLngBounds()
      Creates a new empty bounds.
    • LatLngBounds

      public LatLngBounds(LatLng... latlngs)
      Creates bounds extended to contain all the given points.
      Parameters:
      latlngs - the points the bounds should contain
    • LatLngBounds

      public LatLngBounds(List<LatLng> latlngs)
      Creates bounds extended to contain all the given points.
      Parameters:
      latlngs - the points the bounds should contain
    • LatLngBounds

      public LatLngBounds(LatLng latlng)
      Creates bounds reduced to the single given point.
      Parameters:
      latlng - the point defining both corners of the bounds
  • Method Details

    • setSouthWest

      public void setSouthWest(LatLng southWest)
      Sets the south-west corner of the bounds.
      Parameters:
      southWest - the southWest to set
    • setNorthEast

      public void setNorthEast(LatLng northEast)
      Sets the north-east corner of the bounds.
      Parameters:
      northEast - the northEast to set
    • getSouthWest

      public LatLng getSouthWest()
      Returns the south-west point of the bounds.
      Returns:
      the south-west point of the bounds.
    • getSouthEast

      public LatLng getSouthEast()
      Returns the south-east point of the bounds.
      Returns:
      the south-east point of the bounds
    • getNorthEast

      public LatLng getNorthEast()
      Returns the north-east point of the bounds.
      Returns:
      the north-east point of the bounds.
    • getNorthWest

      public LatLng getNorthWest()
      Returns the north-west point of the bounds.
      Returns:
      Returns the north-west point of the bounds
    • getWest

      public double getWest()
      Returns the west longitude of the bounds
      Returns:
      the west longitude of the bounds
    • getSouth

      public double getSouth()
      Returns the south latitude of the bounds
      Returns:
      the south latitude of the bounds
    • getEast

      public double getEast()
      Returns the east longitude of the bounds
      Returns:
      the east longitude of the bounds
    • getNorth

      public double getNorth()
      Returns the north latitude of the bounds
      Returns:
      the north latitude of the bounds
    • getCenter

      public LatLng getCenter()
      Returns the center point of the bounds.
      Returns:
      the center point of the bounds.
    • extend

      public void extend(LatLng... latlngs)
      Extends the bounds to contain the given points.
      Parameters:
      latlngs - the points to include
    • extend

      public void extend(List<LatLng> latlngs)
      Extends the bounds to contain the given points.
      Parameters:
      latlngs - the points to include
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • extend

      public void extend(LatLngBounds bounds)
      Extend the bounds to contain the given bounds
      Parameters:
      bounds - the bounds