function createdropbutton() { var splitbutoon=new Ext.button.Split({ renderTo: "extSlider", frame:true, text:'�??换', menu:new Ext.menu.Menu({ items: [ // these will render as dropdown menu items when the arrow is clicked: {text: '影�?�', handler: function(){ // alert("Item 1 clicked");basemapGallery.select("basemap_0");} Dbasemap1.setVisibility(true); Ybasemap.setVisibility(false); var originalExtent = new esri.geometry.Extent({"xmin":-86.309,"ymin":37.895,"xmax":-85.044,"ymax":38.515,"spatialReference":{"wkid":4326}}); map.setExtent(originalExtent); } }, {text: '�?�形', handler: function(){ //alert("Item 2 clicked");basemapGallery.select("basemap_1"); } Dbasemap1.setVisibility(false); Ybasemap.setVisibility(true); var newExtent = new esri.geometry.Extent({"xmin":-80.466,"ymin":27.287,"xmax":-80.248,"ymax":27.536,"spatialReference":{"wkid":4326}}); map.setExtent(newExtent); } } ] }) });
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.