double x = 0;
double y= 0;
LatLng cenpt = new LatLng(x,y);
if(city[pos] == "福州" ){
x =26.08;
y=119.28;
}
else if (city[pos]=="上海"){
x=31.213;
y=121.445;
}
else if (city[pos]=="深圳"){
x=22.544;
y=114.109;
}
else if (city[pos]=="厦门"){
x=24.445;
y=118.07;
}
else{x=39.904;y=116.408;}
MapStatus mMapStatus = new MapStatus.Builder()
.target(cenpt)
.zoom(10)
.build();
//定义MapStatusUpdate对象,以便描述地图状态将要发生的变化
MapStatusUpdate mMapStatusUpdate = MapStatusUpdateFactory.newMapStatus(mMapStatus);
//改变地图状态
BaiduMap mBaidumap = mMapView.getMap();
mBaidumap.setMapStatus(mMapStatusUpdate);