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.

[iOS] Predicate "extrude == true" does not correctly filter results #9056

Closed

Description

@jmkiley

Platform: iOS
Mapbox SDK version: v3.6.0-alpha.1

The documentation for MGLFillExtrusionStyleLayer currently suggests that developers use the following predicate:

layer.predicate = NSPredicate(format: "extrude == TRUE")

However, this does not work. I have tested it out with different capitalizations as well. In order to correctly filter buildings/building parts, the predicate should be:
layer.predicate = NSPredicate(format: "extrude == %@ AND height >= 0", "true")

Is this is intended behavior, or is just correcting the documentation will be enough.

cc @1ec5 @incanus @boundsj

Activity

  1. added
    iOS
    on May 19, 2017
  2. 1ec5 commented on May 19, 2017

    @1ec5
    Contributor

    It turns out that the extrude property in the Mapbox Streets v7 source is a string (either "true" or "false") rather than a Boolean value. (That isn’t apparent from the source documentation.) So MGLFillExtrusionStyleLayer’s documentation should be updated to use the format string extrude == 'true' rather than extrude == TRUE.

    /cc @ajashton

  3. added
    macOS
    on May 19, 2017
  4. added this to the ios-v3.6.0 milestone on May 19, 2017
  5. added a commit that references this issue on May 19, 2017
    a19fd81
  6. 1ec5 commented on May 20, 2017

    @1ec5
    Contributor

    Fixed in #9059 on the release-ios-v3.6.0-android-v5.1.0 branch.

  7. added a commit that references this issue on Jun 2, 2017
    2d039d3
  8. added a commit that references this issue on Jul 5, 2017
    20a5ef6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationiOSmacOSruntime styling

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions