我目前正在 MapFragment 中定义多个 GroundOverlays。我正在通过 LatLngBounds 创建每个 GroundOverlay,并且在大多数情况下,所有内容都对齐;然而,一些 GroundOverlays 最终会略微偏离。
如果我在创建后记录边界,它们符合我的期望。我第二次记录它们时,它们略微偏离了。
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 创建会使纬度和经度发生变化?