Package eu.webtoolkit.jwt
Class WGoogleMap.Coordinate
java.lang.Object
eu.webtoolkit.jwt.WGoogleMap.Coordinate
- Enclosing class:
- WGoogleMap
A geographical coordinate (latitude/longitude)
-
Constructor Summary
ConstructorDescriptionDefault constructor.Coordinate
(double lat, double lon) Creates with given latitude and longitude. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Calculates the distance between two points in km (approximate).double
Returns the latitude.double
Returns the longitude.void
setLatitude
(double latitude) Sets the latitude.void
setLongitude
(double longitude) Sets the longitude.
-
Constructor Details
-
Coordinate
public Coordinate()Default constructor. -
Coordinate
public Coordinate(double lat, double lon) Creates with given latitude and longitude.
-
-
Method Details
-
setLatitude
public void setLatitude(double latitude) Sets the latitude. -
setLongitude
public void setLongitude(double longitude) Sets the longitude. -
getLatitude
public double getLatitude()Returns the latitude. -
getLongitude
public double getLongitude()Returns the longitude. -
distanceTo
Calculates the distance between two points in km (approximate).The calculation uses a sphere. Results can be out by 0.3%.
-