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 expression filter support #10720

Closed
Closed

Description

@tobrun

Tailwork of expression integration in #10654. Capturing from #10654 (comment) that expression support for core needs to be implemented first.

Activity

  1. added
    Android
    on Dec 16, 2017
  2. added this to the milestone on Dec 16, 2017
  3. added
    Core
    on Dec 16, 2017
  4. 1ec5 commented on Jan 6, 2018

    @1ec5
    Contributor

    Per #7978 (comment), this task includes adding a getFilter() accessor to Layer.

  5. anandthakker commented on Feb 6, 2018

    @anandthakker
    Contributor

    Outline of an implementation approach:

    1. Allow expressions to be used as filters.
      a. Add an ExpressionFilter type to include/mbgl/style/filter.hpp that holds an mbgl::style::Expression object (of type mbgl::style::expression::type::Boolean)
      b. Add a corresponding overload for mbgl::style::FilterEvaluator
      c. In src/mbgl/style/conversion/filter.cpp, add a port of isExpressionFilter and use it to decide in Converter<Filter>::operator() whether to parse the incoming JSON as an ExpressionFilter or one of the legacy filter types.
    2. Convert "legacy" filters directly into expressions.
      a. Port the specialized filter-* expressions from GL JS, adding them to src/mbgl/style/expression/compound_expression.cpp.
      b. Update src/mbgl/style/conversion/filter.cpp to always convert incoming JSON values to an ExpressionFilter (using the filter-* types as needed for legacy syntax)
      c. Rewrite/simplify include/mbgl/style/filter.hpp and mbgl::style::FilterEvaluator, removing all the different *Filter types and the Filter variant and renaming ExpressionFilter to Filter.
  6. 1ec5 commented on Feb 7, 2018

    @1ec5
    Contributor

    Once the core changes in #10720 (comment) are complete, we can remove the FilterEvaluator from NSExpression+MGLAdditions.mm and round out a few remaining NSPredicate-specific operators for #11013.

  7. self-assigned this
    on Feb 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

AndroidCorefeature

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions