org.jdesktop.swingx.mapviewer
Class GeoBounds

java.lang.Object
  extended by org.jdesktop.swingx.mapviewer.GeoBounds

public class GeoBounds
extends Object

The GeoBounds class provides access the the North East and South West corners of the bounds and provides an intersects method.


Constructor Summary
GeoBounds(double minLat, double minLng, double maxLat, double maxLng)
          Constructor.
GeoBounds(Set<GeoPosition> geoPositions)
          Constructor.
 
Method Summary
 GeoPosition getNorthWest()
          Gets the north west position.
 GeoPosition getSouthEast()
          Gets the south east position.
 boolean intersects(GeoBounds other)
          Determines if this bounds intersects the other bounds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeoBounds

public GeoBounds(double minLat,
                 double minLng,
                 double maxLat,
                 double maxLng)
Constructor.

Parameters:
minLat - The minimum latitude.
minLng - The minimum longitude.
maxLat - The maximum latitude.
maxLng - The maximum longitude.

GeoBounds

public GeoBounds(Set<GeoPosition> geoPositions)
Constructor.

Parameters:
geoPositions - A non null list of 2 or more different GeoBounds objects.
Method Detail

intersects

public boolean intersects(GeoBounds other)
Determines if this bounds intersects the other bounds.

Parameters:
other - The other bounds to test for intersection with.
Returns:
Returns true if bounds intersect.

getNorthWest

public GeoPosition getNorthWest()
Gets the north west position.

Returns:
Returns the north west position.

getSouthEast

public GeoPosition getSouthEast()
Gets the south east position.

Returns:
Returns the south east position.