2
我目前在MapFragment中定義了多個GroundOverlays。我使用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創建會使經緯度發生變化?