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.mm24
1 files changed, 8 insertions, 16 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index a445b0890f..4d654c79d8 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -963,22 +963,14 @@ public:
[self updateAttributionAlertView];
- if (!CGRectContainsRect(self.bounds, self.attributionButton.mgl_frameForTransformIdentity)) {
- [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.mgl_frameForTransformIdentity)) {
- [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.mgl_frameForTransformIdentity)) {
- [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.mgl_frameForTransformIdentity)) {
- [NSException raise:NSInvalidArgumentException
- format:@"The logoView is not in the visible area of the mapview. Please check your position and offset settings"];
- }
+ MGLAssert(CGRectContainsRect(self.bounds, self.attributionButton.mgl_frameForIdentifyTransform),
+ @"The attribution is not in the visible area of the mapview. Please check your position and offset settings");
+ MGLAssert(CGRectContainsRect(self.bounds, self.scaleBar.mgl_frameForIdentifyTransform),
+ @"The scaleBar is not in the visible area of the mapview. Please check your position and offset settings");
+ MGLAssert(CGRectContainsRect(self.bounds, self.compassView.mgl_frameForIdentifyTransform),
+ @"The compassView is not in the visible area of the mapview. Please check your position and offset settings");
+ MGLAssert(CGRectContainsRect(self.bounds, self.logoView.mgl_frameForIdentifyTransform),
+ @"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.