Icon of L.control.layers Not Visible

99 views
Skip to first unread message

Ziliang Zhao

unread,
May 10, 2015, 10:26:36 PM5/10/15
to leafl...@googlegroups.com
Hi,

I followed the layers control example by Leaflet (http://leafletjs.com/examples/layers-control.html).  Everything is working properly except that the icon of the control, does not show on the map.  The control itself is working properly and the zoom-in and zoom-out icons are shown as expected.

I'm using hosted version of js/css files:

<html>
    <head>
        <title>TVA Web</title>
        <link rel="stylesheet" type="text/css" href="assets/css/style.css" />
        <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
        <link rel="stylesheet" href="https://api.tiles.mapbox.com/mapbox.js/v2.1.9/mapbox.css" />
        <script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
        <script src="http://d3js.org/d3.v3.min.js"></script>
    </head>
    <body>
        <div id="map"></div>
        <script src="assets/js/tvamap.js"></script>
    </body>
</div>
</html>

I tried to download Leaflet js/css files.  Then, an error message appeared showing that layers-2x.png is missing.  After that, I created an "images" subfolder next to the leaflet.css file and place layers-2x.png under that subfolder.  The error message was gone but the icon was still invisible.

Any ideas?  Thanks.
Screen Shot 2015-05-10 at 10.14.21 PM.png
Reply all
Reply to author
Forward
0 new messages