Class $k.GeoPosition

The value of a geo position attribute.

Class Summary
Constructor Attributes Constructor Name and Description
 
$k.GeoPosition(latitude, longitude)
Constructs a geo position with the specified coordinates (in degrees)

Method Summary

Class Detail

$k.GeoPosition(latitude, longitude)
Constructs a geo position with the specified coordinates (in degrees)
Parameters:
{number} latitude
North-south position
{number} longitude
East-west position

Method Detail

  • {number} distance(position)
    Returns the distance to the other position, in meters
    Parameters:
    position
    Returns:
    {number}
  • {boolean} equals(value)
    Returns true if the values are equal
    Parameters:
    value
    Returns:
    {boolean}
  • {number} lat()
    Returns the latitude (north-south position) as degrees
    Returns:
    {number}
  • {number} long()
    Returns the longitude (east-west position) as degrees
    Returns:
    {number}
  • setLat(latitude)
    Set the latitude (north-south position, in degrees)
    Parameters:
    {number} latitude
  • setLong(longitude)
    Set the longitude (east-west position, in degrees)
    Parameters:
    {number} longitude
  • {string} toFormat(format)
    Returns the string representation in the specified format ('KML', 'UTM' etc.)
    Parameters:
    {string} format
    Name of a supported format
    Returns:
    {string}
    See:
    $k.GeoRange#formats