mapbox / mapbox/mapbox-gl-geocoder
reverseMode option type is unclear
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 388
- Forks
- 181
- PR merge metrics
- No merged PRs in 30d
Description
I'm creating a Svelte component for a geocoder (student project). I've exported all of the geocoder default options, and all works fine, except for the reverseMode option. I don't think I understand the type of value it accepts.
According to the documentation:
```
options.reverseMode (distance | score) Set the factors that are used to sort nearby results. (optional, default distance)
```
I assumed these were strings, but when I set the default as 'distance,' while trying to perform a search, I get a console error stating that the key is invalid.
I tried using numbers, but that did not work, either.
For now, my component works fine if I just default it to undefined or leave it out altogether.
Apologies if I'm just confused here, but I got pretty stuck on this for awhile, so I thought I'd raise the issue. Clearer documentation on reverseMode would be helpful.
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
Review the documentation entry for options.reverseMode and the option-handling path that produces the invalid-key error described in the issue. Clarify the accepted value format and verify the documented example by performing a geocoder search with reverseMode configured.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100