From d08861daf4ba3e9d178f14c204ed40c0868d6a7f Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Thu, 19 Nov 2015 19:50:29 -0800 Subject: [PATCH] [core] Force style-sourced annotations to be visible --- src/mbgl/annotation/shape_annotation_impl.cpp | 1 + test/fixtures/api/annotation.json | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/mbgl/annotation/shape_annotation_impl.cpp b/src/mbgl/annotation/shape_annotation_impl.cpp index 6941c59c3..4b60c667a 100644 --- a/src/mbgl/annotation/shape_annotation_impl.cpp +++ b/src/mbgl/annotation/shape_annotation_impl.cpp @@ -74,6 +74,7 @@ void ShapeAnnotationImpl::updateStyle(Style& style) { layer->id = layerID; layer->source = AnnotationManager::SourceID; layer->sourceLayer = layer->id; + layer->visibility = VisibilityType::Visible; style.addLayer(std::move(layer), sourceLayer->id); } diff --git a/test/fixtures/api/annotation.json b/test/fixtures/api/annotation.json index 75fcfca41..e0792a40b 100644 --- a/test/fixtures/api/annotation.json +++ b/test/fixtures/api/annotation.json @@ -11,6 +11,9 @@ "type": "fill", "source": "fake", "source-layer": "fake", + "layout": { + "visibility": "none" + }, "paint": { "fill-color": "rgba(255,0,0,1)" }