Select to view content in your preferred language

Strange behavior - ZoomIn [ESRI Navigation Toolbar]

2141
2
Jump to solution
02-01-2012 11:05 PM
thomaskoslowski
New Contributor
Hi,

I've noticed a strange behavior when using ZoomIn while an ExandoPane is open. My map is within a ContentPane, as soon as I expand the ExandoPane the whole ContentPane is shifted to the right (just like the map too). Now when I use ZoomIn the map zooms to a wrong area. It seems that the ZoomIn function assumes that the ContentPane has still its original size.

I hope that the attachment illustrates this behavior!

thanks,
Thomas
0 Kudos
1 Solution

Accepted Solutions
thomaskoslowski
New Contributor
Map#resize is set.

It's the same behavior as mentioned here:

http://forums.esri.com/Thread.asp?c=158&f=2396&t=261911

so far without result...?

Edit:

figured it out:

I call Map#resize each time the pane gets resized:

dojo.connect(dijit.byId('myexpandopane'), 'resize', resizeMap);

View solution in original post

0 Kudos
2 Replies
derekswingley1
Deactivated User
Can you post some code to reproduce this?

Have you set up an event listener to resize the map when it's content pane resizes? All of our samples that use content panes (quite a few of them!) do this with the following code: 
dojo.connect(map, 'onLoad', function(theMap) { 
  //resize the map when the browser resizes
  dojo.connect(dijit.byId('map'), 'resize', map,map.resize);
});
0 Kudos
thomaskoslowski
New Contributor
Map#resize is set.

It's the same behavior as mentioned here:

http://forums.esri.com/Thread.asp?c=158&f=2396&t=261911

so far without result...?

Edit:

figured it out:

I call Map#resize each time the pane gets resized:

dojo.connect(dijit.byId('myexpandopane'), 'resize', resizeMap);
0 Kudos