Skip to content
Advertisement

Leaflet controls not responding to click

Not sure how I have managed this but my leaflet zoom controls are not clickable? They do show up on the screen but there is no mouse change when hovering over them.

Do I need to create another layer for the controls or am I missing something else from my code?

update: The map will also not scroll or zoom in – it appears static

This is my script relating to the map:

JavaScript

Also not sure if it might relate to my html:

JavaScript

Or CSS

JavaScript

Thanks

Advertisement

Answer

Remove the z-index: -1 from the css styling and it should work.

WORKING DEMO

MapPanes – Leaflet Docs

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement