Hi Yan,The map services are in different geographic areas. So, after you click the drop down button to show the other map service you will need to update the extent using the setExtent method. Ex: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);
}
}
]
})
});