geodist #
Returns the distance between two geospatial members of a key (see geoadd).
The returned distance is expressed in meters by default.
Query Syntax #
HTTP #
URL: http://kuzzle:7512/ms/_geodist/<_id>/<member1>/<member2>[?unit=[m|km|mi|ft]]
Method: GET
Other protocols #
{
"controller": "ms",
"action": "geodist",
"_id": "<key>",
"member1": "first member name",
"member2": "second member name",
"unit": "ft"
}
Arguments #
_id
: key containing the geopoints to comparemember1
: first geopoint namemember2
: second geopoint name
Optional: #
unit
: the unit used for the returned calculated distance. Accepted values:m
,km
,mi
,ft
Response #
Returns the calculated distance.
{
"requestId": "<unique request identifier>",
"status": 200,
"error": null,
"controller": "ms",
"action": "geodist",
"collection": null,
"index": null,
"result": 192.3
}
Edit this page on Github(opens new window)