hotosm / osm-analytics

OSM Analytics lets you interactively analyze how specific OpenStreetMap features are mapped in a specific region.
https://www.osm-analytics.org
BSD 3-Clause "New" or "Revised" License
103 stars 30 forks source link

Switch to new Mapbox tile endpoint #107

Closed cgiovando closed 3 years ago

cgiovando commented 4 years ago

Because of Mapbox Studio Classic Deprecation, OSMA's basemap tiles need to be switched over to a new endpoint.

cc: @tyrasd @mikelmaron

tyrasd commented 4 years ago

see #108 but in order to perform the change, the associated mapbox api token needs to be updated to have the right to access the STYLES:TILES scope: https://github.com/hotosm/osm-analytics/blob/1245760b5d61d68520a468f88131aeab5e93d1f3/app/settings/settings.js#L1

@dakotabenjamin can you fix the access token?

tyrasd commented 4 years ago

PS: here's how you can test whether the access token has the proper access rights set or not:

curl 'https://api.mapbox.com/styles/v1/mapbox/light-v10/tiles/0/0/0?access_token=pk.eyJ1IjoiaG90IiwiYSI6ImNpbmx4bWN6ajAwYTd3OW0ycjh3bTZvc3QifQ.KtikS4sFO95Jm8nyiOR4gQ' -H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0' --compressed -H 'Referer: https://osm-analytics.org/' -w "\nHTTP response code: %{http_code}\n"

if everything is set up properly, this should return a 200 response status code, not (as it currently does) a 403 error code.

tyrasd commented 4 years ago

Are there any news on this @dakotabenjamin ? Will this work or shall we switch to a different Mapbox API key, perhaps?

tyrasd commented 3 years ago

(weekly) ping @dakotabenjamin. I know it's not super urgent, but I'd love to get this out of the way rather sooner than later, especially since this seems like a quick fix. Are there some issues? If yes, we could also switch to osm.org tiles, I guess?

willemarcel commented 3 years ago

@tyrasd I just changed the token permissions, it should work now.

tyrasd commented 3 years ago

thanks @willemarcel! the fix is already deployed now.