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

Update base layer tiles due to MapBox deprecation #491

Closed
jywarren opened this issue Dec 23, 2020 · 8 comments
Closed

Update base layer tiles due to MapBox deprecation #491

jywarren opened this issue Dec 23, 2020 · 8 comments

Comments

@jywarren
Copy link
Member

Just like in publiclab/plots2#8887 -- cc @Sagarpreet ❤️

@jywarren
Copy link
Member Author

@jywarren
Copy link
Member Author

Following: https://blog.mapbox.com/deprecating-studio-classic-styles-d8892ac38cb4

var baseLayer = L.tileLayer('https://api.mapbox.com/styles/v1/jywarren/ckj06ujnc1nmi19nuelh46pr9/tiles/{z}/{x}/{y}?access_token=pk.eyJ1Ijoianl3YXJyZW4iLCJhIjoiVzVZcGg3NCJ9.BJ6ArUPuTs1JT9Ssu3K8ig', {
        tileSize: 512,
        zoomOffset: -1,
        attribution: '© <a href="https://apps.mapbox.com/feedback/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
    }).addTo(map);

@jywarren
Copy link
Member Author

Prioritizing this to fix https://publiclab.org/map

@jywarren
Copy link
Member Author

I bet this is the most important! The others seem layer specific, and aren't baselayers after all...

var defaultBaseLayer = L.tileLayer('https://a.tiles.mapbox.com/v3/jywarren.map-lmrwb2em/{z}/{x}/{y}.png', {

I also see this in the example but i bet it is not using the one-line constructor so it may not be one we need to fix:

var baselayer1 = L.tileLayer(

@jywarren
Copy link
Member Author

moving to #493 !!!

jywarren added a commit that referenced this issue Dec 29, 2020
* update AllLayers.js to new MapBox API

re #491

* fixes mapbox baselayers in example too

* bump v2.4.1 with new mapbox API
@jywarren
Copy link
Member Author

OK, and publishing...

@jywarren
Copy link
Member Author

cc @Sagarpreet regarding this new release! Not using the script yet but interested!

@jywarren
Copy link
Member Author

Done and it's staging over in publiclab/plots2#8904

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

No branches or pull requests

1 participant