Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toggle not displayed #129

Open
aludin opened this issue Aug 23, 2017 · 6 comments
Open

Toggle not displayed #129

aludin opened this issue Aug 23, 2017 · 6 comments

Comments

@aludin
Copy link

aludin commented Aug 23, 2017

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
Copy link
Contributor

robpvn commented Nov 23, 2017

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
Copy link

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
Copy link
Contributor

robpvn commented Mar 23, 2018

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
Copy link

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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants
@aludin @robpvn @buttersnipps @JohnerPierre and others