question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

quickstart - map displays greyed out

See original GitHub issue

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

script.js:

var leafletMap = L.map('leafletMap').setView([51.505, -0.09], 13);

style.css:

#leafletMap {
height: 200px;
width: 200px;
}

index.html:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My title</title>

    <link rel='stylesheet' href='css/bootstrap.css'>
    <link rel='stylesheet' href='css/leaflet.css'>
    <!--[if lte IE 8]>
        <link rel="stylesheet" href="leaflet.ie.css" />
    <![endif]-->
    <link rel="stylesheet" href="css/style.css">
</head>
<body>

    <div id='leafletMap'></div>

<script src='js/libs/jquery-1.10.2.js'></script>
<script src='js/libs/bootstrap.js'></script>
<script src='js/libs/leaflet-src.js'></script>
<script src='js/config.js'></script>
<script src='js/script.js'></script>
</body>
</html>

Gives me:

leaflet-grey

repo is here https://github.com/jasonshark/drawing/tree/master/leaflet

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
gosaingourav17commented, Jan 31, 2019

In my case api key was missing.

0reactions
connor11528commented, Jan 29, 2014

haha you’re a genius! Thanks for the second pair of eyes

Read more comments on GitHub >

github_iconTop Results From Across the Web

leaflet map shows up grey - Stack Overflow
js with the quickstart but my map shows as grey... is there something I'm missing? script.js: var leafletMap = L.map('leafletMap').setView([ ...
Read more >
Why are some mapping numbers greyed out when assigning ...
An indication that the mapping number cannot be assigned to, is if it appears to be greyed out (as shown below).
Read more >
background maps selection greyed out - Tableau Community
Hi,. I have just noticed a problem with my Tableau desktop. When I go into map > background maps all of the options...
Read more >
"Add a map type" button on Shape Map is greyed out
I've tried adding different data to the location and color saturation fields but any time I go to Format visual and try adding...
Read more >
Quick reference—ArcGIS Field Maps | Documentation
When working with the map outside of data collection, a blue dot on the map shows your location. This is intentionally hidden during...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found