new GeoPosition(latitude, longitude)
Constructs a geo position with the specified coordinates (in degrees)
Parameters:
Name | Type | Description |
---|---|---|
latitude | number | North-south position |
longitude | number | East-west position |
Throws:
If latitude or longitude is not in the range of allowed positions
The value of a geo position attribute.
Methods
distance() → {number}
Returns the distance to the other position, in meters
Returns:
- Type:
- number
equals(value) → {boolean}
Returns true if the values are equal
Parameters:
Name | Type | Description |
---|---|---|
value | Another attribute value |
Returns:
- Type:
- boolean
lat() → {number}
Returns the latitude (north-south position) as degrees
Returns:
- Type:
- number
long() → {number}
Returns the longitude (east-west position) as degrees
Returns:
- Type:
- number
setLat(latitude)
Set the latitude (north-south position, in degrees)
Parameters:
Name | Type | Description |
---|---|---|
latitude | number |
setLong(longitude)
Set the longitude (east-west position, in degrees)
Parameters:
Name | Type | Description |
---|---|---|
longitude | number |
toFormat(format) → {string}
Returns the string representation in the specified format ('KML', 'UTM' etc.)
Parameters:
Name | Type | Description |
---|---|---|
format | string | Name of a supported format |
Returns:
- Type:
- string