librephotos
librephotos copied to clipboard
How to setup Mapbox
It is currently not clear on how to get places to show up on the map. We should document the current way on how to get a Mapbox API key and then apply it to LibrePhotos in order to get places.
I've done it recently:
- create an account on Mapbox
- after login go to 'Tokens' on the main menu
- click on 'Create Token'
- fill out the name (for example 'LibrePhotos')
- leave the public scopes as there are
- check following secret scopes:
- STYLES:TILES
- STYLES:READ
- FONTS:READ
- DATASETS:READ
- VISION:READ
- STYLES:LIST
I don't know if this is the correct way, but it works for me.
I can´t remember, but I think that my default public token, generated automaticlly by the account creation, works. It is without secret scopes.
And then take that key and paste it into your .env file on the line: mapApiKey=
@derneuere What was the reason for implementing Mapbox? Especially with the API cap couldn't code such as Digikam be re-written? Too time costly?
https://www.digikam.org/about/features/ https://stackoverflow.com/questions/1153577/integrate-python-and-c
The original implementation in ownphotos used Mapbox. So it's historical baggage. We currently only use it for reverse geocoding. I also want to move to a more open implementation, see #150
I would prefer geopy as it is smaller, and it uses python :)
Would love to see other alternatives than Mapbox, since it requires credit card during the sign up.
What alternatives you have in mind?
https://photon.komoot.io/ would be an alternative that is open
Would love to see this happen.
I am currently trying to make geopy to work. Thing is that reverse geocoding works just fine. Problem is with auto albums. Currently, albums place uses mapbox extensively. I.e., when adding albums places, it depends heavily on the API response format. I'll try to do my best not to break albums places, but it looks that's not an easy feat.
Really appreciate it.
BTW some good news: Mapbox raised their previously 50k limit to 100k / mo. I still would very much love to see it gone due to their predatory, no way to limit usage pricing model, but it's good to know that it's twice as much as it is mentioned on the front page.