Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Add predicate property to MGLStyleLayer #5973

Closed

Description

@1ec5

MGLStyleLayer should have a predicate property that translates to a filter in mbgl. The developer would create a predicate like so:

[NSPredicate predicateWithFormat:@"name == 'USA'"]

The returned value would be an instance of NSComparisonPredicate with leftExpression.keyPath being name, predicateOperatorType being NSEqualToPredicateOperatorType, and rightExpression.constantValue being USA. We’d translate that into an mbgl::style::EqualsFilter.

Here’s a full correspondence between NSPredicate types and style specification filter forms.

/cc @frederoni @incanus

Activity

  1. added
    iOS
    macOS
    on Aug 12, 2016
  2. added this to the ios-v3.4.0 milestone on Aug 12, 2016
  3. boundsj commented on Sep 2, 2016

    @boundsj
    Contributor

    This was completed by @frederoni in #6049 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

iOSmacOSruntime styling

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions