$k. GeoPosition

new GeoPosition(latitude, longitude)

Constructs a geo position with the specified coordinates (in degrees)

Parameters:
NameTypeDescription
latitudenumber

North-south position

longitudenumber

East-west position

Throws:

If latitude or longitude is not in the range of allowed positions

The value of a geo position attribute.

Type
$k.exception.InvalidValue

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:
NameTypeDescription
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:
NameTypeDescription
latitudenumber

setLong(longitude)

Set the longitude (east-west position, in degrees)

Parameters:
NameTypeDescription
longitudenumber

toFormat(format) → {string}

Returns the string representation in the specified format ('KML', 'UTM' etc.)

Parameters:
NameTypeDescription
formatstring

Name of a supported format

Returns:
Type: 
string