new ParseGeoPoint(options, longitude)
Parameters:
Name | Type | Description |
---|---|---|
options |
Array.<Number>
|
Object
|
Number
|
Either a list of coordinate pairs, an object with |
longitude |
Number
|
The longitude of the GeoPoint |
Members
latitude :Number
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 |
Type:
-
Number
longitude :Number
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 |
Type:
-
Number
Methods
(static) current()
Creates a GeoPoint with the user's current location, if available. Calls options.success with a new GeoPoint instance or calls options.error.
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