AnsweredAssumed Answered

BasemapGallery bug

Question asked by gsimpson4 on Jul 11, 2012
Latest reply on Jul 11, 2012 by DSwingley-esristaff
There seems to be a bug when creating a BasemapGallery inside of another programmatically defined container.  In my scenario, I generate TitlePanes inside of a BorderContainer when the application loads.  This is done in code and the TitlePanes you see are dependent on your user ID.  The problem seems to be that the srcNodeRef in the constructor of BasemapGallery actually only accepts the ID of an existing element that was defined declaratively in HTML.  The behavior I see is generally the same in which only partial HTML is created for the BasemapGallery.  The "flowcontainer" element is always empty, even though the query to ArcGIS was successful and returned results.  Depending on the method, I may get an error about registering the new container dijit.

Assuming I have:

var _container = new dijit.TitlePane({title:"Choose a Basemap"});

None of these work:

1.  var _bmg = new esri.dijit.BasemapGallery({ showArcGISBasemaps: true,map: _map }, _container);
2.  var _bmg = new esri.dijit.BasemapGallery({ showArcGISBasemaps: true,map: _map }, _container.srcNodeRef);
3.  var _bmg = new esri.dijit.BasemapGallery({ showArcGISBasemaps: true,map: _map });_bmg.placeAt(_container.containerNode);
4.  several other ways I've tried

Outcomes