You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am quite new to Leaflet. I have used Magnifier plugin in my app which has many layers.
Can somebody tell me how to set and remove magnifier for multiple layers on the go? It will be great help.
Thanks,
Anuj
The text was updated successfully, but these errors were encountered:
Hi.
Double sorry, for letting this question unanswered for so long, and because it's just a matter of missing documentation.
There is no specific method to add/remove layers on magnifying glasses, it's simpler than that. Mag glass objects expose the getMap method, that you can use to access the L.Map instance that it contains. Then, you can do anything you would do on a "normal" Leaflet map object, as it is one.
varmap=L.map(...);// the main mapvarmg=L.magnifyingGlass(...);// the magnifying glass instancemap.addLayer(mg);varminiMap=mg.getMap();// the map instance contained in the magnifying glassminiMap.addLayer(L.marker(...));
Hi,
I am quite new to Leaflet. I have used Magnifier plugin in my app which has many layers.
Can somebody tell me how to set and remove magnifier for multiple layers on the go? It will be great help.
Thanks,
Anuj
The text was updated successfully, but these errors were encountered: