From 4454bd2a3e10ffca257c59d6ff5384f9a4704ca9 Mon Sep 17 00:00:00 2001 From: Tobrun Date: Thu, 31 Mar 2016 07:50:48 +0200 Subject: [PATCH] [android] #4515 - correctly calculate bounds --- .../java/com/mapbox/mapboxsdk/camera/CameraUpdateFactory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/camera/CameraUpdateFactory.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/camera/CameraUpdateFactory.java index 8c6591f9a..fdbe44a62 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/camera/CameraUpdateFactory.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/camera/CameraUpdateFactory.java @@ -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);