Map Canvas Size

596
2
08-14-2013 07:12 AM
TiagoRibeiro
Occasional Contributor
Hi guys,

I have a an app with two mobile views, an intro view and a map view.
When I load the the Map View first everything works fine: http://jsfiddle.net/7bzMG/
But the idea of having an intro view is that this should be the first to load, but when this happens the map canvas doesn't size properly: http://jsfiddle.net/bHcDm//
The only difference between the two fiddle's is in the first one I force the Map View to load first.

Does anyone know why this happens? It isn't the first time that I have this problem. The same happened using Tab containers. If the first tab to load isn't the one that contains the map, the map canvas doesn't size properly. The way I got around this was to add a loading overlay and once the application was loaded switch to the intro tab.

Does anyone have an idea why this happens?

Cheers,

Tiago
0 Kudos
2 Replies
JonathanUihlein
Esri Regular Contributor
I believe it has to do with the parser, or rather, when the parser is called.

You could call the parser manually instead of onLoad, then load the map.
0 Kudos
TiagoRibeiro
Occasional Contributor
I believe it has to do with the parser, or rather, when the parser is called.

You could call the parser manually instead of onLoad, then load the map.


Thanks for the reply Jonathan.
What to you mean "call the parser manually"? Isn't that accomplished by "parser.parse();"?
0 Kudos