where I use a BasemapGallery "behind the scenes" and create my own UI.
In my case I am using the compact framework and Dojo Mobile. I am trying to create an EdgeToEdgeList that displays the Basemaps and allows the user to select one. However, I'm getting a javascript error when I try to create the BasemapGallery widget. The error is:
"Uncaught TypeError: Object #<Object> has no method 'parse'"
If anyone knows why this is happening, and more importantly, how to fix it - Please let me know!
I'm somewhat new to JS so it's probably something simple 🙂
Here is my code with a comment preceding the offending line:
// BUG: THIS LINE CAUSES A JAVASCRIPT ERROR var basemapGallery = new esri.dijit.BasemapGallery({ showArcGISBasemaps: true, map: map });
dojo.connect(basemapGallery, "onLoad", function () { // TODO: Iterate the basemaps and populate the basemapList with ListItems // that display the thumbnail and basemap name. Then wire up an event // to change the basemap when an item is selected. }); }
function orientationChanged() { if (map) { map.reposition(); map.resize(); } }