-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option for a promise based externalGeocoder #385
Conversation
- Enable the localGeocoder to return an array or a Promise resolving to a feature array
…ise chain to complete
hi @mapbox-danny did you see #165 (comment) where we discussed leaving localGeocoder as is and creating an additional externalGeocoder which supports a promise. The idea being localGeocoder then works with local sources you already have loaded, and externalGeocoder where you have an external API to use. |
@andrewharvey, your feedback to use externalGeocoder to add support for promises makes a lot of sense. I have updated the proposed approach to keep localGeocoder effectively unchanged and to add in the option for the externalGeocoder. |
Oh wow you even managed to fix the broken unit tests unrelated to this feature. Thanks! I haven't done a deep look at all the changes, but overall it looks good. |
Thanks @andrewharvey. Let me know what you think about getting it ready to merge when you have a chance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me thanks. I haven't done detailed testing, but happy with the testing you've done.
Proposal to add an option for an externalGeocoder, designed to accept a promise resolving to an array of features. This Update would allow a server-side api/resource to be called asynchronously.
npm run docs
and commit changes to API.mdmaster
heading before merging