geocoder-php / geocoder-php/Geocoder
Mapbox provider not working with US zip codes
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 4k
- Forks
- 525
- Avg merge
- 8m
- Merged PRs (30d)
- 1
Description
When using the https://github.com/geocoder-php/mapbox-provider with Drupal's geocoder module, Mapbox is unable to geocode US zip codes. I've tried both +5 and +9 zip codes. Mapbox also seems to have issues with searching for example Rockville, MD (get results in New England 🤷♂️ ) yet searching for Rockville, Maryland gets the expected results. When using more complete addresses, geocoding works.
When using the ArcGis Online provider, the above examples work flawlessly.
The Mapbox geocoder format guide suggests that US zip code (either five or nine digit) should work: https://docs.mapbox.com/help/troubleshooting/address-geocoding-format-guide/#zip-code-formatting
Has anyone else experienced similar problems with the Mapbox provider?
Related issue on D.O. https://www.drupal.org/project/geocoder/issues/3176070
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 reproducing the reported US ZIP-code and abbreviated city/state queries against the Mapbox provider, then compare their results with ArcGis Online and the linked Mapbox geocoding format guide. Done means the documented ZIP formats and examples return the expected locations, with the provider behavior or limitation clearly established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100