Skip to content

Commit b9d299b

Browse files
Fix measurement calculation (#53)
1 parent 3301f8d commit b9d299b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/scoord3dUtils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ function getFeatureScoord3dLength (feature, pyramid) {
367367
let yLen = p2[1] - p1[1]
368368
xLen *= xLen
369369
yLen *= yLen
370-
return Math.sqrt(xLen + yLen)
370+
return Math.sqrt(xLen + yLen) * 1000
371371
}
372372
}
373373
}
@@ -395,7 +395,7 @@ function getFeatureScoord3dArea (feature, pyramid) {
395395
const scoord3dCoordinates = geometry
396396
.getCoordinates()[0]
397397
.map((c) => geometryCoordinates2scoord3dCoordinates(c, pyramid))
398-
return areaOfPolygon(scoord3dCoordinates)
398+
return areaOfPolygon(scoord3dCoordinates) * 1000
399399
}
400400
}
401401
}

0 commit comments

Comments
 (0)