ol 9.2.5-dev.1717505118579 → 9.2.5-dev.1717835261533
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ol.js +2 -2
- package/dist/ol.js.map +1 -1
- package/geom/flat/area.d.ts.map +1 -1
- package/geom/flat/area.js +9 -7
- package/package.json +1 -1
- package/util.js +1 -1
package/geom/flat/area.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"area.d.ts","sourceRoot":"","sources":["area.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;GAMG;AACH,4CANW,MAAM,MAAM,CAAC,UACb,MAAM,OACN,MAAM,UACN,MAAM,GACL,MAAM,
|
|
1
|
+
{"version":3,"file":"area.d.ts","sourceRoot":"","sources":["area.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;GAMG;AACH,4CANW,MAAM,MAAM,CAAC,UACb,MAAM,OACN,MAAM,UACN,MAAM,GACL,MAAM,CAgBjB;AAED;;;;;;GAMG;AACH,6CANW,MAAM,MAAM,CAAC,UACb,MAAM,QACN,MAAM,MAAM,CAAC,UACb,MAAM,GACL,MAAM,CAUjB;AAED;;;;;;GAMG;AACH,8CANW,MAAM,MAAM,CAAC,UACb,MAAM,SACN,MAAM,MAAM,MAAM,CAAC,CAAC,UACpB,MAAM,GACL,MAAM,CAUjB"}
|
package/geom/flat/area.js
CHANGED
|
@@ -11,14 +11,16 @@
|
|
|
11
11
|
*/
|
|
12
12
|
export function linearRing(flatCoordinates, offset, end, stride) {
|
|
13
13
|
let twiceArea = 0;
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
const x0 = flatCoordinates[end - stride];
|
|
15
|
+
const y0 = flatCoordinates[end - stride + 1];
|
|
16
|
+
let dx1 = 0;
|
|
17
|
+
let dy1 = 0;
|
|
16
18
|
for (; offset < end; offset += stride) {
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
twiceArea +=
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
const dx2 = flatCoordinates[offset] - x0;
|
|
20
|
+
const dy2 = flatCoordinates[offset + 1] - y0;
|
|
21
|
+
twiceArea += dy1 * dx2 - dx1 * dy2;
|
|
22
|
+
dx1 = dx2;
|
|
23
|
+
dy1 = dy2;
|
|
22
24
|
}
|
|
23
25
|
return twiceArea / 2;
|
|
24
26
|
}
|
package/package.json
CHANGED
package/util.js
CHANGED