new ParseGeoPoint(arg1, arg2)
Parameters:
Name | Type | Description |
---|---|---|
arg1 |
Array.<number>
|
object
|
number
|
Either a list of coordinate pairs, an object with |
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
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
(static) current(options) → {Promise.<Parse.GeoPoint>}
Creates a GeoPoint with the user's current location, if available.
Parameters:
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object
|
The options.
|
Returns:
- Type:
-
Promise.<Parse.GeoPoint>
User's current location