diff options
author | Dane Springmeyer <dane@mapbox.com> | 2016-08-31 15:33:43 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-31 15:33:43 -0700 |
commit | be08c79b6ffc8062ed3bf73b2534d267c5000ab1 (patch) | |
tree | 3618db9cb6a165f61ce43a3c471ce5f8985240fe /include/mbgl/style | |
parent | fcee1a85cdff8f323d86378edf7c180a17329eb4 (diff) | |
download | qtlocation-mapboxgl-be08c79b6ffc8062ed3bf73b2534d267c5000ab1.tar.gz |
update filter doc usage example (#6202)
Diffstat (limited to 'include/mbgl/style')
-rw-r--r-- | include/mbgl/style/filter_evaluator.hpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/include/mbgl/style/filter_evaluator.hpp b/include/mbgl/style/filter_evaluator.hpp index 793abe6da0..cf9877da26 100644 --- a/include/mbgl/style/filter_evaluator.hpp +++ b/include/mbgl/style/filter_evaluator.hpp @@ -9,14 +9,11 @@ namespace mbgl { namespace style { /* - A visitor that evaluates a `Filter` for a given feature type and properties. For maximum - flexibility, it is templated on the PropertyAccessor type, which must be a callable type with - function signature `optional<Value> (const std::string&)`, returning the value for the given - key, if it exists. + A visitor that evaluates a `Filter` for a given feature. Use via `Filter::operator()`. For example: - if (filter(feature.getType(), [&] (const std::string& key) { return feature.getValue(key); })) { + if (filter(feature)) { // matches the filter } else { // does not match |