Select to view content in your preferred language

Basemap Display

860
2
Jump to solution
03-27-2014 06:07 AM
WesAskew
Deactivated User
I am having trouble in my application with the basemap loading.  It will not load initially until I zoom in.  It seems that half of the time it will load, the other half it doesn't.  What could be a cause this problem?  I have a large amount of layers (>30) loading initially as well.
0 Kudos
1 Solution

Accepted Solutions
BenFousek
Deactivated User
Wesley,
There could be several reasons for this. It's hard to tell w/o any code to review. Are you getting any errors in the console when the basemap doesn't load?

Something that comes to mind is the map div resizing for some reason between creating the map and the basemap loading. This can happen w/ dijit/layout/BorderContainer in some scenarios especially when programmatically manipulating the layout. For example adding buttons to a toolbar that is a region. Calling resize() on the bc before and/or after map creation will fix this. Certainly any other layout that is being created or manipulated programmatically during app initializing in which the height and width of the map div change could cause the same problem.

View solution in original post

0 Kudos
2 Replies
BenFousek
Deactivated User
Wesley,
There could be several reasons for this. It's hard to tell w/o any code to review. Are you getting any errors in the console when the basemap doesn't load?

Something that comes to mind is the map div resizing for some reason between creating the map and the basemap loading. This can happen w/ dijit/layout/BorderContainer in some scenarios especially when programmatically manipulating the layout. For example adding buttons to a toolbar that is a region. Calling resize() on the bc before and/or after map creation will fix this. Certainly any other layout that is being created or manipulated programmatically during app initializing in which the height and width of the map div change could cause the same problem.
0 Kudos
DorothyMortenson
Deactivated User
Thank you for this tip.  Would never have guessed.
0 Kudos