Skip to content

Carto basemaps now require an API key #520

Description

@temospena

the default mapview maps are now showing a "Carto API Key required" in the tiles.

Image

In the CARTO documentation, it says:

add it to your tile URL as a key parameter:
https://basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}.png?key=YOUR_KEY

In Leaflet that looks like:

L.tileLayer('https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}.png?key=YOUR_KEY', {
  attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>, &copy; <a href="https://carto.com/attributions">CARTO</a>',
  subdomains: 'abcd', maxZoom: 20
}).addTo(map);

Suggestion to add an argument of token=... to mapview() to be able to produce the mapview maps with CartoDB.Positron and CartoDB.DarkMatter

(not sure if this also needs to be fixed in leaflet)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions