Closed kingstakh closed 10 years ago
Hmm, the difference in implementation between L.TileLayer
and L.Google
ensures this works in only one direction.
I just tested with Leaflet master and small patch to L.Google
, which works like expected, I'll make a PR to Leaflet-plugins with the patch later today...
It will be cool
Hmm, making L.Google
behave nice with Leaflet master is a little harder than I thought... Still working on it...
Maybe this example helps to fix this issue http://tianjara.net/leaflet-side-by-side.html, work with little freezes, but works! Here in action http://1871.by/demo2/
Thanks for the suggestion but the problem is L.Google
and Leaflet's Layers refactoring... L.Sync works like charm with two regular TileLayers...
Hi! fix this problem impossible?
Hmm, the problem is that L.Google
is a regular google maps api map in a layer, which just copies interaction on the google map to the leaflet map. It might be possible to mimic Leaflet's TileLayer's dragging behavior in L.Google
, but it's not a trivial task.
On top of that: it's not really the scope of L.Sync
, and I currently do not have the time to fix it...
Not sure if this helps at all but I just used this and it worked
map2.on('drag zoomend', function(){
map1.setView(map2.getCenter(), map2.getZoom(), {animate: false, duration: 1});
})
Thank you!
Hi! Nice plugin, but have one problem. For adding Google tile layer use this Plugin https://github.com/shramov/leaflet-plugins, but Google layer is not draggable in Sync mode. If drag Google layer - OSM layer dragging, if drag OSM - Google layer frized and change position only after change zoom level up/down. Demo here http://1871.by/demo/