org.wicketstuff.openlayers.api
Class LonLat

java.lang.Object
  extended by 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
protected static String DEFAULT_PROJECTION
          Default projection
 
Constructor Summary
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
 boolean equals(Object obj)
           
 String getJSconstructor()
           
 double getLat()
          Returns the latitude for this coordinate.
 double getLng()
          Returns the longitude for this coordinate.
 com.vividsolutions.jts.geom.Point getPoint()
           
 int hashCode()
           
static LonLat parse(String value)
          (37.34068368469045, -122.48519897460936)
static LonLat parseWithNames(String value)
          (lon=37.34068368469045, lat=-122.48519897460936)
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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 value
lat - Latitude value

LonLat

public LonLat(double lng,
              double lat,
              String projection)
Creates a new instance.

Parameters:
lng - Longitude value
lat - Latitude value
projection - Projection for this coordinate

LonLat

public LonLat(double lng,
              double lat,
              String projection,
              String targetProjection)
Creates a new instance.

Parameters:
lng - Longitude value
lat - Latitude value
projection - Projection for this coordinate
targetProjection - 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 coordinate
projection - Projection for this coordinate

LonLat

public LonLat(com.vividsolutions.jts.geom.Point point,
              String projection,
              String targetProjection)
Creates a new instance.

Parameters:
point - Point coordinate
projection - Projection for this coordinate
targetProjection - Target projection when placing coordinate on map
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

toString

public String toString()
Overrides:
toString in class Object

getJSconstructor

public String getJSconstructor()
Specified by:
getJSconstructor in interface Value
Returns:
A JavaScript constructor that represents this element.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getPoint

public com.vividsolutions.jts.geom.Point getPoint()

parse

public static LonLat parse(String value)
(37.34068368469045, -122.48519897460936)


parseWithNames

public static LonLat parseWithNames(String value)
(lon=37.34068368469045, lat=-122.48519897460936)



Copyright © 2008–2018. All rights reserved.