public class GeoPosition extends Object
| 构造器 | 说明 |
|---|---|
GeoPosition(double[] coords) |
Creates a new instance of GeoPosition from the specified
latitude and longitude as an array of two doubles, with the
latitude first.
|
GeoPosition(double latitude,
double longitude) |
Creates a new instance of GeoPosition from the specified
latitude and longitude.
|
GeoPosition(double latDegrees,
double latMinutes,
double latSeconds,
double lonDegrees,
double lonMinutes,
double lonSeconds) |
Creates a new instance of GeoPosition from the specified
latitude and longitude.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
boolean |
equals(Object obj) |
Returns true the specified GeoPosition and this GeoPosition represent
the exact same latitude and longitude coordinates.
|
double |
getLatitude() |
Get the latitude as decimal degrees
|
double |
getLongitude() |
Get the longitude as decimal degrees
|
String |
toString() |
public GeoPosition(double latitude,
double longitude)
latitude - a latitude value in decmial degreeslongitude - a longitude value in decimal degreespublic GeoPosition(double[] coords)
coords - latitude and longitude as a double array of length twopublic GeoPosition(double latDegrees,
double latMinutes,
double latSeconds,
double lonDegrees,
double lonMinutes,
double lonSeconds)
latDegrees - the degrees part of the current latitudelatMinutes - the minutes part of the current latitudelatSeconds - the seconds part of the current latitudelonDegrees - the degrees part of the current longitudelonMinutes - the minutes part of the current longitudelonSeconds - the seconds part of the current longitudepublic double getLatitude()
public double getLongitude()
public boolean equals(Object obj)
Copyright © 2019. All rights reserved.