summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLStyleLayer.mm.ejs
diff options
context:
space:
mode:
Diffstat (limited to 'platform/darwin/src/MGLStyleLayer.mm.ejs')
-rw-r--r--platform/darwin/src/MGLStyleLayer.mm.ejs12
1 files changed, 12 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLStyleLayer.mm.ejs b/platform/darwin/src/MGLStyleLayer.mm.ejs
index c35d254caf..4e59c3c6cb 100644
--- a/platform/darwin/src/MGLStyleLayer.mm.ejs
+++ b/platform/darwin/src/MGLStyleLayer.mm.ejs
@@ -34,6 +34,18 @@
return self;
}
+<% if (type !== 'background' && type !== 'raster') { -%>
+- (void)setPredicate:(NSPredicate *)predicate
+{
+ self.layer->setFilter(predicate.mgl_filter);
+}
+
+- (NSPredicate *)predicate
+{
+ return [NSPredicate mgl_predicateWithFilter:self.layer->getFilter()];
+}
+
+<% } -%>
<% if (layoutProperties.length) { -%>
#pragma mark - Accessing the Layout Attributes