LibrePhotos / librephotos

A self-hosted open source photo management service. This is the repository of the backend.
MIT License
6.91k stars 300 forks source link

How to setup Mapbox #392

Closed derneuere closed 1 year ago

derneuere commented 2 years ago

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.

Puttt commented 2 years ago

I've done it recently:

I don't know if this is the correct way, but it works for me.

Seneliux commented 2 years ago

I can´t remember, but I think that my default public token, generated automaticlly by the account creation, works. It is without secret scopes.

iandonnelly commented 2 years ago

And then take that key and paste it into your .env file on the line: mapApiKey=

quartztester commented 2 years ago

@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

derneuere commented 2 years ago

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 :)

redwood996 commented 1 year ago

Would love to see other alternatives than Mapbox, since it requires credit card during the sign up.

sickelap commented 1 year ago

What alternatives you have in mind?

derneuere commented 1 year ago

https://photon.komoot.io/ would be an alternative that is open

ThatCoffeeGuy commented 1 year ago

Would love to see this happen.

sickelap commented 1 year ago

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.

ThatCoffeeGuy commented 1 year ago

Really appreciate it.

ThatCoffeeGuy commented 1 year ago

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.

image