public class MapViewState.MapViewRectangle extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private MapViewState.MapViewPoint |
p1 |
private MapViewState.MapViewPoint |
p2 |
Constructor and Description |
---|
MapViewRectangle(MapViewState.MapViewPoint p1,
MapViewState.MapViewPoint p2)
Create a new MapViewRectangle
|
Modifier and Type | Method and Description |
---|---|
Bounds |
getCornerBounds()
Gets a rough estimate of the bounds by assuming lat/lon are parallel to x/y.
|
java.awt.geom.Rectangle2D |
getInView()
Gets this rectangle on the screen.
|
Bounds |
getLatLonBoundsBox()
Gets the real bounds that enclose this rectangle.
|
MapViewState.MapViewPoint |
getLineEntry(MapViewState.MapViewPoint start,
MapViewState.MapViewPoint end)
Gets the entry point at which a line between start and end enters the current view.
|
ProjectionBounds |
getProjectionBounds()
Gets the projection bounds for this rectangle.
|
boolean |
isInView()
Check if the rectangle intersects the map view area.
|
private final MapViewState.MapViewPoint p1
private final MapViewState.MapViewPoint p2
MapViewRectangle(MapViewState.MapViewPoint p1, MapViewState.MapViewPoint p2)
p1
- The first point to usep2
- The second point to use.public ProjectionBounds getProjectionBounds()
public Bounds getCornerBounds()
getLatLonBoundsBox()
public Bounds getLatLonBoundsBox()
public java.awt.geom.Rectangle2D getInView()
public boolean isInView()
true
if it intersects.public MapViewState.MapViewPoint getLineEntry(MapViewState.MapViewPoint start, MapViewState.MapViewPoint end)
start
- The startend
- The endnull
if the line does not intersect this view.