summaryrefslogtreecommitdiff
path: root/test/style
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-06-21 17:22:51 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-06-21 18:24:49 -0700
commit3459b83736f0e4eedfb95a1394d9e4ee1523b917 (patch)
tree2e8cc0abacdaad54b394af1291e846c7483acfa2 /test/style
parent220fc7adc952c97db3fb8ce7edb855db9469ef5a (diff)
downloadqtlocation-mapboxgl-3459b83736f0e4eedfb95a1394d9e4ee1523b917.tar.gz
[core, node] Node bindings for setFilter
Diffstat (limited to 'test/style')
-rw-r--r--test/style/filter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/style/filter.cpp b/test/style/filter.cpp
index 4a1010445e..fd763896a6 100644
--- a/test/style/filter.cpp
+++ b/test/style/filter.cpp
@@ -2,7 +2,8 @@
#include <mbgl/style/filter.hpp>
#include <mbgl/style/filter_evaluator.hpp>
-#include <mbgl/style/parser.hpp>
+#include <mbgl/style/rapidjson_conversion.hpp>
+#include <mbgl/style/conversion.hpp>
#include <rapidjson/document.h>
@@ -16,7 +17,7 @@ typedef std::multimap<std::string, mbgl::Value> Properties;
Filter parse(const char * expression) {
rapidjson::GenericDocument<rapidjson::UTF8<>, rapidjson::CrtAllocator> doc;
doc.Parse<0>(expression);
- return parseFilter(doc);
+ return conversion::convertFilter(doc).get<Filter>();
}
bool evaluate(const Filter& filter, const Properties& properties, FeatureType type = FeatureType::Unknown) {