diff options
author | Lloyd Sheng <i@lloydsheng.com> | 2019-04-09 17:47:12 +0800 |
---|---|---|
committer | Lloyd Sheng <i@lloydsheng.com> | 2019-09-20 10:18:23 +0800 |
commit | 283894f3739eecbe2e502626c13b1a3aa1371592 (patch) | |
tree | 734a5c62a7737ac1d62c50463b35fe858995ea28 /platform/ios/src/MGLMapView.mm | |
parent | 8128d709b62189e0745ea64be3d35e8c6dab59fa (diff) | |
download | qtlocation-mapboxgl-283894f3739eecbe2e502626c13b1a3aa1371592.tar.gz |
Make sure attribution in proper position
Diffstat (limited to 'platform/ios/src/MGLMapView.mm')
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 62b943fd3d..edc127dd88 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -962,6 +962,11 @@ public: [self updateUserLocationAnnotationView]; [self updateAttributionAlertView]; + + if (!CGRectContainsRect(self.bounds, self.attributionButton.frame)) { + [NSException raise:NSInvalidArgumentException + format:@"The attribution is not in the visible area of the mapview. Please check your position and offset settings"]; + } } /// Updates `contentInset` to reflect the current window geometry. |