jieter / Leaflet.Sync

Synchronized view of two maps.
http://jieter.github.io/Leaflet.Sync/examples/dual.html
BSD 3-Clause "New" or "Revised" License
235 stars 53 forks source link

Initial sync #15

Closed danimt closed 11 years ago

danimt commented 11 years ago

Is is possible to add a way to sync views (align center) before binding to ensure the map is panning correctly?

To bypass this I'm currently using setView on the second instance that is created on demand with the first instance data, and using reset:true

jieter commented 11 years ago

Yeah, it does make sense to do map.setView(this.getCenter(), this.getZoom()) by default... I can't think of a use case where it doesn't yet. Should we add an option to disable it anyway?

danimt commented 11 years ago

I can't think of any case where you would want to disable it, but "its worth the option" if the user feels like doing it manually, I think.