diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-04-25 13:15:44 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-06-02 14:51:39 -0700 |
commit | a43940afb2208c61b487bfd8729bbde1bd674794 (patch) | |
tree | 53d192ea899be1d88f99aeef3d1b3255f9cb5104 /src/mbgl/annotation/fill_annotation_impl.cpp | |
parent | 27baa34d44f0006c05ba7c417bf11e184b0bd22b (diff) | |
download | qtlocation-mapboxgl-a43940afb2208c61b487bfd8729bbde1bd674794.tar.gz |
[core] Runtime style layer API
Diffstat (limited to 'src/mbgl/annotation/fill_annotation_impl.cpp')
-rw-r--r-- | src/mbgl/annotation/fill_annotation_impl.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/mbgl/annotation/fill_annotation_impl.cpp b/src/mbgl/annotation/fill_annotation_impl.cpp index 093f53fb91..17bdd9c38e 100644 --- a/src/mbgl/annotation/fill_annotation_impl.cpp +++ b/src/mbgl/annotation/fill_annotation_impl.cpp @@ -16,15 +16,12 @@ void FillAnnotationImpl::updateStyle(Style& style) const { if (style.getLayer(layerID)) return; - std::unique_ptr<FillLayer> layer = std::make_unique<FillLayer>(); + std::unique_ptr<FillLayer> layer = std::make_unique<FillLayer>(layerID); + layer->setSource(AnnotationManager::SourceID, layerID); - layer->paint.fillOpacity = annotation.opacity; - layer->paint.fillColor = annotation.color; - layer->paint.fillOutlineColor = annotation.outlineColor; - - layer->id = layerID; - layer->source = AnnotationManager::SourceID; - layer->sourceLayer = layer->id; + layer->setFillOpacity(annotation.opacity); + layer->setFillColor(annotation.color); + layer->setFillOutlineColor(annotation.outlineColor); style.addLayer(std::move(layer), AnnotationManager::PointLayerID); } |