Skip to content

Commit 56e02bf

Browse files
committed
fix getVT when feature is point
1 parent 582968a commit 56e02bf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/tilevt.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ function toGeoJSONVTStruct(customPropertiesFun: Function, buffer: ArrayBuffer) {
5050
const feature = layer.feature(i);
5151
customPropertiesFun(layerName, layer, feature, i);
5252
const array = pointArrayToNumberArray(feature.loadGeometry());
53+
if (feature.type === 1) {
54+
for (let j = 0; j < array.length; j++) {
55+
array[i] = array[i][0];
56+
}
57+
58+
}
5359
const flatFeature = {
5460
geometry: array,
5561
tags: feature.properties || {},

0 commit comments

Comments
 (0)