[android] incorrect LatLngBounds for the VisibleRegion for rotated map
smallest bounding box for 4 points cannot be created using LatLngBounds.fromLatLngs() as the order matters in that method and that does not work for rotated map
This commit is contained in:
@@ -104,11 +104,12 @@ public class Projection {
|
||||
LatLng bottomLeft = fromScreenLocation(new PointF(left, bottom));
|
||||
|
||||
return new VisibleRegion(topLeft, topRight, bottomLeft, bottomRight,
|
||||
LatLngBounds.from(
|
||||
topRight.getLatitude(),
|
||||
topRight.getLongitude(),
|
||||
bottomLeft.getLatitude(),
|
||||
bottomLeft.getLongitude())
|
||||
new LatLngBounds.Builder()
|
||||
.include(topRight)
|
||||
.include(bottomLeft)
|
||||
.include(bottomRight)
|
||||
.include(topLeft)
|
||||
.build()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user