gisking.kr

BasemapGallery is not displaying

Discussion created by gisking.kr on Jul 2, 2013
Latest reply on Jul 3, 2013 by gisking.kr
I am very new to JavaScript and ArcGIS.
I am trying to implementing the ArcGIS BasemapGallery widget into my application.
I am making it base on this sample example by ESRI (https://developers.arcgis.com/en/javascript/jssamples/widget_basemap.html).
The extendable dijit.TitlePane is appeared on the corner of my map window. However, when I extend the basemapgallary titlepane, it is appeared as an empty box.  I am aware of that I have to run this code via Http://, I put my html file and css files into our server. But there is no luck. Could anyone help me what I am doing wrong?
I am using ESRI JS 3.5 with FireFox 22.

Here is my code:
      // I added into <script>
      dojo.require("esri.virtualearth.VETiledLayer");
      dojo.require("dijit.TitlePane");
      dojo.require("esri.dijit.BasemapGallery");

     //this is a js part
     //add the basemap gallery
        var basemapGallery = new esri.dijit.BasemapGallery({
          showArcGISBasemaps: true,
          map: map
        }, "basemapGallery");

          basemapGallery.startup();
          dojo.connect(basemapGallery, "onError", function(msg){console.log(msg)});


     //This is a HTML part
       <!--base map-->
          <div style = "position:absolute; right:10px; top:50px; z-index:9999;">
          <div data-dojo-type="dijit.TitlePane" data-dojo-props="title:'Switch Basemap', closable:false,  open:false" >
            <div data-dojo-type="dijit.layout.ContentPane" style="width:380px; height:280px; overflow:auto;">
              <div id="basemapGallery" ></div>
            </div>
          </div>
          </div>

Many thanks in advance.
Best,

Outcomes