2012-12-11 4 views
2

현재 MapFragment에서 여러 GroundOverlay를 정의하고 있습니다. LatLngBounds로 각 GroundOverlay를 만들고 대부분은 모든 것을 정렬합니다. 그러나 GroundOverlays의 일부는 약간 벗어났습니다.작성 후 GroundOverlay 경계가 변경됩니다.

생성 후 경계를 기록하면 내 예상과 일치합니다. 두 번째로 로그를 기록하면 약간 벗어났습니다.

LatLngBounds bounds = new LatLngBounds(new LatLng(point1_lat, point1_lon), new LatLng(point2_lat, point2_lon)); 

Log.d(TAG, "Bounds southwest: " + bounds.southwest.latitude + ", " + bounds.southwest.longitude); 
Log.d(TAG, "Bounds northeast: " + bounds.northeast.latitude + ", " + bounds.northeast.longitude); 

GroundOverlay groundOverlay = getMap().addGroundOverlay(new GroundOverlayOptions() 
         .image(bitmapDescriptor) 
         .positionFromBounds(bounds) 
        ); 

Log.d(TAG, "southwest: " + groundOverlay.getBounds().southwest.latitude + ", " + groundOverlay.getBounds().southwest.longitude); 
Log.d(TAG, "northeast: " + groundOverlay.getBounds().northeast.latitude + ", " + groundOverlay.getBounds().northeast.longitude); 

GroundOverlay를 사용하면 위도와 경도가 변경되는 이유는 무엇입니까?

답변

0

이미지를 만들기 위해 크기가 조정되고 있다는 것을 그것의 수 ... 너비/높이가 워드 프로세서 2의 거듭 제곱 길이를 가지고 있는지

: 이미지가 추가 될 때 지도는 2의 거듭 제곱 인 이미지로 변환됩니다. 크기가 2의 제곱수 인 원본 이미지 (예 : 128x512 또는 1024x1024)를 사용하면이 변환을 피할 수 있습니다.

앤디.

관련 문제