Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[core] Run fixupPolygons on geojson-vt-cpp polygon output
Browse files Browse the repository at this point in the history
  • Loading branch information
jfirebaugh committed May 23, 2016
1 parent d5d6430 commit ec60ba6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/mbgl/annotation/shape_annotation_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,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));
}
Expand Down
5 changes: 5 additions & 0 deletions src/mbgl/tile/geojson_tile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>(
Expand Down

0 comments on commit ec60ba6

Please sign in to comment.