Sync two maps

4302
4
Jump to solution
06-05-2013 02:37 AM
OrenGal
New Contributor III
I have two maps. I want map2 to pan while map1 is panning
map2 is refreshing only when I finish the pan.

dojo.connect(map1, "onPan", onPan);

function onPan(extent, delta) {
map2.setExtent(extent);
}

Thanks,
Oren
0 Kudos
1 Solution

Accepted Solutions
BenFousek
Occasional Contributor III
Set the following on app load:

esriConfig.defaults.map.panDuration = 0;

View solution in original post

0 Kudos
4 Replies
OrenGal
New Contributor III
Made sample
please look at the delay while panning
http://jsfiddle.net/orengal/d7Ycr/1/
0 Kudos
BenFousek
Occasional Contributor III
Set the following on app load:

esriConfig.defaults.map.panDuration = 0;
0 Kudos
OrenGal
New Contributor III
So simple!
Thanks!

fixed:
http://jsfiddle.net/orengal/d7Ycr/5/
0 Kudos
JackFairfield
Occasional Contributor II

Thanks a bunch.  I was stuck on this for a while.  I had a bug that was producing a sort of feedback loop.  I think it was trying to process two animations at once and was causing it to freak out.  Setting to 0 ensures the event post processing is complete before the next event post processing begins.

0 Kudos