public static class ERXGMapUtilities.Coordinate extends Object
| Modifier and Type | Field and Description |
|---|---|
static char |
UNIT_KILOMETERS |
static char |
UNIT_NAUTICAL_MILES |
static char |
UNIT_STATUTE_MILES |
| Constructor and Description |
|---|
Coordinate(double latitude,
double longitude) |
| Modifier and Type | Method and Description |
|---|---|
static double |
distance(double lat1,
double lon1,
double lat2,
double lon2,
char unit)
Calculate distance between two coordinates.
|
double |
distanceTo(ERXGMapUtilities.Coordinate other,
char unit) |
double |
latitude() |
double |
longitude() |
String |
toString() |
public static final char UNIT_STATUTE_MILES
public static final char UNIT_NAUTICAL_MILES
public static final char UNIT_KILOMETERS
public double latitude()
public double longitude()
public double distanceTo(ERXGMapUtilities.Coordinate other, char unit)
public static double distance(double lat1,
double lon1,
double lat2,
double lon2,
char unit)
lat1 - Latitude of point 1 (in decimal degrees)lon1 - Longitude of point 1 (in decimal degrees)lat2 - Latitude of point 2 (in decimal degrees)lon2 - Longitude of point 2 (in decimal degrees)unit - one of UNIT_STATUTE_MILES, UNIT_NAUTICAL_MILES or
UNIT_KILOMETERSCopyright © 2002 – 2020 Project Wonder.