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
I've come up with a simple addition to L.MagnifyingGlass: A setFixedZoom method. Usually my magnifying glass has zoomOffset = 0, but when the main map reaches its maxZoom = 18, I tell my magnifying glass to zoom in further to fixedZoom = 19 (whole application code below).
L.DomEvent.on(glass_map.getContainer(),'mousewheel',e=>{if(map.getZoom()===18&&e.deltaY<0){// zoom inmagnifying_glass.setFixedZoom(19)/* ... */}if(magnifying_glass.options.fixedZoom!==-1&&e.deltaY>0){// zoom outL.DomEvent.stopPropagation(e)// avoid zoom out of main mapmagnifying_glass.setFixedZoom(-1)/* ... */}})
The text was updated successfully, but these errors were encountered:
I've come up with a simple addition to
L.MagnifyingGlass
: AsetFixedZoom
method. Usually my magnifying glass haszoomOffset = 0
, but when the main map reaches itsmaxZoom = 18
, I tell my magnifying glass to zoom in further tofixedZoom = 19
(whole application code below).What do you think? Shall I create a PR? 🙂
The text was updated successfully, but these errors were encountered: