Select to view content in your preferred language

Sync two maps

4465
4
Jump to solution
06-05-2013 02:37 AM
OrenGal
Regular Contributor
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
Deactivated User
Set the following on app load:

esriConfig.defaults.map.panDuration = 0;

View solution in original post

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

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

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

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