[tests] Tweak LineAnnotation test so that it reveals a bug; fix the bug

This commit is contained in:
John Firebaugh
2016-06-02 14:46:45 -07:00
parent 2c8d225cf2
commit 1fb96d38a0
3 changed files with 2 additions and 2 deletions

View File

@@ -27,7 +27,7 @@ struct ToGeoJSONVT {
geojsonvt::ProjectedFeature operator()(const LineString<double>& 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);
}

View File

@@ -46,7 +46,7 @@ TEST(Annotations, SymbolAnnotation) {
TEST(Annotations, LineAnnotation) {
AnnotationTest test;
LineString<double> line = {{ { 0, 0 }, { 45, 45 } }};
LineString<double> line = {{ { 0, 0 }, { 45, 45 }, { 30, 0 } }};
LineAnnotation annotation { line };
annotation.color = {{ 255, 0, 0, 1 }};
annotation.width = 5;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB