MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / signedArea

Method signedArea

src/common/mapping/WebMapV2.js:3222–3230  ·  view source on GitHub ↗
(ring)

Source from the content-addressed store, hash-verified

3220 }
3221
3222 signedArea(ring) {
3223 let sum = 0;
3224 for (let i = 0, len = ring.length, j = len - 1, p1, p2; i < len; j = i++) {
3225 p1 = ring[i];
3226 p2 = ring[j];
3227 sum += (p2[0] - p1[0]) * (p1[1] + p2[1]);
3228 }
3229 return sum;
3230 }
3231
3232 _getTdtLabelLayerName(layerId) {
3233 return `${layerId}-tdt-label`;

Callers 1

_handleMultyPolygonMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected