public class GeoMarker extends java.lang.Object implements GeoShape
Constructor and Description |
---|
GeoMarker(double lat,
double lon)
Create a geographic marker at the specified coordinates
|
GeoMarker(GeoCoord coordinate)
Create a geographic marker at the specified coordinate
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(double x,
double y)
Tests if the specified coordinates are inside the boundary of the Shape.
|
boolean |
contains(double x,
double y,
double w,
double h)
Tests if the interior of the Shape entirely contains the specified
rectangular area.
|
boolean |
contains(java.awt.geom.Point2D point)
Tests if the specified point is inside the boundary of the Shape
|
boolean |
contains(java.awt.geom.Rectangle2D rect)
Tests if the interior of the Shape entirely contains the specified
rectangular area.
|
java.awt.Rectangle |
getBounds()
Returns an integer Rectangle that completely encloses the Shape.
|
java.awt.geom.Rectangle2D |
getBounds2D()
Returns a high-precision Rectangle that completely encloses the Shape.
|
GeoCoord |
getCenter()
Get the center of the shape.
|
DataRecord |
getData()
Gets the user data of this GeoShape
|
GeoBounds |
getGeoBounds()
Get the geographic bounds for this shape.
|
GeoCoord[] |
getGeoPoints()
Returns the list of Geographic coordinates for this shape
|
java.awt.Shape |
getMarkerShape()
Get the shape used to render the marker.
|
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform at)
Returns an iterator object that iterates along the Shape boundary and
provides access to the geometry of the Shape outline.
|
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform at,
double flatness)
Returns an iterator object that iterates along the Shape boundary and
provides access to a flattened view of the Shape outline geometry.
|
double |
getRadius()
Get the radius for this geoShape.
|
RenderStyle |
getRenderStyle()
Get the rendering style for this GeoShape.
|
boolean |
intersects(double x,
double y,
double w,
double h)
Tests if the interior of the Shape intersects the interior of a
specified rectangular area.
|
boolean |
intersects(java.awt.geom.Rectangle2D rect)
Tests if the interior of the Shape intersects the interior of a
specified Rectangle
|
void |
project(Projection proj)
Projects the geographic coordinates into the given projection
|
void |
setData(DataRecord node)
Sets the data record associated with this GeoMarker
|
void |
setMarkerShape(java.awt.Shape shape)
Set the shape used to render the marker.
|
void |
setRenderStyle(RenderStyle style)
Set the rendering style for this GeoShape.
|
public GeoMarker(double lat, double lon)
lat
- the marker geographic latitude, in radianslon
- the marker geo graphic longitude, in radianspublic GeoMarker(GeoCoord coordinate)
coordinate
- the marker geographic coordinatepublic boolean contains(double x, double y)
contains
in interface java.awt.Shape
x
- the specified x coordinatey
- the specified x coordinatepublic boolean contains(double x, double y, double w, double h)
contains
in interface java.awt.Shape
x
- the x coordinate of the specified rectangular areay
- the y coordinate of the specified rectangular areaw
- the width of the specified rectangular areah
- the height of the specified rectangular areapublic boolean contains(java.awt.geom.Point2D point)
contains
in interface java.awt.Shape
point
- the specified pointpublic boolean contains(java.awt.geom.Rectangle2D rect)
contains
in interface java.awt.Shape
rect
- the specified rectanglepublic java.awt.Rectangle getBounds()
getBounds
in interface java.awt.Shape
public java.awt.geom.Rectangle2D getBounds2D()
getBounds2D
in interface java.awt.Shape
public GeoCoord getCenter()
public DataRecord getData()
public GeoBounds getGeoBounds()
getGeoBounds
in interface GeoShape
public GeoCoord[] getGeoPoints()
public java.awt.Shape getMarkerShape()
public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at)
getPathIterator
in interface java.awt.Shape
at
- an optional AffineTransform to be applied to the coordinates
as they are returned in the iteration, or null if
untransformed coordinates are desiredpublic java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at, double flatness)
getPathIterator
in interface java.awt.Shape
at
- an optional AffineTransform to be applied to the coordinates
as they are returned in the iteration, or null if
untransformed coordinates are desiredflatness
- the maximum distance that the line segments used to
approximate the curved segments are allowed to deviate from
any point on the original curvepublic double getRadius()
public RenderStyle getRenderStyle()
getRenderStyle
in interface GeoShape
public boolean intersects(double x, double y, double w, double h)
intersects
in interface java.awt.Shape
x
- the x coordinate of the specified rectangular areay
- the y coordinate of the specified rectangular areaw
- the width of the specified rectangular areah
- the height of the specified rectangular areapublic boolean intersects(java.awt.geom.Rectangle2D rect)
intersects
in interface java.awt.Shape
rect
- the specified RectanglePath2D.intersects(java.awt.geom.Rectangle2D)
public void project(Projection proj)
public void setData(DataRecord node)
public void setMarkerShape(java.awt.Shape shape)
shape
- the shape used to render the markerpublic void setRenderStyle(RenderStyle style)
setRenderStyle
in interface GeoShape
style
- The rendering style