geocoder-php / geocoder-php/Geocoder
limit results geocoder
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 4k
- Forks
- 525
- Avg merge
- 8m
- Merged PRs (30d)
- 1
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the StatefulGeocoder, GoogleMaps provider, and ReverseQuery entry points used in the example, and check how result limits are represented. The issue is complete when the supported way to limit reverse-geocoding results is identified and demonstrated or the missing capability is clearly scoped.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100