당신이이처럼 getMaxZoomLevel()와 getMinZoomLevel()를 오버라이드하여 설정할 수 있습니다, 클래스가지도보기를 확장 할 필요가 :
public class CustomMapView extends MapView {
/* constructors */
@Override
public int getMaxZoomLevel() {
return 22;
}
@Override
public int getMinZoomLevel() {
return 12;
}
}
CustomMapView에 대한지도보기 호출을 변경하는 것을 잊지 마세요
<com.yourpackage.CustomMapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
및 활동 :
private CustomMapView mMapView;
.
.
.
mMapView = (CustomMapView) findViewById(R.id.mapview);
레이아웃에