summaryrefslogtreecommitdiff
path: root/platform/ios/src/MGLMapView.mm
diff options
context:
space:
mode:
Diffstat (limited to 'platform/ios/src/MGLMapView.mm')
-rw-r--r--platform/ios/src/MGLMapView.mm12
1 files changed, 12 insertions, 0 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index edc127dd88..385dc86392 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -967,6 +967,18 @@ public:
[NSException raise:NSInvalidArgumentException
format:@"The attribution is not in the visible area of the mapview. Please check your position and offset settings"];
}
+ if (!CGRectContainsRect(self.bounds, self.scaleBar.frame)) {
+ [NSException raise:NSInvalidArgumentException
+ format:@"The scaleBar is not in the visible area of the mapview. Please check your position and offset settings"];
+ }
+ if (!CGRectContainsRect(self.bounds, self.compassView.frame)) {
+ [NSException raise:NSInvalidArgumentException
+ format:@"The compassView is not in the visible area of the mapview. Please check your position and offset settings"];
+ }
+ if (!CGRectContainsRect(self.bounds, self.logoView.frame)) {
+ [NSException raise:NSInvalidArgumentException
+ format:@"The logoView is not in the visible area of the mapview. Please check your position and offset settings"];
+ }
}
/// Updates `contentInset` to reflect the current window geometry.