judge whether it is multiPolygon or Polygon:https://github.com/mapbox/vector-tile-js/blob/a9a9102/lib/vectortilefeature.js#L195-L223
This commit is contained in:
songyumeng
2020-06-22 00:50:37 +08:00
committed by Andreas Hocevar
parent c490745ff0
commit b606878d57
2 changed files with 36 additions and 7 deletions

View File

@@ -181,7 +181,7 @@ describe('ol.format.MVT', function () {
flatCoordinates,
ends
) {
flatCoordinates.push(0, 0, 3, 0, 3, 3, 3, 0, 0, 0);
flatCoordinates.push(0, 0, 3, 0, 3, 3, 0, 4, 0, 0);
flatCoordinates.push(1, 1, 1, 2, 2, 2, 2, 1, 1, 1);
ends.push(10, 20);
};
@@ -207,8 +207,8 @@ describe('ol.format.MVT', function () {
flatCoordinates,
ends
) {
flatCoordinates.push(0, 0, 1, 0, 1, 1, 1, 0, 0, 0);
flatCoordinates.push(1, 1, 2, 1, 2, 2, 2, 1, 1, 1);
flatCoordinates.push(0, 0, 1, 0, 1, 1, 0, 1, 0, 0);
flatCoordinates.push(1, 1, 2, 1, 2, 2, 1, 2, 1, 1);
ends.push(10, 20);
};
const feature = format.createFeature_({}, rawFeature);