librephotos icon indicating copy to clipboard operation
librephotos copied to clipboard

How to setup Mapbox

Open derneuere opened this issue 3 years ago • 5 comments

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.

derneuere avatar Nov 11 '21 20:11 derneuere

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.

Puttt avatar Dec 07 '21 21:12 Puttt

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

Seneliux avatar Jan 28 '22 11:01 Seneliux

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

iandonnelly avatar Mar 15 '22 20:03 iandonnelly

@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

quartztester avatar Jul 07 '22 03:07 quartztester

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

derneuere avatar Jul 07 '22 15:07 derneuere

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

redwood996 avatar Jan 01 '23 18:01 redwood996

What alternatives you have in mind?

sickelap avatar Jan 01 '23 18:01 sickelap

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

derneuere avatar Jan 01 '23 19:01 derneuere

Would love to see this happen.

ThatCoffeeGuy avatar Apr 28 '23 19:04 ThatCoffeeGuy

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.

sickelap avatar Apr 28 '23 21:04 sickelap

Really appreciate it.

ThatCoffeeGuy avatar Apr 28 '23 21:04 ThatCoffeeGuy

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

ThatCoffeeGuy avatar Apr 29 '23 06:04 ThatCoffeeGuy