summaryrefslogtreecommitdiff
path: root/src/mbgl/annotation
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2018-07-13 17:02:30 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2018-07-20 12:35:00 -0700
commitaf89318b1d3bef15e92e591887c9d65b10be54ce (patch)
treed3ccb07da91bb56197607f5319100e64f7493211 /src/mbgl/annotation
parenta3d988ab8520ea12272bb80a746a2d91cbc332f5 (diff)
downloadqtlocation-mapboxgl-af89318b1d3bef15e92e591887c9d65b10be54ce.tar.gz
[core] Convert token strings to expressions
Diffstat (limited to 'src/mbgl/annotation')
-rw-r--r--src/mbgl/annotation/annotation_manager.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mbgl/annotation/annotation_manager.cpp b/src/mbgl/annotation/annotation_manager.cpp
index b94b0a1bce..41eedf17dc 100644
--- a/src/mbgl/annotation/annotation_manager.cpp
+++ b/src/mbgl/annotation/annotation_manager.cpp
@@ -8,6 +8,7 @@
#include <mbgl/style/style_impl.hpp>
#include <mbgl/style/layers/symbol_layer.hpp>
#include <mbgl/style/layers/symbol_layer_impl.hpp>
+#include <mbgl/style/expression/dsl.hpp>
#include <mbgl/storage/file_source.hpp>
#include <boost/function_output_iterator.hpp>
@@ -160,8 +161,9 @@ void AnnotationManager::updateStyle() {
std::unique_ptr<SymbolLayer> layer = std::make_unique<SymbolLayer>(PointLayerID, SourceID);
+ using namespace expression::dsl;
layer->setSourceLayer(PointLayerID);
- layer->setIconImage({SourceID + ".{sprite}"});
+ layer->setIconImage(PropertyExpression<std::string>(concat(vec(literal(SourceID + "."), toString(get("sprite"))))));
layer->setIconAllowOverlap(true);
layer->setIconIgnorePlacement(true);