summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorzmiao <miao.zhao@mapbox.com>2020-02-17 17:30:30 +0200
committerzmiao <miao.zhao@mapbox.com>2020-02-21 21:39:48 +0200
commit0cc042434d04989d8450575075fce2958e57bbc0 (patch)
tree3b9c5ece1e9aa7a1d2eff79df783e3276f54106b /include
parent44f9a694c57d94640f070d3c5b0fc4c918798097 (diff)
downloadqtlocation-mapboxgl-0cc042434d04989d8450575075fce2958e57bbc0.tar.gz
[core] Add support for "line within polygon"
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/style/expression/within.hpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/include/mbgl/style/expression/within.hpp b/include/mbgl/style/expression/within.hpp
index 7e4050509d..900e84296f 100644
--- a/include/mbgl/style/expression/within.hpp
+++ b/include/mbgl/style/expression/within.hpp
@@ -23,18 +23,12 @@ public:
void eachChild(const std::function<void(const Expression&)>&) const override {}
- bool operator==(const Expression& e) const override {
- if (e.getKind() == Kind::Within) {
- auto rhs = static_cast<const Within*>(&e);
- return geoJSONSource == rhs->geoJSONSource;
- }
- return false;
- }
+ bool operator==(const Expression& e) const override;
- std::vector<optional<Value>> possibleOutputs() const override { return {{true}, {false}}; }
+ std::vector<optional<Value>> possibleOutputs() const override;
mbgl::Value serialize() const override;
- std::string getOperator() const override { return "within"; }
+ std::string getOperator() const override;
private:
GeoJSON geoJSONSource;