Closed landwire closed 9 years ago
This could indeed be useful for some cases, and is only partially covered by options we have available today. Instinctively I don't think this should be too hard to implement.
You can add two new optional parameters when creating the MiniMap. Something like:
this.miniMapCntrl = new L.Control.MiniMap(this.pilotLayer.layer, { toggleDisplay: true, disableZoom: true, disableDragging: true, zoomLevelFixed: 1 });
And just add this in your Control.MiniMap.js:
if (this.options.disableDragging) { this._miniMap.dragging.disable(); } if (this.options.disableZoom) { this._miniMap.touchZoom.disable(); this._miniMap.doubleClickZoom.disable(); this._miniMap.scrollWheelZoom.disable(); }
This should do the trick, I just don't have the time to push this on github.
Hi there, it would be nice to have the option to disable zoomon the minimap. Everytime I scroll over the map with my mouse (i.e I scroll down the page and my pointer happens to come over the minimap), the minimap changes zoom and the big map obviously too.
I also would like to be able to disable "dragging" the map.
Thanks, Sascha