summaryrefslogtreecommitdiff
path: root/src/mbgl/annotation
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-12-07 14:56:32 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-12-07 18:22:33 -0800
commite04c5f650648d150e78da3602745b6190ec4aee3 (patch)
tree5420b75780c798af82aa5831a1413c8bf1df0c96 /src/mbgl/annotation
parent8bfc5de1dc969559e031de6650d234e086cb4fb2 (diff)
downloadqtlocation-mapboxgl-e04c5f650648d150e78da3602745b6190ec4aee3.tar.gz
[core] Replace StyleLayerType with RTTI
Diffstat (limited to 'src/mbgl/annotation')
-rw-r--r--src/mbgl/annotation/annotation_manager.cpp2
-rw-r--r--src/mbgl/annotation/shape_annotation_impl.cpp4
2 files changed, 1 insertions, 5 deletions
diff --git a/src/mbgl/annotation/annotation_manager.cpp b/src/mbgl/annotation/annotation_manager.cpp
index dfdd2f713d..a85021b774 100644
--- a/src/mbgl/annotation/annotation_manager.cpp
+++ b/src/mbgl/annotation/annotation_manager.cpp
@@ -120,8 +120,6 @@ void AnnotationManager::updateStyle(Style& style) {
std::unique_ptr<SymbolLayer> layer = std::make_unique<SymbolLayer>();
layer->id = PointLayerID;
- layer->type = StyleLayerType::Symbol;
-
layer->source = SourceID;
layer->sourceLayer = PointLayerID;
layer->layout.icon.image = std::string("{sprite}");
diff --git a/src/mbgl/annotation/shape_annotation_impl.cpp b/src/mbgl/annotation/shape_annotation_impl.cpp
index a3f5fd2d6a..28d4b1e3d4 100644
--- a/src/mbgl/annotation/shape_annotation_impl.cpp
+++ b/src/mbgl/annotation/shape_annotation_impl.cpp
@@ -30,7 +30,6 @@ void ShapeAnnotationImpl::updateStyle(Style& style) {
type = ProjectedFeatureType::LineString;
std::unique_ptr<LineLayer> layer = std::make_unique<LineLayer>();
- layer->type = StyleLayerType::Line;
layer->layout.join = JoinType::Round;
const LineAnnotationProperties& properties = shape.properties.get<LineAnnotationProperties>();
@@ -48,7 +47,6 @@ void ShapeAnnotationImpl::updateStyle(Style& style) {
type = ProjectedFeatureType::Polygon;
std::unique_ptr<FillLayer> layer = std::make_unique<FillLayer>();
- layer->type = StyleLayerType::Fill;
const FillAnnotationProperties& properties = shape.properties.get<FillAnnotationProperties>();
layer->paint.opacity = properties.opacity;
@@ -67,7 +65,7 @@ void ShapeAnnotationImpl::updateStyle(Style& style) {
std::unique_ptr<StyleLayer> layer = sourceLayer->clone();
- type = layer->type == StyleLayerType::Line
+ type = layer->is<LineLayer>()
? ProjectedFeatureType::LineString
: ProjectedFeatureType::Polygon;