Package org.wicketstuff.openlayers.api
Class LonLat
- java.lang.Object
-
- org.wicketstuff.openlayers.api.LonLat
-
- All Implemented Interfaces:
Serializable,Value
- Direct Known Subclasses:
SphericalMercatorLonLat
public class LonLat extends Object implements Value
Represents an Open layers http://dev.openlayers.org/apidocs/files/OpenLayers/BaseTypes/LonLat-js.html- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringDEFAULT_PROJECTIONDefault projection
-
Constructor Summary
Constructors Constructor Description LonLat(double lng, double lat)Creates a new instance.LonLat(double lng, double lat, String projection)Creates a new instance.LonLat(double lng, double lat, String projection, String targetProjection)Creates a new instance.LonLat(com.vividsolutions.jts.geom.Point point)Creates a new instance.LonLat(com.vividsolutions.jts.geom.Point point, String projection)Creates a new instance.LonLat(com.vividsolutions.jts.geom.Point point, String projection, String targetProjection)Creates a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)StringgetJSconstructor()doublegetLat()Returns the latitude for this coordinate.doublegetLng()Returns the longitude for this coordinate.com.vividsolutions.jts.geom.PointgetPoint()inthashCode()static LonLatparse(String value)(37.34068368469045, -122.48519897460936)static LonLatparseWithNames(String value)(lon=37.34068368469045, lat=-122.48519897460936)StringtoString()
-
-
-
Field Detail
-
DEFAULT_PROJECTION
protected static final String DEFAULT_PROJECTION
Default projection- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LonLat
public LonLat(double lng, double lat)Creates a new instance.- Parameters:
lng- Longitude valuelat- Latitude value
-
LonLat
public LonLat(double lng, double lat, String projection)Creates a new instance.- Parameters:
lng- Longitude valuelat- Latitude valueprojection- Projection for this coordinate
-
LonLat
public LonLat(double lng, double lat, String projection, String targetProjection)Creates a new instance.- Parameters:
lng- Longitude valuelat- Latitude valueprojection- Projection for this coordinatetargetProjection- Target projection when placing coordinate on map
-
LonLat
public LonLat(com.vividsolutions.jts.geom.Point point)
Creates a new instance.- Parameters:
point- Point coordinate
-
LonLat
public LonLat(com.vividsolutions.jts.geom.Point point, String projection)Creates a new instance.- Parameters:
point- Point coordinateprojection- Projection for this coordinate
-
-
Method Detail
-
getLat
public double getLat()
Returns the latitude for this coordinate.- Returns:
- Latitude value
-
getLng
public double getLng()
Returns the longitude for this coordinate.- Returns:
- Longitude value
-
getJSconstructor
public String getJSconstructor()
- Specified by:
getJSconstructorin interfaceValue- Returns:
- A JavaScript constructor that represents this element.
-
getPoint
public com.vividsolutions.jts.geom.Point getPoint()
-
-