Norkart / Leaflet-MiniMap

A minimap control plugin for Leaflet
BSD 2-Clause "Simplified" License
395 stars 125 forks source link

Fix minimap on point / bounds #94

Closed mnquintana closed 9 years ago

mnquintana commented 9 years ago

It would be really useful to be able to fix the MiniMap (ie. prevent it from zooming / panning along with the main map) by passing it a point (a LatLng object or an array) or bounds. Use case here is to have a minimap be a fixed view on a particular point in the map, no matter the state of the main map. Thanks!

mnquintana commented 9 years ago

This is sort of related to https://github.com/Norkart/Leaflet-MiniMap/issues/77, but would be adding additional config options.

robpvn commented 9 years ago

This also seems quite doable, all we need is to add it as options that we pass through to the underlying Map object. Looking at http://leafletjs.com/reference.html#map-options it seems that only the bounds option is supported out of the box, so we'll stick to that.

mnquintana commented 9 years ago

Sweet, good to hear! I'll try to get a PR together for this soon.