summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksandar Stojiljkovic <aleksandar.stojiljkovic@mapbox.com>2019-05-29 13:36:47 +0300
committerAleksandar Stojiljkovic <aleksandar.stojiljkovic@mapbox.com>2019-06-03 08:55:39 +0300
commit1637a4b69449ae4919d39fdf6384fcdf1a003a3a (patch)
tree03994508949849c0d3fbc50dc18790c76d8b8340
parent62f6338d5bc0f0a2c515f45ba30bf5de506e9929 (diff)
downloadqtlocation-mapboxgl-1637a4b69449ae4919d39fdf6384fcdf1a003a3a.tar.gz
[ios] Content insets border case fix and comment.
Allows changing camera when user duplicates content insets. Related to previous patch and comment: https://github.com/mapbox/mapbox-gl-native/pull/14664#pullrequestreview-243004376 Thanks @1ec5
-rw-r--r--platform/ios/src/MGLMapView.mm7
1 files changed, 5 insertions, 2 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index a304bfddfc..c2ab9c9fc1 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -3429,9 +3429,12 @@ public:
});
};
}
-
+
+ // Padding is baked in adjusted camera center (in cameraForLatLngs) and
+ // cameraOptions.padding at this point is (0, 0, 0, 0) and we don't need to
+ // check if cameraOptions.contentInsets are equal to contentInsets.
MGLMapCamera *camera = [self cameraForCameraOptions:cameraOptions];
- if ([self.camera isEqualToMapCamera:camera] && UIEdgeInsetsEqualToEdgeInsets(_contentInset, insets))
+ if ([self.camera isEqualToMapCamera:camera])
{
if (completion)
{