I created a leaflet control layer to switch between two base maps (Bing and OpenCycleMap), Yet I don't see the icon inside the layer control:

var baseMaps = {
             "Bing": bingLayer,
              "OpenCycleMap": tileLayer

The result in the navigator:

enter image description here

Is there any special config to add the layer icon instead of the blank space? As I know this icon should be by default displayed.


The only explanation for this would be that required icon image is missing. It is either layers.png or layers-2x.png and should be in subfolder images of folder where leaflet style sheet leaflet.css is located.

You can check this with browser developer tools (F12, network section). If icon is really missing you will get 404 status for icon image file.

  • it is actually missing I checked it. I added the folder images but still the problem persists. I did use cdn but no remarkable change. – zakaria mouqcit Nov 30 '18 at 7:36
  • Did you check in browser developer tools (F12, network section) the location from where browser tries to download the image? – TomazicM Nov 30 '18 at 14:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.