diff --git a/src/mbgl/annotation/shape_annotation_impl.cpp b/src/mbgl/annotation/shape_annotation_impl.cpp index a2dc4c809..283e736c6 100644 --- a/src/mbgl/annotation/shape_annotation_impl.cpp +++ b/src/mbgl/annotation/shape_annotation_impl.cpp @@ -27,7 +27,7 @@ struct ToGeoJSONVT { geojsonvt::ProjectedFeature operator()(const LineString& line) const { geojsonvt::ProjectedRings converted; - converted.push_back(convertPoints(geojsonvt::ProjectedFeatureType::Polygon, line)); + converted.push_back(convertPoints(geojsonvt::ProjectedFeatureType::LineString, line)); return convertFeature(geojsonvt::ProjectedFeatureType::LineString, converted); } diff --git a/test/api/annotations.cpp b/test/api/annotations.cpp index 07e169cf9..ce5aaa860 100644 --- a/test/api/annotations.cpp +++ b/test/api/annotations.cpp @@ -46,7 +46,7 @@ TEST(Annotations, SymbolAnnotation) { TEST(Annotations, LineAnnotation) { AnnotationTest test; - LineString line = {{ { 0, 0 }, { 45, 45 } }}; + LineString line = {{ { 0, 0 }, { 45, 45 }, { 30, 0 } }}; LineAnnotation annotation { line }; annotation.color = {{ 255, 0, 0, 1 }}; annotation.width = 5; diff --git a/test/fixtures/annotations/line_annotation/expected.png b/test/fixtures/annotations/line_annotation/expected.png index b86570f99..4f89e5931 100644 Binary files a/test/fixtures/annotations/line_annotation/expected.png and b/test/fixtures/annotations/line_annotation/expected.png differ