You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This can not show traffic by default, I have to press the traffic button twice to cycle it. there does not seem to be a working method to show traffic on load.
This can not show traffic by default, I have to press the traffic button twice to cycle it. there does not seem to be a working method to show traffic on load.
My code looks like this:
mapboxgl.accessToken = 'redacted_privatekey_'; var map = new mapboxgl.Map({ container: 'map', style: 'mapbox://styles/mapbox/streets-v11', zoom: 8, center: [-122, 47.8], }); map.on('load', function() { map.addControl(new mapboxgl.NavigationControl()); map.addControl(new MapboxTraffic({showTraffic: true})); });
The text was updated successfully, but these errors were encountered: