[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:
Osana Babayan
2018-02-16 09:36:56 -05:00
committed by GitHub
parent 63eb511d83
commit 341eb7645f

View File

@@ -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()
);
}