Select to view content in your preferred language

Map not reappearing after hide -> resize -> show

1993
3
05-03-2013 07:52 AM
MartinPritchard
New Contributor
I current having a problem with hiding and showing an esri Map.

The problem arises if the window is resized whilst the map is 'hidden'. If this happens, the map doesn't reappear when it should. I'm using CSS ('display:none') to hide the map.

If you don't 'resize' the window/map whilst the map is hidden, everything works as you'd expect.

I've put together a quick example of this behaviour here: http://jsfiddle.net/mart_blewpri/ZM3SM/


Any help would be much appreciated.

Cheers!
0 Kudos
3 Replies
JeffJacobson
Frequent Contributor
The same problem occurs with Esri's jQuery Mobile samples.

I haven't tested this myself yet, but someone posted this fix for this issue in jQuery Mobile.  Perhaps it will help with your problem as well.
http://forums.arcgis.com/threads/82287-Hiding-the-map-problems-with-building-a-mobile-application-wi...
0 Kudos
MattLane
Frequent Contributor
Yeah, you do have to work around the issue. Here is an example of how to do it with your sample http://jsfiddle.net/ZM3SM/5/
0 Kudos
MartinPritchard
New Contributor
Yeah, you do have to work around the issue. Here is an example of how to do it with your sample http://jsfiddle.net/ZM3SM/5/


Thanks Matt.....Perfect!
0 Kudos