Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

feat(geo): added geocoder api backend for mapbox and google #541

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

green3g
Copy link

@green3g green3g commented Mar 23, 2023

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
  • 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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use separate Google API key for GeoCoding requests
1 participant