Skip to content
Advertisement

leaflet map shows up grey

I’m starting leaflet.js with the quickstart but my map shows as grey… is there something I’m missing?

script.js:

JavaScript

style.css:

JavaScript

index.html:

JavaScript

Gives me:

enter image description here

Advertisement

Answer

You need to implement the next section of the Quick Start Guide: you’ve initialized the map, but haven’t added any tile layers to it, hence gray. So read on to the section beginning with Next we’ll add a tile layer to add to our map.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement