<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>
var basemapGallery = new esri.dijit.BasemapGallery({ showArcGISBasemaps: false, basemapsGroup:{owner:"esri",title:"Community Basemaps"}, map: map }, dojo.create('div'));
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 doingdojo.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.
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");
var basemapGallery = new esri.dijit.BasemapGallery({ showArcGISBasemaps: true, bingMapsKey:'Enter Bing Maps Key Here', map: map }, "basemapGallery");
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?
Your sample works for me alsoI getexception 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,I can't reproduce with this sample:http://help.arcgis.com/en/webapi/javascript/arcgis/demos/widget/widget_basemap.htmlCan 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.
I appear to have the same problem. I'm using the BasemapGallery Dijit in my application.
Can you post the code for your app? A simplified repro case would be preferred.
I appear to have the same problem. I'm using the BasemapGallery Dijit in my application. All the services display except the Bing services.
When you updated the samples, did you simply find/replace 2.5 with 2.6 in the Bing sample?
Our sample to add a bing layer works: http://help.arcgis.com/en/webapi/javascript/arcgis/demos/ve/ve_layer.htmlPost more code to repro?
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.