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

Mapbox Classic will be deprecated #4015

Closed
rominavarela opened this issue Jun 9, 2016 · 10 comments · Fixed by #7698
Closed

Mapbox Classic will be deprecated #4015

rominavarela opened this issue Jun 9, 2016 · 10 comments · Fixed by #7698
Labels

Comments

@rominavarela
Copy link

Hi, I have a project using "classic" Mapbox imagery layers, which will be deprecated,
¿Is there any plans to migrate to the new Mapbox?

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 10, 2016

Thanks for the report. Do you have a link with more info on the deprecation?

@rominavarela
Copy link
Author

I asked to mapbox support and they told me they will keep such "classic" version "for the forseeable future". I still think cesium should migrate to the new style, which announcement is in https://www.mapbox.com/blog/mapbox-studio-tiles-static/

@hpinkos
Copy link
Contributor

hpinkos commented Jun 13, 2016

Here's the API for getting raster tiles from a style:
https://www.mapbox.com/api-documentation/#retrieve-raster-tiles-from-styles

The URI should look like this:
https://api.mapbox.com/styles/v1/{username}/{style_id}/tiles/{tileSize}?/{z}/{x}/{y}?access_token={access_token}

@pjcozzi pjcozzi added the good first issue An opportunity for first time contributors label Dec 20, 2016
@sekitaka
Copy link

Hi.
I'm using Cesium.UrlTemplateImageryProvider like following code.

var MAPBOX_ACCESS_TOKEN = 'YOUR_ACCESS_TOKEN'; 
var MAPBOX_STYLE_ID = 'YOUR_STYLE_ID'; 
var MAPBOX_USERNAME = 'YOUR_USERNAME';

var viewer = new Cesium.Viewer('cesiumContainer');
var layers = viewer.imageryLayers;

// Mapbox api url
var url = 'https://api.mapbox.com/styles/v1/' + MAPBOX_USERNAME + '/' + MAPBOX_STYLE_ID + '/tiles/256/{z}/{x}/{y}?access_token=' + MAPBOX_ACCESS_TOKEN;

var customImageryProvider = new Cesium.UrlTemplateImageryProvider({
  url : url
});
layers.addImageryProvider(customImageryProvider);

It works for me.

@bampakoa
Copy link
Contributor

@hpinkos do you refer to the additional options that should be passed to MapboxImageryProvider, right?

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 14, 2017

Thanks again for the issue, @rominavarela! Would you like to make the update to Cesium? For info on contributing, see CONTRIBUTING.md. Thanks!

@bampakoa
Copy link
Contributor

Is this still valid?

@hpinkos
Copy link
Contributor

hpinkos commented Mar 14, 2019

@bampakoa we haven't made any changes here. I believe this is something we still want to do, but Mapbox hasn't removed support for the old API for fetching tiles so it hasn't been a priority for us to update to use styles instead.

@bampakoa
Copy link
Contributor

bampakoa commented Mar 14, 2019

@hpinkos I would be happy to help on that if it's ok. Maybe submit a proposal PR for an additional imagery provider?

@hpinkos
Copy link
Contributor

hpinkos commented Mar 14, 2019

Yes, thanks @bampakoa!

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

Successfully merging a pull request may close this issue.

5 participants