I have several projects that have the basemap defined as part of the map constructor. I have a project I'm reworking in the AMD style, so I'm going through, changing the code as best I can. Maybe I've hit a gotcha on this one that I'm not aware of. The definition for the map is highlightMarkerSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 22, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([255,255,0]), 2), new Color([255,255,0,0.5])); var popup = new Popup({ markerSymbol: highlightMarkerSymbol, fillSymbol: new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([255,200,0]), 2), new Color([255,255,0,0.50])) }, dojo.create("div")); map = new Map("mapDiv", { infoWindow: popup, basemap: "topo", center: [-92.593, 38.5], zoom: 7 });
After this I load a few different layers. I'm also defining a basemapGallery to let the users change the background. All my layers load fine and I'm not getting any errors. When my page first loads, there is no basemap displayed, it's just blank. If I zoom in a couple of times, then it draws. If I use my tool to change the basemap, it also works fine. I tried a few different basemaps, not just topo, with the same results. Can anyone provide some insight as to why the basemap might not draw at first? I have this same syntax in other projects and it works just fine in them!