2011-04-20 5 views
1

확대/축소 수준에 따라지도에 다른 드로어 블을 배치하고 싶습니다. 이 작업을 수행 할 수 있습니까? 거기에 줌 변화를 감지하는 방법이 있습니까?Google지도에는 onZoomLevelChange() 또는 이와 유사한 것이 있습니까?

안드로이드 앱

+0

나는 대답을 찾지 못했습니다. 다음 는 대한 확장입니다''지도보기 오버레이 - manager'라는 MapView' http://code.google.com/p/mapview-overlay-manager/ –

답변

1

당신은지도 API 방금 MapView에 "getZoomLevel()"를 호출 할 수 있습니다를 사용하는 경우.

int getMaxZoomLevel() 
      Returns the maximum zoom level for the point currently at the center. 
int getZoomLevel() 
      Returns the current zoom level of the map 

그것을 확인하기 위해 "OnTouchEvent"를 덮어 쓸 수와 줌 레벨과 관련된 백그라운드 작업을 파견 할 처리 할 수있는 가장 쉬운 방법.

boolean onTouchEvent(android.view.MotionEvent ev) 
      Passes trackball events to the overlays first, and if they don't handle them, feed it to a gesture detector, and dispatch the detected gestures 

특수한 조치를 취하지 않으면 "super.OnTouchEvent"를 제공해야합니다.

+0

이 유용한하지만 라운드에 대한 방법처럼 보인다 하나하고. 좋은 감사 –

관련 문제