summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mbgl/annotation/shape_annotation_impl.cpp5
-rw-r--r--src/mbgl/tile/geojson_tile.cpp5
2 files changed, 10 insertions, 0 deletions
diff --git a/src/mbgl/annotation/shape_annotation_impl.cpp b/src/mbgl/annotation/shape_annotation_impl.cpp
index 29dd4ef957..1da2e4ea9f 100644
--- a/src/mbgl/annotation/shape_annotation_impl.cpp
+++ b/src/mbgl/annotation/shape_annotation_impl.cpp
@@ -144,6 +144,11 @@ void ShapeAnnotationImpl::updateTile(const CanonicalTileID& tileID, AnnotationTi
renderGeometry.push_back(renderLine);
}
+ // https://github.com/mapbox/geojson-vt-cpp/issues/44
+ if (featureType == FeatureType::Polygon) {
+ renderGeometry = fixupPolygons(renderGeometry);
+ }
+
layer.features.emplace_back(
std::make_shared<AnnotationTileFeature>(featureType, renderGeometry));
}
diff --git a/src/mbgl/tile/geojson_tile.cpp b/src/mbgl/tile/geojson_tile.cpp
index 81d2cb5144..90147ffd87 100644
--- a/src/mbgl/tile/geojson_tile.cpp
+++ b/src/mbgl/tile/geojson_tile.cpp
@@ -89,6 +89,11 @@ std::unique_ptr<GeoJSONTile> convertTile(const mapbox::geojsonvt::Tile& tile) {
}
}
+ // https://github.com/mapbox/geojson-vt-cpp/issues/44
+ if (featureType == FeatureType::Polygon) {
+ geometry = fixupPolygons(geometry);
+ }
+
Feature::property_map properties { feature.tags.begin(), feature.tags.end() };
features.emplace_back(std::make_shared<GeoJSONTileFeature>(