Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] incorrect latlngBounds in the VisibleRegion with map is rot…
Browse files Browse the repository at this point in the history
…ated

smallest bounding box for 4 points cannot (#11226)
be created using LatLngBounds.fromLatLngs()
as the order matters in that method and that does not work for rotated map
  • Loading branch information
osana authored and tobrun committed Mar 1, 2018
1 parent 4b32228 commit 90cce8d
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,12 @@ public VisibleRegion getVisibleRegion() {
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()
);
}

Expand Down

0 comments on commit 90cce8d

Please sign in to comment.