Geocoder
Geocoder copied to clipboard
limit results geocoder
Hi, i've this code
$httpClient = new \GuzzleHttp\Client(); $provider = new \Geocoder\Provider\GoogleMaps\GoogleMaps($httpClient, null, env('GOOGLE_MAPS_API_KEY')); $geocoder = new \Geocoder\StatefulGeocoder($provider, 'it'); $result = $geocoder->reverseQuery(ReverseQuery::fromCoordinates($latitude, $longitude));
if I try to add ->limit(10) before ->reverseQuery it returns error "message": "Call to undefined method Geocoder\StatefulGeocoder::limit()",
i.e. $result = $geocoder->limit(10)->reverseQuery(ReverseQuery::fromCoordinates($latitude, $longitude));
returns this error, how can I fix it?