summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorAlexander Shalamov <alexander.shalamov@mapbox.com>2019-10-30 10:21:17 +0200
committerAlexander Shalamov <alexander.shalamov@mapbox.com>2019-11-11 18:20:01 +0200
commitc6f3cc8b60e0cff032020a780d4fd3de1cb2a112 (patch)
tree155fe444f21ae88dda664e81cfc8378e28297b0e /platform
parente1556fc539607db626b978040895716c1564c9b9 (diff)
downloadqtlocation-mapboxgl-c6f3cc8b60e0cff032020a780d4fd3de1cb2a112.tar.gz
[core] Implement image expression (#15877)
* [core] Bump gl-js version * [core] Implement image expression * [core] Use new image expression * [core] Coerce image expression to / from string * [core] Serialize evaluated image * [core] Pass available images to layout * [core] Pass images to evaluation context * [core] Set available flag value based on image availability * [core] Allow image coercion to boolean to indicate image availability * [core] Coalesce image expression * [core] Add image expression to next build system * [core] Align serialization format and evaluated type with gl-js * [core] Add images to expression evaluation method * [core] Add support for Image expression to expression test runner * [core] Unskip image expression tests * [core] Update unit tests * [core] Use image expression in annotation manager * [core] Add string to ImageExpression conversion * [core] Add image expression to expression dsl * [core] Convert tokens for implicitly created Image literal * [core] Fix clang format * [core] Split generated style code lines that are over 120 characters * [core] Add unit test for image expression equality * [core] Add image property expression evaluation unit test * [core] Unskip image expression render test * [core] Skip 'in' expression tests * [core] Ignore fill-pattern/update-feature-state render test * [core] Rename Image::serialize to Image::toValue
Diffstat (limited to 'platform')
-rw-r--r--platform/node/src/node_expression.cpp18
-rw-r--r--platform/node/test/ignores.json14
2 files changed, 16 insertions, 16 deletions
diff --git a/platform/node/src/node_expression.cpp b/platform/node/src/node_expression.cpp
index e1c3ba0c39..81d5c74767 100644
--- a/platform/node/src/node_expression.cpp
+++ b/platform/node/src/node_expression.cpp
@@ -35,16 +35,14 @@ void NodeExpression::Init(v8::Local<v8::Object> target) {
}
type::Type parseType(v8::Local<v8::Object> type) {
- static std::unordered_map<std::string, type::Type> types = {
- {"string", type::String},
- {"number", type::Number},
- {"boolean", type::Boolean},
- {"object", type::Object},
- {"color", type::Color},
- {"value", type::Value},
- {"formatted", type::Formatted},
- {"number-format", type::String}
- };
+ static std::unordered_map<std::string, type::Type> types = {{"string", type::String},
+ {"number", type::Number},
+ {"boolean", type::Boolean},
+ {"object", type::Object},
+ {"color", type::Color},
+ {"value", type::Value},
+ {"formatted", type::Formatted},
+ {"number-format", type::String}};
v8::Local<v8::Value> v8kind = Nan::Get(type, Nan::New("kind").ToLocalChecked()).ToLocalChecked();
std::string kind(*v8::String::Utf8Value(v8kind));
diff --git a/platform/node/test/ignores.json b/platform/node/test/ignores.json
index 51decb351c..438677fff9 100644
--- a/platform/node/test/ignores.json
+++ b/platform/node/test/ignores.json
@@ -16,10 +16,12 @@
"expression-tests/legacy/interval/composite": "https://github.com/mapbox/mapbox-gl-native/issues/12747",
"expression-tests/legacy/interval/composite-default": "https://github.com/mapbox/mapbox-gl-native/issues/12747",
"expression-tests/legacy/interval/tokens-zoom": "https://github.com/mapbox/mapbox-gl-native/issues/12747",
- "expression-tests/image/basic": "https://github.com/mapbox/mapbox-gl-native/issues/15800",
- "expression-tests/image/compound": "https://github.com/mapbox/mapbox-gl-native/issues/15800",
- "expression-tests/image/coalesce": "https://github.com/mapbox/mapbox-gl-native/issues/15800",
- "expression-tests/image/implicit-assert": "https://github.com/mapbox/mapbox-gl-native/issues/15800",
+ "expression-tests/in/assert-array": "https://github.com/mapbox/mapbox-gl-native/issues/15893",
+ "expression-tests/in/assert-string": "https://github.com/mapbox/mapbox-gl-native/issues/15893",
+ "expression-tests/in/basic-array": "https://github.com/mapbox/mapbox-gl-native/issues/15893",
+ "expression-tests/in/basic-string": "https://github.com/mapbox/mapbox-gl-native/issues/15893",
+ "expression-tests/in/invalid-haystack": "https://github.com/mapbox/mapbox-gl-native/issues/15893",
+ "expression-tests/in/invalid-needle": "https://github.com/mapbox/mapbox-gl-native/issues/15893",
"query-tests/geometry/multilinestring": "needs investigation",
"query-tests/geometry/multipolygon": "needs investigation",
"query-tests/geometry/polygon": "needs investigation",
@@ -77,7 +79,6 @@
"render-tests/line-sort-key/literal": "https://github.com/mapbox/mapbox-gl-native/issues/15008",
"render-tests/regressions/mapbox-gl-js#8817": "skip - https://github.com/mapbox/mapbox-gl-native/issues/15737",
"render-tests/text-max-width/zero-width-point-placement": "https://github.com/mapbox/mapbox-gl-native/issues/15648",
- "render-tests/icon-image/image-expression": "https://github.com/mapbox/mapbox-gl-native/issues/15800",
"render-tests/icon-text-fit/text-variable-anchor-overlap": "https://github.com/mapbox/mapbox-gl-native/issues/15809",
"query-tests/fill-extrusion/base-in": "https://github.com/mapbox/mapbox-gl-native/issues/13139",
"query-tests/fill-extrusion/box-in": "https://github.com/mapbox/mapbox-gl-native/issues/13139",
@@ -87,5 +88,6 @@
"query-tests/fill-extrusion/sort-rotated": "https://github.com/mapbox/mapbox-gl-native/issues/13139",
"query-tests/fill-extrusion/sort": "https://github.com/mapbox/mapbox-gl-native/issues/13139",
"query-tests/fill-extrusion/top-in": "https://github.com/mapbox/mapbox-gl-native/issues/13139",
- "query-tests/regressions/mapbox-gl-js#7883": "https://github.com/mapbox/mapbox-gl-native/issues/14585"
+ "query-tests/regressions/mapbox-gl-js#7883": "https://github.com/mapbox/mapbox-gl-native/issues/14585",
+ "render-tests/fill-pattern/update-feature-state": "https://github.com/mapbox/mapbox-gl-native/issues/15895"
}