function createBasemapGallery() { //add the basemap gallery, in this case we'll display maps from ArcGIS.com including bing maps var basemapGallery = new esri.dijit.BasemapGallery({ showArcGISBasemaps: true, bingMapsKey: 'Av1bH4keF8rXBtxWOegklgWGCYYz8UGYvBhsWKuvc4Z15kT76xVFOERk8jkKEDvT', map: map }, "basemapGallery"); basemapGallery.startup(); dojo.connect(basemapGallery, 'onLoad', function(bm) { // find a base map to remove // in this case, it'll be the one named "Terrain" var bm = dojo.filter(basemapGallery.basemaps, function(bm) { return bm.title == 'Terrain'; })[0]; // remove the basemap from the gallery basemapGallery.remove(bm.id); // create a BasemapLayer and Basemap with the // ligh gray basemap var grayLayer = new esri.dijit.BasemapLayer({ url:"http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer" }); var grayBasemap = new esri.dijit.Basemap({ layers:[grayLayer], title:"Light Gray", thumbnailUrl:"http://www.arcgis.com/sharing/content/items/8b3d38c0819547faa83f7b7aca80bd76/info/thumbnail/lightgray_thumb_webmap2.png" }); // add the light gray basemap basemapGallery.add(grayBasemap); }); }
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.