Skip to content
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

[WIP] Add Mapbox geocoding backend as an option #1272

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

Conversation

veeableful
Copy link

Hi guys, I would like to add Mapbox as an option for geocoding. It gives 100,000 free API calls per month compared to 40,000 using Google and its price per 1000 calls is also cheaper ($0.75 vs $4.0-5.0). However, I'm not sure how I should go about giving an option to Perkeep to specify which geocoding backend to use.

Currently to switch to it, I need to replace the geocode.go and geocode_test.go with geocode_mapbox.go and geocode_mapbox_test.go, remove the build tags and then run go run make.go. I have only tested using the loc: query and it seems to work.

Pricing links:
https://www.mapbox.com/pricing/#geocode
https://developers.google.com/maps/billing/understanding-cost-of-use#geocoding

This adds drop-in replacement code for geocoding backend by using
Mapbox instead of Google. Using Mapbox allows up to 100,000 requests
per month for free.
@googlebot googlebot added the cla: yes Author has submitted the Google CLA. label Jul 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Author has submitted the Google CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants