ol 7.1.1-dev.1668433646502 → 7.1.1-dev.1668701704879
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/README.md +1 -1
- package/array.d.ts +2 -2
- package/array.d.ts.map +1 -1
- package/array.js +4 -4
- package/geom/flat/interiorpoint.js +2 -2
- package/package.json +1 -1
- package/render/canvas/ExecutorGroup.js +3 -3
- package/render/canvas/hitdetect.d.ts.map +1 -1
- package/render/canvas/hitdetect.js +2 -4
- package/renderer/canvas/TileLayer.js +2 -2
- package/renderer/webgl/TileLayer.d.ts.map +1 -1
- package/renderer/webgl/TileLayer.js +2 -4
- package/util.js +1 -1
package/README.md
CHANGED
|
@@ -76,7 +76,7 @@ OpenLayers appreciates contributions of all kinds. We especially want to thank
|
|
|
76
76
|
|
|
77
77
|
> We develop leading Physical Security Information Management (PSIM) software.
|
|
78
78
|
> OpenLayers is the core of our map engine and we love it!
|
|
79
|
-
> https://
|
|
79
|
+
> https://ela.pl/
|
|
80
80
|
|
|
81
81
|
<br>
|
|
82
82
|
|
package/array.d.ts
CHANGED
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
*/
|
|
13
13
|
export function binarySearch(haystack: Array<any>, needle: any, comparator?: Function | undefined): number;
|
|
14
14
|
/**
|
|
15
|
-
* Compare function
|
|
15
|
+
* Compare function sorting arrays in ascending order. Safe to use for numeric values.
|
|
16
16
|
* @param {*} a The first object to be compared.
|
|
17
17
|
* @param {*} b The second object to be compared.
|
|
18
18
|
* @return {number} A negative number, zero, or a positive number as the first
|
|
19
19
|
* argument is less than, equal to, or greater than the second.
|
|
20
20
|
*/
|
|
21
|
-
export function
|
|
21
|
+
export function ascending(a: any, b: any): number;
|
|
22
22
|
/**
|
|
23
23
|
* {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution} can use a function
|
|
24
24
|
* of this type to determine which nearest resolution to use.
|
package/array.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["array.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;GAQG;AACH,uCALW,UAAQ,mDAGP,MAAM,CA2BjB;AAED;;;;;;GAMG;AACH,
|
|
1
|
+
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["array.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;GAQG;AACH,uCALW,UAAQ,mDAGP,MAAM,CA2BjB;AAED;;;;;;GAMG;AACH,2CAHY,MAAM,CAKjB;AAED;;;;;;;;;;;;GAYG;AAEH;;;;;;;;GAQG;AACH,uCARW,MAAM,MAAM,CAAC,UACb,MAAM,aACN,MAAM,GAAC,wBAAwB,GAI9B,MAAM,CAwCjB;AAED;;;;GAIG;AACH,qCAJW,UAAQ,SACR,MAAM,OACN,MAAM,QAUhB;AAED;;;;GAIG;AACH,yEAMC;AAED;;;;;GAKG;AACH,yDAFY,OAAO,CASlB;AAED;;;;GAIG;AACH,6BAJW,QAAM,iBAAiB,QACvB,QAAM,iBAAiB,GACtB,OAAO,CAalB;AAED;;;;;;GAMG;AACH,gCAJW,UAAQ,wCACS,MAAM,QAgBjC;AAED;;;;;GAKG;AACH,8BALW,UAAQ,8DAGP,OAAO,CAWlB;;;;;;;;;;;;8CAvJqB,MAAM,QAAE,MAAM,QAAE,MAAM,KAAG,MAAM"}
|
package/array.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
export function binarySearch(haystack, needle, comparator) {
|
|
15
15
|
let mid, cmp;
|
|
16
|
-
comparator = comparator ||
|
|
16
|
+
comparator = comparator || ascending;
|
|
17
17
|
let low = 0;
|
|
18
18
|
let high = haystack.length;
|
|
19
19
|
let found = false;
|
|
@@ -39,13 +39,13 @@ export function binarySearch(haystack, needle, comparator) {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
|
-
* Compare function
|
|
42
|
+
* Compare function sorting arrays in ascending order. Safe to use for numeric values.
|
|
43
43
|
* @param {*} a The first object to be compared.
|
|
44
44
|
* @param {*} b The second object to be compared.
|
|
45
45
|
* @return {number} A negative number, zero, or a positive number as the first
|
|
46
46
|
* argument is less than, equal to, or greater than the second.
|
|
47
47
|
*/
|
|
48
|
-
export function
|
|
48
|
+
export function ascending(a, b) {
|
|
49
49
|
return a > b ? 1 : a < b ? -1 : 0;
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -202,7 +202,7 @@ export function stableSort(arr, compareFnc) {
|
|
|
202
202
|
* @return {boolean} Return index.
|
|
203
203
|
*/
|
|
204
204
|
export function isSorted(arr, func, strict) {
|
|
205
|
-
const compare = func ||
|
|
205
|
+
const compare = func || ascending;
|
|
206
206
|
return arr.every(function (currentVal, index) {
|
|
207
207
|
if (index === 0) {
|
|
208
208
|
return true;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module ol/geom/flat/interiorpoint
|
|
3
3
|
*/
|
|
4
|
+
import {ascending} from '../../array.js';
|
|
4
5
|
import {linearRingsContainsXY} from './contains.js';
|
|
5
|
-
import {numberSafeCompareFunction} from '../../array.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Calculates a point that is likely to lie in the interior of the linear rings.
|
|
@@ -50,7 +50,7 @@ export function getInteriorPointOfArray(
|
|
|
50
50
|
// inside the linear ring.
|
|
51
51
|
let pointX = NaN;
|
|
52
52
|
let maxSegmentLength = -Infinity;
|
|
53
|
-
intersections.sort(
|
|
53
|
+
intersections.sort(ascending);
|
|
54
54
|
x1 = intersections[0];
|
|
55
55
|
for (i = 1, ii = intersections.length; i < ii; ++i) {
|
|
56
56
|
x2 = intersections[i];
|
package/package.json
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import Executor from './Executor.js';
|
|
6
|
+
import {ascending} from '../../array.js';
|
|
6
7
|
import {buffer, createEmpty, extendCoordinate} from '../../extent.js';
|
|
7
8
|
import {
|
|
8
9
|
compose as composeTransform,
|
|
@@ -10,7 +11,6 @@ import {
|
|
|
10
11
|
} from '../../transform.js';
|
|
11
12
|
import {createCanvasContext2D} from '../../dom.js';
|
|
12
13
|
import {isEmpty} from '../../obj.js';
|
|
13
|
-
import {numberSafeCompareFunction} from '../../array.js';
|
|
14
14
|
import {transform2D} from '../../geom/flat/transform.js';
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -252,7 +252,7 @@ class ExecutorGroup {
|
|
|
252
252
|
|
|
253
253
|
/** @type {Array<number>} */
|
|
254
254
|
const zs = Object.keys(this.executorsByZIndex_).map(Number);
|
|
255
|
-
zs.sort(
|
|
255
|
+
zs.sort(ascending);
|
|
256
256
|
|
|
257
257
|
let i, j, executors, executor, result;
|
|
258
258
|
for (i = zs.length - 1; i >= 0; --i) {
|
|
@@ -324,7 +324,7 @@ class ExecutorGroup {
|
|
|
324
324
|
) {
|
|
325
325
|
/** @type {Array<number>} */
|
|
326
326
|
const zs = Object.keys(this.executorsByZIndex_).map(Number);
|
|
327
|
-
zs.sort(
|
|
327
|
+
zs.sort(ascending);
|
|
328
328
|
|
|
329
329
|
// setup clipping so that the parts of over-simplified geometries are not
|
|
330
330
|
// visible outside the current extent when panning
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hitdetect.d.ts","sourceRoot":"","sources":["hitdetect.js"],"names":[],"mappings":"AAaA;;;;;;;;;;;;;GAaG;AACH,kDAbW,OAAO,eAAe,EAAE,IAAI,cAC5B,MAAM,OAAO,oBAAoB,EAAE,SAAS,CAAC,YAG7C,MAAM,OAAO,kBAAkB,EAAE,WAAW,CAAC,iBAE7C,OAAO,sBAAsB,EAAE,aAAa,GAAC,SAAS,UAEtD,OAAO,iBAAiB,EAAE,MAAM,cAChC,MAAM,YACN,MAAM,GACL,SAAS,
|
|
1
|
+
{"version":3,"file":"hitdetect.d.ts","sourceRoot":"","sources":["hitdetect.js"],"names":[],"mappings":"AAaA;;;;;;;;;;;;;GAaG;AACH,kDAbW,OAAO,eAAe,EAAE,IAAI,cAC5B,MAAM,OAAO,oBAAoB,EAAE,SAAS,CAAC,YAG7C,MAAM,OAAO,kBAAkB,EAAE,WAAW,CAAC,iBAE7C,OAAO,sBAAsB,EAAE,aAAa,GAAC,SAAS,UAEtD,OAAO,iBAAiB,EAAE,MAAM,cAChC,MAAM,YACN,MAAM,GACL,SAAS,CAuIpB;AAED;;;;;;;;;GASG;AACH,mFATW,OAAO,aAAa,EAAE,KAAK,4BAI3B,SAAS,OA4BnB;AAxLD,wCAAyC"}
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
import CanvasImmediateRenderer from './Immediate.js';
|
|
6
6
|
import {Icon} from '../../style.js';
|
|
7
|
+
import {ascending} from '../../array.js';
|
|
7
8
|
import {clamp} from '../../math.js';
|
|
8
9
|
import {createCanvasContext2D} from '../../dom.js';
|
|
9
10
|
import {intersects} from '../../extent.js';
|
|
10
|
-
import {numberSafeCompareFunction} from '../../array.js';
|
|
11
11
|
|
|
12
12
|
export const HIT_DETECT_RESOLUTION = 0.5;
|
|
13
13
|
|
|
@@ -143,9 +143,7 @@ export function createHitDetectionImageData(
|
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
const zIndexKeys = Object.keys(featuresByZIndex)
|
|
147
|
-
.map(Number)
|
|
148
|
-
.sort(numberSafeCompareFunction);
|
|
146
|
+
const zIndexKeys = Object.keys(featuresByZIndex).map(Number).sort(ascending);
|
|
149
147
|
for (let i = 0, ii = zIndexKeys.length; i < ii; ++i) {
|
|
150
148
|
const byGeometryType = featuresByZIndex[zIndexKeys[i]];
|
|
151
149
|
for (const type in byGeometryType) {
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
makeInverse,
|
|
13
13
|
toString as toTransformString,
|
|
14
14
|
} from '../../transform.js';
|
|
15
|
+
import {ascending} from '../../array.js';
|
|
15
16
|
import {
|
|
16
17
|
containsCoordinate,
|
|
17
18
|
createEmpty,
|
|
@@ -25,7 +26,6 @@ import {
|
|
|
25
26
|
} from '../../extent.js';
|
|
26
27
|
import {fromUserExtent} from '../../proj.js';
|
|
27
28
|
import {getUid} from '../../util.js';
|
|
28
|
-
import {numberSafeCompareFunction} from '../../array.js';
|
|
29
29
|
import {toSize} from '../../size.js';
|
|
30
30
|
|
|
31
31
|
/**
|
|
@@ -420,7 +420,7 @@ class CanvasTileLayerRenderer extends CanvasLayerRenderer {
|
|
|
420
420
|
this.renderedTiles.length = 0;
|
|
421
421
|
/** @type {Array<number>} */
|
|
422
422
|
let zs = Object.keys(tilesToDrawByZ).map(Number);
|
|
423
|
-
zs.sort(
|
|
423
|
+
zs.sort(ascending);
|
|
424
424
|
|
|
425
425
|
let clips, clipZs, currentClip;
|
|
426
426
|
if (
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TileLayer.d.ts","sourceRoot":"","sources":["TileLayer.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;kBAmIc,MAAM;;;;oBACN,MAAM;;;;;;;;;;;;;;;;;wBAQP,OAAO,0BAA0B,EAAE,OAAO;AAXvD;;;;;;;;GAQG;AAEH;;GAEG;AAEH;;;;;GAKG;AACH;IACE;;;OAGG;IACH,uBAHW,SAAS,WACT,OAAO,EAyGjB;IAlGC;;;OAGG;IACH,gBAFU,OAAO,CAEU;IAE3B;;;;OAIG;IACH,uBAAuC;IAEvC;;;OAGG;IACH,kBAA6B;IAE7B;;;OAGG;IACH,uBAA+C;IAE/C;;;OAGG;IACH,uBAA8C;IAE9C;;;OAGG;IACH,kBAAuB;IAEvB;;;OAGG;IACH,iBAAa;IAEb;;OAEG;IACH,sBAAyC;IAEzC;;OAEG;IACH,wBAA6C;IAE7C;;;;;;;;;;;;;;;;OAgBG;IACH,iBAAuE;IAKvE;;;OAGG;IACH,0BAAgD;IAEhD;;;OAGG;IACH,yBAAqD;IAErD;;;OAGG;IACH,oBAAuB;IAE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ACjC,MAAM,QAwGhB;IAED;;;;OAIG;IACH,wBAHW,OAAO,cAAc,EAAE,UAAU,GAChC,WAAW,CAmStB;IAED;;;OAGG;IACH,eAHW,OAAO,gBAAgB,EAAE,KAAK,GAC7B,iBAAiB,GAAC,UAAU,GAAC,YAAY,GAAC,QAAQ,CA4F7D;IAED;;;;;;;;;;OAUG;IACH,sBA+BC;IAED,mBAIC;CA6BF"}
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
scale as scaleTransform,
|
|
20
20
|
translate as translateTransform,
|
|
21
21
|
} from '../../transform.js';
|
|
22
|
+
import {ascending} from '../../array.js';
|
|
22
23
|
import {
|
|
23
24
|
boundingExtent,
|
|
24
25
|
containsCoordinate,
|
|
@@ -35,7 +36,6 @@ import {
|
|
|
35
36
|
} from '../../tilecoord.js';
|
|
36
37
|
import {fromUserExtent} from '../../proj.js';
|
|
37
38
|
import {getUid} from '../../util.js';
|
|
38
|
-
import {numberSafeCompareFunction} from '../../array.js';
|
|
39
39
|
import {toSize} from '../../size.js';
|
|
40
40
|
|
|
41
41
|
export const Uniforms = {
|
|
@@ -562,9 +562,7 @@ class WebGLTileLayerRenderer extends WebGLLayerRenderer {
|
|
|
562
562
|
this.helper.useProgram(this.program_, frameState);
|
|
563
563
|
this.helper.prepareDraw(frameState, !blend);
|
|
564
564
|
|
|
565
|
-
const zs = Object.keys(tileTexturesByZ)
|
|
566
|
-
.map(Number)
|
|
567
|
-
.sort(numberSafeCompareFunction);
|
|
565
|
+
const zs = Object.keys(tileTexturesByZ).map(Number).sort(ascending);
|
|
568
566
|
|
|
569
567
|
const centerX = viewState.center[0];
|
|
570
568
|
const centerY = viewState.center[1];
|
package/util.js
CHANGED