[WIP] Add Mapbox geocoding backend as an option #1272
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
andgeocode_test.go
withgeocode_mapbox.go
andgeocode_mapbox_test.go
, remove the build tags and then rungo run make.go
. I have only tested using theloc:
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