diff options
author | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2019-10-30 10:21:17 +0200 |
---|---|---|
committer | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2019-11-11 18:20:01 +0200 |
commit | c6f3cc8b60e0cff032020a780d4fd3de1cb2a112 (patch) | |
tree | 155fe444f21ae88dda664e81cfc8378e28297b0e /src/mbgl/annotation | |
parent | e1556fc539607db626b978040895716c1564c9b9 (diff) | |
download | qtlocation-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 'src/mbgl/annotation')
-rw-r--r-- | src/mbgl/annotation/annotation_manager.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mbgl/annotation/annotation_manager.cpp b/src/mbgl/annotation/annotation_manager.cpp index 345171b96e..b5dfea8e1a 100644 --- a/src/mbgl/annotation/annotation_manager.cpp +++ b/src/mbgl/annotation/annotation_manager.cpp @@ -1,15 +1,16 @@ #include <mbgl/annotation/annotation_manager.hpp> #include <mbgl/annotation/annotation_source.hpp> #include <mbgl/annotation/annotation_tile.hpp> -#include <mbgl/annotation/symbol_annotation_impl.hpp> -#include <mbgl/annotation/line_annotation_impl.hpp> #include <mbgl/annotation/fill_annotation_impl.hpp> +#include <mbgl/annotation/line_annotation_impl.hpp> +#include <mbgl/annotation/symbol_annotation_impl.hpp> #include <mbgl/layermanager/layer_manager.hpp> -#include <mbgl/style/style.hpp> -#include <mbgl/style/style_impl.hpp> +#include <mbgl/style/expression/dsl.hpp> +#include <mbgl/style/expression/image.hpp> #include <mbgl/style/layers/symbol_layer.hpp> #include <mbgl/style/layers/symbol_layer_impl.hpp> -#include <mbgl/style/expression/dsl.hpp> +#include <mbgl/style/style.hpp> +#include <mbgl/style/style_impl.hpp> #include <boost/function_output_iterator.hpp> @@ -184,7 +185,8 @@ void AnnotationManager::updateStyle() { using namespace expression::dsl; layer->setSourceLayer(PointLayerID); - layer->setIconImage(PropertyExpression<std::string>(concat(vec(literal(SourceID + "."), toString(get("sprite")))))); + layer->setIconImage(PropertyExpression<expression::Image>( + image(concat(vec(literal(SourceID + "."), toString(get("sprite"))))))); layer->setIconAllowOverlap(true); layer->setIconIgnorePlacement(true); |