new $k.GeoPosition(latitude, longitude)
Constructs a geo position with the specified coordinates (in degrees)
Name | Type | Description |
---|---|---|
latitude |
number |
North-south position |
longitude |
number |
East-west position |
Throws:
Type | Description |
---|---|
$k.exception.InvalidValue | 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 | Description |
---|---|
number |
equals() : boolean
Returns true if the values are equal
Returns:
Type | Description |
---|---|
boolean |
lat() : number
Returns the latitude (north-south position) as degrees
Returns:
Type | Description |
---|---|
number |
long() : number
Returns the longitude (east-west position) as degrees
Returns:
Type | Description |
---|---|
number |
setLat(latitude)
Set the latitude (north-south position, in degrees)
Name | Type | Description |
---|---|---|
latitude |
number |
setLong(longitude)
Set the longitude (east-west position, in degrees)
Name | Type | Description |
---|---|---|
longitude |
number |
toFormat(format) : string
Returns the string representation in the specified format ('KML', 'UTM' etc.)
Name | Type | Description |
---|---|---|
format |
string |
Name of a supported format |
- See:
Returns:
Type | Description |
---|---|
string |