mapbox / mapbox/mapbox-gl-geocoder
geolocation as a result when input is focused and clear
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 388
- Forks
- 181
- PR merge metrics
- No merged PRs in 30d
Description
I'm struggling to figure out how to show custom results when the input is clear and comes into focus, or when it is in focus and then cleared. I want to add a "Your location" result at this time, and if that result is selected, then I want it to fetch the user's location and use that as the selected result.
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 tracing the geocoder's input focus and clear behavior, then follow how selected results are handled. Define the expected behavior for a custom “Your location” result in both focus-after-clear and clear-while-focused cases, including fetching and selecting the user's location. Add coverage for these interaction paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100