Reputation: 1297
I am trying to follow the simple example in Mapbox's website here but with a custom map I have created in my Mapbox account. So based on the example I change only the token and style url properties in the script section:
<script>
mapboxgl.accessToken = 'pk.<>';
var map = new mapboxgl.Map({
container: 'map', // container id
style: 'mapbox://<>', // stylesheet location
center: [74.50, 40], // starting position [lng, lat]
zoom: 5 // starting zoom
});
</script>
However when I save this as an html file in my laptop and open it in my browser, it still shows the default example map. I also made sure I published my custom style from Mapbox and that I can view the map with the https link.
What would I be doing wrong here?
Upvotes: 0
Views: 570
Reputation: 1297
The solution was that I had to wait for 5 more minutes for the changes to propagate. Works now.
Upvotes: 2