btovis / btovis.github.io

University of Cambridge CompSci Group Project Coursework
https://btovis.github.io/
Other
0 stars 0 forks source link

Consider switch to maplibre from mapbox #167

Closed CGDogan closed 9 months ago

CGDogan commented 9 months ago

Maplibre uses no API key and won't be rate limited whereas mapbox will likely cause problems once it's being used by many people and the same access tokne.

https://www.mapbox.com/legal/tos :

Please carefully guard the security of your account and monitor use of your API keys. You are responsible for all use of the Services under your account, whether or not authorized, including any use of your API keys.

Therefore I don't think we're allowed to distribute those with the app anyway

CGDogan commented 9 months ago

@Hex27 Apparently this is a really really really important issue because currently we're embedding the API key and giving it to each user's computer. We're also distributing mapbox code and mapbox code says:

This license allows developers with a current active Mapbox account to use and modify the authorized portions of the Software as needed for use only with the relevant Mapbox product(s) through their Mapbox account in accordance with the Mapbox TOS. This license terminates automatically if a developer no longer has a Mapbox account in good standing or breaches the Mapbox TOS

So we might have to remove mapbox entirely or inform bto about this.


There's also alternative https://leafletjs.com/ to maplibre

What do you think? We can leave this to BTO even.

Hex27 commented 9 months ago

This is not a violation of the TOS, it is intended to be used this way. Their page on Token Management even explains how to do this.

Giving map access tokens to frontend clients is perfectly normal for an api that is supposed to render frontend things

https://docs.mapbox.com/accounts/guides/tokens/#domain-restrictions

We will have to make a new mapbox account and properly hand it over with instructions on how to use it. We'll write that in the final handover document

CGDogan commented 9 months ago

Thank you Leonard for the investigation, problem solved. I'll make a list of final todos and add this there

Hex27 commented 9 months ago

Good news: https://plotly.com/javascript/mapbox-layers/ We don't even need a mapbox token