Skip to content

Commit

Permalink
Support triangulation of polygons for MVTLoader in loaders.gl (visgl#…
Browse files Browse the repository at this point in the history
  • Loading branch information
felixpalmer authored May 4, 2021
1 parent d5bb542 commit 0275d74
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/layers/src/geojson-layer/geojson-layer-props.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ export function createLayerPropsFromBinary(geojsonBinary, uniqueIdProperty, enco
featureIds: polygons.featureIds
};
layerProps.polygons._normalize = false;
if (polygons.triangles) {
layerProps.polygons.data.attributes.indices = polygons.triangles.value;
}

layerProps.polygonsOutline.data = {
length: polygons.primitivePolygonIndices.value.length,
Expand Down

0 comments on commit 0275d74

Please sign in to comment.