[android] #4515 - correctly calculate bounds

This commit is contained in:
Tobrun
2016-03-31 07:50:48 +02:00
parent 53267c6fc1
commit 4454bd2a3e

View File

@@ -229,8 +229,8 @@ public final class CameraUpdateFactory {
RectF padding = getPadding();
// Calculate the bounds of the possibly rotated shape with respect to the viewport
PointF nePixel = new PointF(-10000, -10000);
PointF swPixel = new PointF(10000, 10000);
PointF nePixel = new PointF(Float.MIN_VALUE, Float.MIN_VALUE);
PointF swPixel = new PointF(Float.MAX_VALUE, Float.MAX_VALUE);
float viewportHeight = uiSettings.getHeight();
for (LatLng latLng : getBounds().toLatLngs()) {
PointF pixel = projection.toScreenLocation(latLng);