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.
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:
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.