summaryrefslogtreecommitdiff
path: root/platform/darwin/src
diff options
context:
space:
mode:
Diffstat (limited to 'platform/darwin/src')
-rw-r--r--platform/darwin/src/MGLRendererConfiguration.h11
-rw-r--r--platform/darwin/src/MGLRendererConfiguration.mm6
2 files changed, 17 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLRendererConfiguration.h b/platform/darwin/src/MGLRendererConfiguration.h
index 34c8e9628b..d5b6527d7e 100644
--- a/platform/darwin/src/MGLRendererConfiguration.h
+++ b/platform/darwin/src/MGLRendererConfiguration.h
@@ -35,6 +35,17 @@ NS_ASSUME_NONNULL_BEGIN
which will be available at run time, e.g. "PingFang". */
@property (nonatomic, readonly) mbgl::optional<std::string> localFontFamilyName;
+/**
+ A Boolean value indicating whether symbol layers may enable per-source symbol
+ collision detection.
+
+ Set `MGLCollisionBehaviorPre4_0` in your containing app's Info.plist.
+
+ Setting this property to `YES` in the plist results in symbol layers only running
+ collision detection against other symbol layers that are part of the same source.
+ */
+@property (nonatomic, readonly) BOOL perSourceCollisions;
+
@end
NS_ASSUME_NONNULL_END
diff --git a/platform/darwin/src/MGLRendererConfiguration.mm b/platform/darwin/src/MGLRendererConfiguration.mm
index ae7d7dd9fe..b31da674cf 100644
--- a/platform/darwin/src/MGLRendererConfiguration.mm
+++ b/platform/darwin/src/MGLRendererConfiguration.mm
@@ -40,4 +40,10 @@
return fontFamilyName ? std::string([fontFamilyName UTF8String]) : mbgl::optional<std::string>();
}
+- (BOOL)perSourceCollisions {
+ NSNumber *boolWrapper = [[[NSBundle mainBundle] infoDictionary] valueForKey:@"MGLCollisionBehaviorPre4_0"];
+
+ return boolWrapper.boolValue;
+}
+
@end