I am using the minimap control and everything works just fine, except that the toggle icon is not being displayed. Normally the toggle icon on the minimap should be similar to this example:


However in my case the toggle icon is not displayed.

Here is my code to display the minimap:

 baseLayer = L.tileLayer('tiles/custom/{z}/{x}/{y}.png').addTo(map);

 var minimapLayer = new L.TileLayer('tiles/custom/{z}/{x}/{y}.png');
 var miniMap = new L.Control.MiniMap(minimapLayer, { toggleDisplay: true }).addTo(map);

Note that I am using my own custom tiles but this should not be an issue...in the Google chrome developer tools view I can see that the icon is correctly returned to the browser, but it s just not displayed (also toggle.svg is requested instead of toggle.png. Don't know if that makes a difference).

Your Answer

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

Browse other questions tagged or ask your own question.