Closed george700dl closed 4 years ago
I have this issue too when trying to create multiple choropleth maps. The documentation throws https://docs.mapbox.com/mapbox.js/example/v1.0.0/choropleth-joined-data-multiple-variables/ and many of the other examples for mapbox js seem to have the same issue.
Chelsea
This is happening because the when the warning was added in #1317, it failed to account for the fact that L.mapbox.styleLayer
objects set the tileJson value based on the Mapbox style object's sources field:
The good news is that, if you are using L.mapbox.styeLayer
in your implementation and not directly adding Mapbox classic style as a L.mapbox.tileLayer
, then these errors can safely be ignored.
Hm ok do you know if the js doc examples will be updated/functioning properly, or migrated to be included in gl js docs? The sandbox saves me (and probably many of others) a lot of time
Thanks for the explanation @riastrad . To add onto the above question, is there a plan to eliminate these errors? We would prefer to not be logging any browser errors in our customer-facing web products.
Also a follow-up to my original concerns - would there be any way to perform a "dry run" of the 6/1/2020 deprecation of the classic styles, before 6/1?
In our MapboxJS fallback wrapper, we are using: L.mapbox.map(element, options).addLayer(L.mapbox.styleLayer('mapbox://styles/ourcompany/blahblahblah');
and in our MapboxGL wrapper, we are using: new mapboxgl.Map({container: element, style: 'mapbox://styles/ourcompany/blahblahblah', ...});
We created 'mapbox://styles/ourcompany/blahblahblah' in Mapbox Studio and I received sufficient assurances from Mapbox that this will work after 6/1/2020. But I was wondering if there was any way to test this out beforehand somehow, to minimize the possibility of 75% of our website breaking on 6/1 :)
Thanks, George
v3.3.1 has been published, which should resolve these console errors.
v3.3.1 has been published, which should resolve these console errors.
Thank you! What is the new URL that I can reference in my code, for the JS and for stylesheet? https://api.mapbox.com/mapbox.js/v3.3.1/mapbox.js and https://api.mapbox.com/mapbox.js/v3.3.1/mapbox.css don't work at this time.
Thanks, George
Hey @george700dl, apologies for the oversight. Just published to the CDN, so you should be able to use those urls now!
Thank you Rebecca!
Hello, we are getting our code ready for the 6/1/2020 deprecation of the Classic styles. We use MapboxGL, but we use MapboxJS (v 3.3.0 now) as a fallback for non-webGL supporting browsers. We've been using MapboxJS since 2013 and MapboxGL since last year.
This example itself: https://docs.mapbox.com/mapbox.js/example/v1.0.0/ throws:
A warning about loading classic styles: "Warning: this implementation is loading a Mapbox Studio Classic style (mapbox.mapbox-streets-v8,mapbox.mapbox-terrain-v2). Studio Classic styles are scheduled for deprecation"
A Leaflet error: Uncaught TypeError: t.getTileJSON is not a function at e._updateLayer (map.js:213) at e._onLayerReady (map.js:195) at e.fire (leaflet-src.js:593) at e. (style_layer.js:46)
at XMLHttpRequest.r (request.js:28)
at XMLHttpRequest.e (corslite.js:45)
Version prior to 3.3.0 do not throw these. My main concern is the style references. My understanding was that 'mapbox://styles/mapbox/streets-v11' was the way to go forward past 6/1/2020. Why the loading of mapbox.mapbox-streets-v8 and mapbox.mapbox-terrain-v2 ?
Thanks for your help. George