diff options
author | Tobrun <tobrun.van.nuland@gmail.com> | 2016-10-05 22:55:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-05 22:55:54 +0200 |
commit | c2333658f0e756c306fffafed713a5e3bd61155f (patch) | |
tree | b57cd4da0b3157e25587704b21f298529c5b676a /platform | |
parent | d96aabec436f09e8bb7cc31f35e7b681fcdd07f6 (diff) | |
download | qtlocation-mapboxgl-c2333658f0e756c306fffafed713a5e3bd61155f.tar.gz |
[android] - invalidate focal point when setting MyLocationView padding (#6413)
Diffstat (limited to 'platform')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java index 317ccbf1a5..0d09892cbc 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java @@ -1283,6 +1283,12 @@ public class MapView extends FrameLayout { public void invalidateContentPadding() { setContentPadding(contentPaddingLeft, contentPaddingTop, contentPaddingRight, contentPaddingBottom); + + if (!mapboxMap.getTrackingSettings().isLocationTrackingDisabled()) { + setFocalPoint(new PointF(myLocationView.getCenterX(), myLocationView.getCenterY())); + } else { + setFocalPoint(null); + } } double getMetersPerPixelAtLatitude(@FloatRange(from = -180, to = 180) double latitude) { |