Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

reverseMode option type is unclear #499

Open
coxco96 opened this issue May 8, 2023 · 0 comments
Open

reverseMode option type is unclear #499

coxco96 opened this issue May 8, 2023 · 0 comments

Comments

@coxco96
Copy link

coxco96 commented May 8, 2023

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant