Class LatLngBounds
java.lang.Object
org.vaadin.addons.componentfactory.leaflet.types.LatLngBounds
- All Implemented Interfaces:
Serializable,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 Summary
ConstructorsConstructorDescriptionCreates a new empty bounds.LatLngBounds(List<LatLng> latlngs) Creates bounds extended to contain all the given points.LatLngBounds(LatLng latlng) Creates bounds reduced to the single given point.LatLngBounds(LatLng... latlngs) Creates bounds extended to contain all the given points. -
Method Summary
Modifier and TypeMethodDescriptionvoidExtends the bounds to contain the given points.voidExtends the bounds to contain the given points.voidextend(LatLngBounds bounds) Extend the bounds to contain the given boundsReturns the center point of the bounds.doublegetEast()Returns the east longitude of the boundsdoublegetNorth()Returns the north latitude of the boundsReturns the north-east point of the bounds.Returns the north-west point of the bounds.doublegetSouth()Returns the south latitude of the boundsReturns the south-east point of the bounds.Returns the south-west point of the bounds.doublegetWest()Returns the west longitude of the boundsvoidsetNorthEast(LatLng northEast) Sets the north-east corner of the bounds.voidsetSouthWest(LatLng southWest) Sets the south-west corner of the bounds.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.vaadin.addons.componentfactory.leaflet.types.BasicType
getLeafletType
-
Constructor Details
-
LatLngBounds
public LatLngBounds()Creates a new empty bounds. -
LatLngBounds
Creates bounds extended to contain all the given points.- Parameters:
latlngs- the points the bounds should contain
-
LatLngBounds
Creates bounds extended to contain all the given points.- Parameters:
latlngs- the points the bounds should contain
-
LatLngBounds
Creates bounds reduced to the single given point.- Parameters:
latlng- the point defining both corners of the bounds
-
-
Method Details
-
setSouthWest
Sets the south-west corner of the bounds.- Parameters:
southWest- the southWest to set
-
setNorthEast
Sets the north-east corner of the bounds.- Parameters:
northEast- the northEast to set
-
getSouthWest
Returns the south-west point of the bounds.- Returns:
- the south-west point of the bounds.
-
getSouthEast
Returns the south-east point of the bounds.- Returns:
- the south-east point of the bounds
-
getNorthEast
Returns the north-east point of the bounds.- Returns:
- the north-east point of the bounds.
-
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
Returns the center point of the bounds.- Returns:
- the center point of the bounds.
-
extend
Extends the bounds to contain the given points.- Parameters:
latlngs- the points to include
-
extend
Extends the bounds to contain the given points.- Parameters:
latlngs- the points to include
-
toString
-
extend
Extend the bounds to contain the given bounds- Parameters:
bounds- the bounds
-