ParseGeoPoint

ParseGeoPoint

new ParseGeoPoint(arg1, arg2)

Parameters:
Name Type Description
arg1 Array.<number> | object | number

Either a list of coordinate pairs, an object with latitude, longitude, or the latitude or the point.

arg2 number

The longitude of the GeoPoint

Members

latitude

North-south portion of the coordinate, in range [-90, 90]. Throws an exception if set out of range in a modern browser.

Properties:
Name Type Description
latitude number

longitude

East-west portion of the coordinate, in range [-180, 180]. Throws if set out of range in a modern browser.

Properties:
Name Type Description
longitude number

Methods

(static) current() → {Parse.GeoPoint}

Creates a GeoPoint with the user's current location, if available.

Returns:
Type:
Parse.GeoPoint

User's current location

kilometersTo(point) → {number}

Returns the distance from this GeoPoint to another in kilometers.

Parameters:
Name Type Description
point Parse.GeoPoint

the other Parse.GeoPoint.

Returns:
Type:
number

milesTo(point) → {number}

Returns the distance from this GeoPoint to another in miles.

Parameters:
Name Type Description
point Parse.GeoPoint

the other Parse.GeoPoint.

Returns:
Type:
number

radiansTo(point) → {number}

Returns the distance from this GeoPoint to another in radians.

Parameters:
Name Type Description
point Parse.GeoPoint

the other Parse.GeoPoint.

Returns:
Type:
number

toJSON() → {object}

Returns a JSON representation of the GeoPoint, suitable for Parse.

Returns:
Type:
object