getRankingInfo=true on your query parameter. Doing this adds two new attributes to _rankingInfo: matchedGeoLocation and aroundLatLng.
matchedGeoLocation attribute
The matchedGeoLocation attribute will contain geo-related information, including the geo-location that matched when you were performing a geo-query. By using this information, you’ll be able to identify the geo-location that was used and to retrieve some associated information like the name.
matchedGeoLocation:
- geo location that matched the query
- lat (float): latitude of matched location
- lng (float): longitude of matched location
- distance (integer): distance between the matched location and the search location (in meters). Caution: contrary to geoDistance, this value is not divided by the geo precision.
_rankingInfo attribute returned on a record with several geo-location (the matchedGeoLocation attribute will be in _rankingInfo only if a geo-query is performed):
JSON
aroundLatLng attribute
aroundLatLng (string, optional):
- Only returned when aroundLatLngViaIP is set
- Computed geo location
- Legacy reason (
paramis a string not an object) –>${lat}, ${lng}