Norkart / Leaflet-MiniMap

A minimap control plugin for Leaflet
BSD 2-Clause "Simplified" License
395 stars 125 forks source link

Toggle not displayed #129

Open aludin opened 7 years ago

aludin commented 7 years ago

I am using L.Minimap with the latest 1.2 stable Leaflet release. I have set toggleDisplay: true. However the toggle is not shown on the minimap. I checked with Google Developer tools and I can see that toggle.svg is being accessed by the browser with no errors (and why toggle.svg and toggle.png?). I am also using my own "custom" tile provider. The tiles are displayed correcly on on the minimap though.

Here is my code:

        var minimapLayer = new L.TileLayer('mytiles/{z}/{x}/{y}.png');
        var miniMap = new L.Control.MiniMap(minimapLayer, { toggleDisplay: true }).addTo(map);
robpvn commented 6 years ago

Sorry for completely forgetting about this issue! Can you create a jsFiddle to deomonstrate it? What browser? (toggle as svg and png is a workaround for IE, not sure if it's needed anymore.)

JohnerPierre commented 6 years ago

Hi, i have the same issue as aludin, the toggle is here ( a litle white square) but not the arrow (picture). It's work on : Firefox : 58.0.2 But not with : Google Chrome Version 64.0.3282.186

I am currently using leaflet 1.2.0

Thanks in advance

robpvn commented 6 years ago

Sorry for being late again! I'm not seeing this problem in the minimap examples using Chrome 65. Do you have a jsFiddle that demonstrates it?

buttersnipps commented 6 years ago

This problem exists. The toggle buttons is not shown.The example one loads but when used in a project it doesn't.

screen shot 2018-04-18 at 1 57 04 pm

toggleDisplay is set to true.

screen shot 2018-04-18 at 1 57 37 pm
buttersnipps commented 6 years ago

Im sorry the node module does not link the css directly . If anyone is loading this through node modules do require('../../node_modules/leaflet-minimap/dist/Control.MiniMap.min.css');

This should work.