This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
Predicate documentation should go into more detail #6407
Labels
clustering
documentation
iOS
Mapbox Maps SDK for iOS
macOS
Mapbox Maps SDK for macOS
runtime styling
Milestone
The documentation comment for four MGLStyleLayer subclass’s
predicate
property doesn’t go into too much detail, relying instead on a link to the style specification’sFilter
documentation to provide more details. But theFilter
documentation is expressed in a syntax completely foreign to iOS/macOS developers, who must create an NSPredicate instead of a nested array of strings. Though Apple’s NSPredicate documentation is thorough when it comes to expressable operators, there are a lot of expressable operators that implementations can choose not to implement, and indeed we haven’t implemented operators such asLIKE
,BEGINSWITH
, and blocks. Moreover, the style specification and Supercluster reserve the following keys:$id
([core] Add support for $id key to filters #5708)$type
point_count
(Add documentation on cluster behavior + syntax mapbox-gl-js#2985)All these nuances would cause the
predicate
property documentation to grow unwieldy. To make matters worse, the property is declared redundantly on four individual MGLStyleLayer subclass. We should consolidate them into a single property: #6406. Beyond that, we could add our first appendix on the subject (realm/jazzy#435), giving predicates a little more discoverability./cc @friedbunny @frederoni
The text was updated successfully, but these errors were encountered: