Select to view content in your preferred language

Basemap Gallery Errors I cant figure out??

679
1
10-25-2012 12:26 PM
by Anonymous User
Not applicable
I consistently receive 2 TypeErrors when I load my Basemap Gallery widget (see 1st attached image). For the most part I get the gallery to show up and function correctly but sometimes I get nothing at all showing up (see 2nd attached image) .

If you guys have any thoughts or ideas that would be cool.

using arcgis api v.3.2

I call this createBasemapGallery(); from the map onload event handler

//This is the code used to create the gallery
          function createBasemapGallery() {             
              var basemapGallery = esri.dijit.BasemapGallery({
                  id: "bmg",
                  showArcGISBasemaps: true,
                  map: map
              }, "basemapGallery");
              


              basemapGallery.startup();
          }
[HTML]
THIS IS WHERE I PUT THE GALLERY
       <div id="galleryPane" dojotype="dijit.TitlePane" title="MAPS" closable="false" open="false"  style="position: absolute;             right: 20px; top: 65px; z-index: 999;">            <div dojotype="dijit.layout.ContentPane" style="width: 280px; height: 480px; overflow: auto;">                <div id="basemapGallery">                </div>            </div>        </div>[/HTML]
0 Kudos
1 Reply
ThomasHoman
Frequent Contributor
Hi Dan,

For your code, there is a small error. In your function createBasemapGallery the final 'basemapGallery' needs to match the id of your div id which is currently set to "galleryPane".

According to the Gallery api reference the value needs to point to a valid html element id.

Hope this helps

Regards,

Tom
0 Kudos