Giter VIP home page Giter VIP logo

Comments (11)

aparshin avatar aparshin commented on August 18, 2024 1

@snickell (cc @nyurik )

do you happen to know where phone home code(s) currently live in the codebase? Do you have a sense how complex this is? I have no idea if this is a "comment out a line" task, or a big endeavor

As I understand, all (at least most) "phone-home" and, more generally, Mapbox-specific code is encapsulated in the single file. This code is used only for Mapbox tiles. So, at the technical level, there is nothing to remove.

But I think that we have a problem at the legal level. Here is a header of this file:

/***** START WARNING - IF YOU USE THIS CODE WITH MAPBOX MAPPING APIS, REMOVAL OR
* MODIFICATION OF THE FOLLOWING CODE VIOLATES THE MAPBOX TERMS OF SERVICE  ******
* The following code is used to access Mapbox's Mapping APIs. Removal or modification
* of this code when used with Mapbox's Mapping APIs can result in higher fees and/or
* termination of your account with Mapbox.
*
* Under the Mapbox Terms of Service, you may not use this code to access Mapbox
* Mapping APIs other than through Mapbox SDKs.
*
* The Mapping APIs documentation is available at https://docs.mapbox.com/api/maps/#maps
* and the Mapbox Terms of Service are available at https://www.mapbox.com/tos/
******************************************************************************/

As I understand from this text, you are not allowed to

  1. Access Mapbox Mapping APIs without this code
  2. Use this code without Mapbox SDKs (which is, in this case, Mapbox GL JS).

So, it seems to me that it's legal to use Mapbox Mapping API from any other project/fork, even if you fully copy-pasted this file and use it properly. If it's really so, it's a big problem for the community-driven fork - Mapbox datasets and base maps are pretty popular.

What do you think about it? Should we clarify this situation directly with someone at Mapbox?

from maplibre-gl-js.

rbrundritt avatar rbrundritt commented on August 18, 2024

Some additional related thoughts. If there is a decision to keep the phone-home code or add additional ones for other map platforms we should also think about how we want to make this available to developers.

With of us coming together to create this fork I'm sure there is plans by many to use different sources of tiles (vector/raster) for the base maps. Looking at other open source projects I have seen different approaches for how to make it easier for developers to pull in the base map tiles they want. Some hard code a list of all services and the user simply says display map X. I have two concerns with this approach;

  1. This means that all the details for these services are downloaded by end users when they load a map using this library, even if the developer of that app only exposes a handful of base map options they want to provide.
  2. Different services have different authentication options for their tile services. If the service has no authentication or uses a access token or subscription key in a URL, then that's fairly lightweight, but not really secure. Some services offer more secure options, like Azure Active Directory which usually means pulling in a library (i.e https://github.com/AzureAD/microsoft-authentication-library-for-js) which would add extra bulk to the map library and would be a waste for apps who don't need this. There are other approaches I've seen companies make to lock down their tile services as well, which would add yet more complications.

With this in mind, perhaps a modular approach to pulling in providers for base maps makes sense.

Similarly developers also need services such as geocoding in their apps, so we could look at defining a standard schema so any map data provider can create a module can that exposes an API interface that aligns with that standard and developer can easily pull in and swap out different providers easily.

from maplibre-gl-js.

snickell avatar snickell commented on August 18, 2024

@nyurik do you happen to know where phone home code(s) currently live in the codebase? Do you have a sense how complex this is? I have no idea if this is a "comment out a line" task, or a big endeavor

from maplibre-gl-js.

exotfboy avatar exotfboy commented on August 18, 2024

What's phone-home code ?

from maplibre-gl-js.

bothness avatar bothness commented on August 18, 2024

A quick 2-pence on this. I'm not a serious developer, so not sure if I can contribute to the codebase, but I make a lot of use of mapbox-gl-js using alternative tile providers and self-hosted tiles.

One thing to bear in mind is what needs to go in the "quick start" documentation to orient new users. Currently, in all the examples on the Mapbox site, it's assumed that you load a Mapbox base "style", which then requires a token. A few possibilities/considerations to think about:

  1. Include quick start documentation on how to get a map up and running with token-free raster tile provider, eg. OSM or Stamen (using the vanilla library, without plugins), or with no base tiles at all (eg. if working with geojson sources).
  2. Point people to good documentation on how to download or brew their own vector tiles.
  3. Consider whether a CDN version of the library should include things like glyphs and sprites, for people who want to get up and running quickly with their OpenMapTiles downloads or their own home-brewed vector tiles.
  4. Maintain (or point to) good, concise, documentation for creating vector tile styles that make use of the above (as a new user, I found the OMT documentation on styles pretty opaque, and it wasn't that clear that the only things you need to edit to get started were the tile source, glyphs and sprites).

from maplibre-gl-js.

PMeira avatar PMeira commented on August 18, 2024

I noticed src/util/sku_token.js (small file) is also related to Mapbox ToS and could be removed in a future version (in #21?). From the repository history, that warning was added in May 2019.

Among many other things, someone already asked about third-party libraries on the mapbox-gl-js v2.0 ticket. No answers yet.

Depending on how things evolve, it could be better to start fresh based on a more general module/plug-in approach as @rbrundritt mentions, removing this code and creating a new version based on the API docs from Mapbox instead. Note that I couldn't find explicit requirements for the SKU token on that page or in the ToS, but maybe they will be updated later. There is a separate, glossary page for "SKU token" (@exotfboy: this token is the phone-home thing that tracks usage).

from maplibre-gl-js.

curran avatar curran commented on August 18, 2024

Perhaps a useful reference - a search for all instances of "mapbox" in this codebase:
https://github.com/maplibre/maplibre-gl-js/search?q=mapbox

The "phone home" aspect can be identified as a subset of that search result, I think, by isolating URLs that contain mapbox in them, like this

'https://a.tiles.mapbox.com/v4/mapbox.mapbox-terrain-v2,mapbox.mapbox-streets-v7/{z}/{x}/{y}.vector.pbf',

from maplibre-gl-js.

curran avatar curran commented on August 18, 2024

More instances of mapbox in URLs:

'https://a.tiles.mapbox.com/v4/mapbox.mapbox-terrain-v2,mapbox.mapbox-streets-v7/{z}/{x}/{y}.vector.pbf',

"type": "vector", "url": "mapbox://mapbox.mapbox-streets-v5"

"url": "mapbox://mapbox.mapbox-streets-v5"

"url": "mapbox://mapbox.mapbox-streets-v7",

"sprite": "mapbox://sprites/mapbox/light-v9",

let styles = ['mapbox://styles/mapbox/streets-v10'];

<link href='https://www.mapbox.com/base/latest/base.css' rel='stylesheet' />

"mapbox://mapbox.terrain-rgb": {

"url": "mapbox://mapbox.mapbox-streets-v6"

<meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'self' 'nonce-app-js'; style-src 'self' 'nonce-app-css'; img-src data: blob: ; connect-src https://*.mapbox.com">

That's all I see up to Page 5. One could keep going.

It should be doable to isolate all these URLs with some command line tool and a regular expression...

from maplibre-gl-js.

github-actions avatar github-actions commented on August 18, 2024

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

from maplibre-gl-js.

github-actions avatar github-actions commented on August 18, 2024

This issue was closed because it has been stalled for 30 days with no activity.

from maplibre-gl-js.

wipfli avatar wipfli commented on August 18, 2024

Has been implemented with the typescript migration.

from maplibre-gl-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.