enketo-express
enketo-express copied to clipboard
feat(geo): added geocoder api backend for mapbox and google
Closes enketo/enketo#1158
I have verified this PR works with
- [ ] Online form submission
- [ ] Offline form submission
- [ ] Saving offline drafts
- [ ] Loading offline drafts
- [ ] Editing submissions
- [ ] Form preview
- [x] None of the above
What else has been done to verify that this works as intended?
Test configuration providers using
"geocoder": {"provider": "mapbox", "api key": "key"}
Why is this the best possible solution? Were any other approaches considered?
This moves the geocoding service to the backend api so that different geocode providers can be used. It is ideal since it moves the auth tokens away from the client and offers additional protection for the secrets, as well as the additonal functionality of using different geocode providers.
How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?
It should continue working as expected for existing users. The google auth token is now protected from the client application and the /api/geo/geocoder is used instead.
Do we need any specific form for testing your changes? If so, please attach one.
No - just a map widget