public void myClickHandler(View target) {
switch(target.getId()) {
/*case R.id.zoomin:
mapView.getController().zoomIn();
break;
case R.id.zoomout:
mapView.getController().zoomOut();
break;*/
case R.id.sat:
this.mapView.setSatellite(true);
break;
case R.id.street:
this.mapView.setStreetView(true);
break;
case R.id.traffic:
this.mapView.setTraffic(true);
break;
case R.id.normal:
this.mapView.setSatellite(false);
this.mapView.setStreetView(false);
this.mapView.setTraffic(false);
break;
default:
break;
}
// The following line should not be required but it is,
// at least up til Froyo.
this.mapView.postInvalidateDelayed(2000);
}
我相信你需要setStreetView,即使它说它已被弃用,它对我来说还可以
@Deprecated
public void setStreetView(boolean on)
Deprecated. Street view availability highlighting is no longer supported. This method operates as a no-op.
Control whether Street View availability (blue outlines) is shown on the map. This is incompatible with Traffic indicators, so they will be deactivated if necessary. Street View availability can be drawn over map tiles or over satellite tiles; however, they are optimized for map tiles.