Leaflet.MagnifyingGlass
Leaflet.MagnifyingGlass copied to clipboard
Fix to viewport
Hi @bbecquet .. first off Thanks for a Superb plugin!!
I was wondering if there is a way to fix the glass to some pixel coordinates in the viewport and not attach it to map with a lat long.
What I am looking for is a magnifying glass that is attached to same point in the viewport and when main map slides under it, it shows the zoomed in version of the map that is currently under it.
or it can be used to create glass that shows different layer of the map that is under it.
Thanks!
- Shaunak
Hi! Thanks your question, and sorry for waiting so long to reply. You've probably found a way to do what you want by now… If not, is what you would like to do feasible with that plug-in instead: https://github.com/Norkart/Leaflet-MiniMap ?
The main difference between it and mine is that MiniMap is a Leaflet Control
, which is meant to be part of the UI and fixed to the viewport as other controls.
On the contrary, MagnifyingGlass inherits Layer
, so it's meant to be part of the map itself, placed (and optionnaly moved) on it.