@JsType(isNative=true) public class LatLng extends Object
| Modifier and Type | Field and Description |
|---|---|
Double |
lat
Latitude in degrees.
|
Double |
lng
Longitude in degrees.The lng.
|
| Constructor and Description |
|---|
LatLng(double lat,
double lng)
Instantiates a new lat lng.
|
| Modifier and Type | Method and Description |
|---|---|
double |
distanceTo(LatLng otherLatlng)
Returns the distance (in meters) to the given LatLng calculated using the Haversine formula.
|
Boolean |
equals(LatLng otherLatlng)
Returns true if the given LatLng point is at the same position (within a small margin of error).
|
String |
toString() |
LatLng |
wrap(double left,
double right)
Returns a new LatLng object with the longitude wrapped around left and right boundaries (-180 to 180 by default).
|
@JsProperty public Double lat
@JsProperty public Double lng
@JsConstructor
public LatLng(double lat,
double lng)
lat - the latlng - the lng@JsMethod public double distanceTo(LatLng otherLatlng)
otherLatlng - the other latlng@JsMethod public Boolean equals(LatLng otherLatlng)
otherLatlng - the other latlng@JsMethod public LatLng wrap(double left, double right)
left - the leftright - the rightCopyright © 2018 G-Widgets. All rights reserved.