getRankingInfo=true in your query parameter.
Doing this adds two new attributes to _rankingInfo: matchedGeoLocation and aroundLatLng.
matchedGeoLocation attribute
The matchedGeoLocation attribute contains geographical information,
including the location that matched when you were performing a .
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 is a geographical location object that matches the query.
It consists of:
lat(float): latitude of matched locationlng(float): longitude of matched locationdistance(integer): distance between the matched location and the search location (in meters).
Unlike
geoDistance, the distance value isn’t divided by geographical precision._rankingInfo attribute returned on a record with several geo-location
(the matchedGeoLocation attribute will be in _rankingInfo only if a geographical query is performed):
JSON
aroundLatLng attribute
aroundLatLng (string, optional):
- Only returned when
aroundLatLngViaIPis set - Computed geographical location
- Legacy reason (
paramis a string not an object):${lat}, ${lng}