Geocoder icon indicating copy to clipboard operation
Geocoder copied to clipboard

limit results geocoder

Open passasooz opened this issue 10 months ago • 1 comments

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?

passasooz avatar Apr 08 '24 10:04 passasooz