ol 9.2.5-dev.1717260235384 → 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.
@@ -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,CAcjB;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"}
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
- let x1 = flatCoordinates[end - stride];
15
- let y1 = flatCoordinates[end - stride + 1];
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 x2 = flatCoordinates[offset];
18
- const y2 = flatCoordinates[offset + 1];
19
- twiceArea += y1 * x2 - x1 * y2;
20
- x1 = x2;
21
- y1 = y2;
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ol",
3
- "version": "9.2.5-dev.1717260235384",
3
+ "version": "9.2.5-dev.1717835261533",
4
4
  "description": "OpenLayers mapping library",
5
5
  "keywords": [
6
6
  "map",
package/util.js CHANGED
@@ -33,4 +33,4 @@ export function getUid(obj) {
33
33
  * OpenLayers version.
34
34
  * @type {string}
35
35
  */
36
- export const VERSION = '9.2.5-dev.1717260235384';
36
+ export const VERSION = '9.2.5-dev.1717835261533';