Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider alternative basemap tile providers #147

Closed
reyemtm opened this issue Jun 6, 2022 · 9 comments · Fixed by #148 or #176
Closed

Consider alternative basemap tile providers #147

reyemtm opened this issue Jun 6, 2022 · 9 comments · Fixed by #148 or #176

Comments

@reyemtm
Copy link

reyemtm commented Jun 6, 2022

See https://gist.github.com/reyemtm/0b57ca5e6535d3f2fe274442a17a782a for an example of the OSM data served by Esri in the Toner style. I also have an OSM basemap style.

@brendan-ward
Copy link
Collaborator

What is the advantage of making the switch here? The preview maps are not intended to be full featured map viewers, so we just needed a lightweight, low dependency basemap not gated via accounts / tokens. Meaning: an image rather than vector basemap is not necessarily a problem for preview maps.

Seems like switching to vector tiles introduces the requirement that we also include a style JSON (as per your example). Also - I've had issues using ESRI vector tilesets with Mapbox GL JS, because by default they use indexed rather than flat tilesets (meaning not all tiles are available at all zooms), which breaks the frontend because Mapbox GL JS does not support this approach.

@reyemtm
Copy link
Author

reyemtm commented Jun 6, 2022

I was getting a CORS error on the default Arc tiles, so I looked into alternatives and remembered this style I had. I'm not sure if the tiles are indexed or flat, I will look into that. I just prefer the way vector tiles render alongside other vector data, but that's a minor issue.

Separately I do not think you can use Esri image tiles without your org having an Esri license. I was under the impression that the Esri OSM vector tiles had a more open license, but now after looking again I cannot seem to find anything that states that concretely. If I find something along those lines I will update this issue. It might make sense if the license cannot be figured out to move away from Esri tiles entirely to something with a more permissive license.

@brendan-ward
Copy link
Collaborator

I'm onboard with moving to freely available tiles with permissive licenses for use in our preview pages. It looks like the OSM hosted tilesets don't allow this use case (https://operations.osmfoundation.org/policies/tiles/) because it seems similar enough to distributing an app that uses tiles from openstreetmap.org even if the preview pages are definitely not our focus here.

It looks like Stamen maps are the only ones I can find without some sort of a restriction on them. Please feel free to suggest other alternatives.

@brendan-ward brendan-ward changed the title Esri Publishes OSM Vector Tiles - Switch to these for Basemaps in GL Preview? Consider alternative basemap tile providers Jun 6, 2022
@reyemtm
Copy link
Author

reyemtm commented Jun 6, 2022 via email

@reyemtm
Copy link
Author

reyemtm commented Jun 6, 2022

Also it does look like the esri vector basemap tiles are indexed, not sure how big of a deal that is in this scenario however. Still switching to Stamen raster tiles would be the simplest option.

@jleedev
Copy link
Contributor

jleedev commented Jun 7, 2022

Carto Positron is pretty good: https://stamen.com/introducing-positron-dark-matter-new-basemap-styles-for-cartodb-d02172610baa/

{
  "tiles": [
    "https://cartodb-basemaps-a.global.ssl.fastly.net/light_all/{z}/{x}/{y}{ratio}.png",
    "https://cartodb-basemaps-b.global.ssl.fastly.net/light_all/{z}/{x}/{y}{ratio}.png",
    "https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}{ratio}.png",
    "https://cartodb-basemaps-d.global.ssl.fastly.net/light_all/{z}/{x}/{y}{ratio}.png"
  ],
  "tileSize": 256,
  "attribution": "© <a href=\"http://www.openstreetmap.org/copyright\"> OpenStreetMap </a> contributors, © <a href=\"https://carto.com/about-carto/\"> CARTO </a>"
}

(There's also dark_all).

@brendan-ward
Copy link
Collaborator

It looks like those are also restricted? Here is what I see from the linked Carto page.

How can I use CARTO basemaps?
Our basemaps can be used for free in applications and visualizations by [CARTO grantees](https://carto.com/grants/)...
For commercial purposes, you will need an Enterprise license to ensure you have the best basemaps available for your project.

Presumably nobody is (or should be) using the preview maps as they are for commercial purposes, but since it is bundled into an app that has an MIT license without non-commercial constraints, we'd probably at least want to note that. (similar issues technically apply for users that don't have an ESRI license with the basemaps we have now...)

@reyemtm
Copy link
Author

reyemtm commented Oct 16, 2023

Stamen maps are now end-of-life. Options could be to use Stadia and require a token in the environment variables? Without a token commercial use is not allowed. Not sure of other options...

@brendan-ward brendan-ward reopened this Oct 16, 2023
@jleedev
Copy link
Contributor

jleedev commented Oct 16, 2023

Stadia authenticates requests by referrer (https://docs.stadiamaps.com/authentication/), which is convenient as there's no need to change the URL to add an API key. It also freely responds to localhost up to a rate limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants