diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-10-20 12:21:40 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-10-30 11:19:28 -0700 |
commit | 540c6eca1544dd9617a7a19ffa9d396ed96df4ec (patch) | |
tree | a28fd4309f7fd542ccba70334726a46a08361c80 /src/mbgl/annotation/shape_annotation_impl.cpp | |
parent | 8c3b3cb792d0157aee4918c4ece822ec0fcfb381 (diff) | |
download | qtlocation-mapboxgl-540c6eca1544dd9617a7a19ffa9d396ed96df4ec.tar.gz |
[core] Eliminate StyleBucket
Diffstat (limited to 'src/mbgl/annotation/shape_annotation_impl.cpp')
-rw-r--r-- | src/mbgl/annotation/shape_annotation_impl.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/mbgl/annotation/shape_annotation_impl.cpp b/src/mbgl/annotation/shape_annotation_impl.cpp index b70b3423ba..a8d18b8463 100644 --- a/src/mbgl/annotation/shape_annotation_impl.cpp +++ b/src/mbgl/annotation/shape_annotation_impl.cpp @@ -5,7 +5,6 @@ #include <mbgl/util/constants.hpp> #include <mbgl/util/string.hpp> #include <mbgl/style/style.hpp> -#include <mbgl/style/style_bucket.hpp> #include <mbgl/layer/line_layer.hpp> #include <mbgl/layer/fill_layer.hpp> @@ -69,12 +68,12 @@ void ShapeAnnotationImpl::updateStyle(Style& style) { } layer->paints.paints = sourceLayer->paints.paints; - layer->bucket->layout = sourceLayer->bucket->layout; + layer->layout = sourceLayer->layout; } - layer->bucket->name = layer->id; - layer->bucket->source = AnnotationManager::SourceID; - layer->bucket->source_layer = layer->id; + layer->id = layerID; + layer->source = AnnotationManager::SourceID; + layer->sourceLayer = layer->id; style.addLayer(std::move(layer), beforeLayerID); } @@ -82,19 +81,15 @@ void ShapeAnnotationImpl::updateStyle(Style& style) { std::unique_ptr<StyleLayer> ShapeAnnotationImpl::createLineLayer() { type = ProjectedFeatureType::LineString; std::unique_ptr<LineLayer> layer = std::make_unique<LineLayer>(); - layer->id = layerID; layer->type = StyleLayerType::Line; - layer->bucket = std::make_shared<StyleBucket>(layer->type); - layer->bucket->layout.set(PropertyKey::LineJoin, ConstantFunction<JoinType>(JoinType::Round)); + layer->layout.set(PropertyKey::LineJoin, ConstantFunction<JoinType>(JoinType::Round)); return std::move(layer); } std::unique_ptr<StyleLayer> ShapeAnnotationImpl::createFillLayer() { type = ProjectedFeatureType::Polygon; std::unique_ptr<FillLayer> layer = std::make_unique<FillLayer>(); - layer->id = layerID; layer->type = StyleLayerType::Fill; - layer->bucket = std::make_shared<StyleBucket>(layer->type); return std::move(layer); } |