<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.6/js/dojo/dijit/themes/claro/claro.css"> <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.6"></script>
Jeff,
I can't reproduce with this sample:
http://help.arcgis.com/en/webapi/javascript/arcgis/demos/widget/widget_basemap.html
Can you repro with that sample? If so can you provide me with a series of steps that will show the problem. I tested switching basemaps and using the scroll wheel to zoom and everything looked ok to me.
Your sample works for me also
I get
exception in animation handler for: onEnd
?v=2.6 (line 14)
TypeError: n is null
(function(){var _1=null;if((_1||(typeo...etTimeout(dojo._loadInit,100);}})();
After any zoom event using BasemapGallery and 2.6 . Switching back to 2.5 and error goes away
Jeff,
We'd really like to try and reproduce this issue but so far no luck. Just to clarify can you reproduce the problem with the sample or is it only your application? Since you are seeing errors in Firebug I assume you are seeing the issue in Firefox - which version?
If you can't reproduce with the sample do you have a url that shows the problem?
Are you specifying a valid bing maps key for the BasemapGallery?
var basemapGallery = new esri.dijit.BasemapGallery({ showArcGISBasemaps: true, bingMapsKey:'Enter Bing Maps Key Here', map: map }, "basemapGallery");
Ok i figured my issue out, but it is very app specific.
I use a onExtentChange event to hide items in the Gallery if they aren't available at a particular level (i.e. hide the "OpenStreetMap" option at level 19).
I hide them by doing
dojo.style(dojo.byId(id), "display", "none");
If i comment out the line in my extent change handler my app works again.
So it turns out, i was manually (hardcoding) look for some particular layers to hide. One of them was
"USA Topo Maps"
Apparently that is not in the 2.6 api for the Gallery, so when i went to hide it, I was trying to access it byId, I was accessing a null object.
var basemapGallery = new esri.dijit.BasemapGallery({ showArcGISBasemaps: false, basemapsGroup:{owner:"esri",title:"Community Basemaps"}, map: map }, dojo.create('div'));