ol 7.0.0-dev.1659205470107 → 7.0.0-dev.1659209967753
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/Collection.d.ts +16 -14
- package/Collection.d.ts.map +1 -1
- package/Collection.js +41 -27
- package/PluggableMap.d.ts.map +1 -1
- package/PluggableMap.js +19 -16
- package/control.d.ts.map +1 -1
- package/control.js +1 -0
- package/interaction/Modify.d.ts +2 -2
- package/interaction/Modify.d.ts.map +1 -1
- package/interaction/Modify.js +5 -5
- package/interaction/Select.d.ts +9 -9
- package/interaction/Select.d.ts.map +1 -1
- package/interaction/Select.js +11 -12
- package/interaction/Snap.d.ts +2 -2
- package/interaction/Snap.d.ts.map +1 -1
- package/interaction/Snap.js +10 -7
- package/interaction.d.ts.map +1 -1
- package/interaction.js +1 -0
- package/layer/Group.d.ts +6 -6
- package/layer/Group.d.ts.map +1 -1
- package/layer/Group.js +8 -12
- package/package.json +1 -1
- package/source/Vector.d.ts +6 -5
- package/source/Vector.d.ts.map +1 -1
- package/source/Vector.js +13 -23
package/Collection.d.ts
CHANGED
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
* @classdesc
|
|
3
3
|
* Events emitted by {@link module:ol/Collection~Collection} instances are instances of this
|
|
4
4
|
* type.
|
|
5
|
+
* @template T
|
|
5
6
|
*/
|
|
6
|
-
export class CollectionEvent extends Event {
|
|
7
|
+
export class CollectionEvent<T> extends Event {
|
|
7
8
|
/**
|
|
8
9
|
* @param {import("./CollectionEventType.js").default} type Type.
|
|
9
|
-
* @param {
|
|
10
|
-
* @param {number}
|
|
10
|
+
* @param {T} element Element.
|
|
11
|
+
* @param {number} index The index of the added or removed element.
|
|
11
12
|
*/
|
|
12
|
-
constructor(type: any,
|
|
13
|
+
constructor(type: any, element: T, index: number);
|
|
13
14
|
/**
|
|
14
15
|
* The element that is added to or removed from the collection.
|
|
15
|
-
* @type {
|
|
16
|
+
* @type {T}
|
|
16
17
|
* @api
|
|
17
18
|
*/
|
|
18
|
-
element:
|
|
19
|
+
element: T;
|
|
19
20
|
/**
|
|
20
21
|
* The index of the added or removed element.
|
|
21
22
|
* @type {number}
|
|
@@ -27,7 +28,7 @@ export default Collection;
|
|
|
27
28
|
/**
|
|
28
29
|
* *
|
|
29
30
|
*/
|
|
30
|
-
export type CollectionOnSignature<Return> = import("./Observable").OnSignature<import("./Observable").EventTypes, import("./events/Event.js").default, Return> & import("./Observable").OnSignature<import("./ObjectEventType").Types | 'change:length', import("./Object").ObjectEvent, Return> & import("./Observable").OnSignature<'add' | 'remove', CollectionEvent
|
|
31
|
+
export type CollectionOnSignature<T, Return> = import("./Observable").OnSignature<import("./Observable").EventTypes, import("./events/Event.js").default, Return> & import("./Observable").OnSignature<import("./ObjectEventType").Types | 'change:length', import("./Object").ObjectEvent, Return> & import("./Observable").OnSignature<'add' | 'remove', CollectionEvent<T>, Return> & import("./Observable").CombinedOnSignature<import("./Observable").EventTypes | import("./ObjectEventType").Types | 'change:length' | 'add' | 'remove', Return>;
|
|
31
32
|
export type Options = {
|
|
32
33
|
/**
|
|
33
34
|
* Disallow the same item from being added to
|
|
@@ -37,10 +38,11 @@ export type Options = {
|
|
|
37
38
|
};
|
|
38
39
|
import Event from "./events/Event.js";
|
|
39
40
|
/***
|
|
41
|
+
* @template T
|
|
40
42
|
* @template Return
|
|
41
43
|
* @typedef {import("./Observable").OnSignature<import("./Observable").EventTypes, import("./events/Event.js").default, Return> &
|
|
42
44
|
* import("./Observable").OnSignature<import("./ObjectEventType").Types|'change:length', import("./Object").ObjectEvent, Return> &
|
|
43
|
-
* import("./Observable").OnSignature<'add'|'remove', CollectionEvent
|
|
45
|
+
* import("./Observable").OnSignature<'add'|'remove', CollectionEvent<T>, Return> &
|
|
44
46
|
* import("./Observable").CombinedOnSignature<import("./Observable").EventTypes|import("./ObjectEventType").Types|
|
|
45
47
|
* 'change:length'|'add'|'remove',Return>} CollectionOnSignature
|
|
46
48
|
*/
|
|
@@ -69,17 +71,17 @@ declare class Collection<T> extends BaseObject {
|
|
|
69
71
|
*/
|
|
70
72
|
constructor(opt_array?: T[] | undefined, opt_options?: Options | undefined);
|
|
71
73
|
/***
|
|
72
|
-
* @type {CollectionOnSignature<import("./events").EventsKey>}
|
|
74
|
+
* @type {CollectionOnSignature<T, import("./events").EventsKey>}
|
|
73
75
|
*/
|
|
74
|
-
on: CollectionOnSignature<import("./events").EventsKey>;
|
|
76
|
+
on: CollectionOnSignature<T, import("./events").EventsKey>;
|
|
75
77
|
/***
|
|
76
|
-
* @type {CollectionOnSignature<import("./events").EventsKey>}
|
|
78
|
+
* @type {CollectionOnSignature<T, import("./events").EventsKey>}
|
|
77
79
|
*/
|
|
78
|
-
once: CollectionOnSignature<import("./events").EventsKey>;
|
|
80
|
+
once: CollectionOnSignature<T, import("./events").EventsKey>;
|
|
79
81
|
/***
|
|
80
|
-
* @type {CollectionOnSignature<void>}
|
|
82
|
+
* @type {CollectionOnSignature<T, void>}
|
|
81
83
|
*/
|
|
82
|
-
un: CollectionOnSignature<void>;
|
|
84
|
+
un: CollectionOnSignature<T, void>;
|
|
83
85
|
/**
|
|
84
86
|
* @private
|
|
85
87
|
* @type {boolean}
|
package/Collection.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Collection.d.ts","sourceRoot":"","sources":["Collection.js"],"names":[],"mappings":"AAgBA
|
|
1
|
+
{"version":3,"file":"Collection.d.ts","sourceRoot":"","sources":["Collection.js"],"names":[],"mappings":"AAgBA;;;;;GAKG;AACH;IACE;;;;OAIG;IACH,gCAHW,CAAC,SACD,MAAM,EAkBhB;IAbC;;;;OAIG;IACH,SAHU,CAAC,CAGW;IAEtB;;;;OAIG;IACH,OAHU,MAAM,CAGE;CAErB;;;;;+CAKY,OAAO,cAAc,EAAE,WAAW,CAAC,OAAO,cAAc,EAAE,UAAU,EAAE,OAAO,mBAAmB,EAAE,OAAO,EAAE,MAAM,CAAC,GAC9H,OAAW,cAAc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AKG;IACH,aAJW,CAAC,GACA,CAAC,GAAC,SAAS,CAWtB;IAED;;;;;;OAMG;IACH,gBAJW,MAAM,GACL,CAAC,GAAC,SAAS,CAgBtB;IAED;;;;;OAKG;IACH,aAJW,MAAM,QACN,CAAC,QA2BX;IAED;;OAEG;IACH,sBAEC;IAED;;;;OAIG;IACH,sBAMC;CACF"}
|
package/Collection.js
CHANGED
|
@@ -18,37 +18,39 @@ const Property = {
|
|
|
18
18
|
* @classdesc
|
|
19
19
|
* Events emitted by {@link module:ol/Collection~Collection} instances are instances of this
|
|
20
20
|
* type.
|
|
21
|
+
* @template T
|
|
21
22
|
*/
|
|
22
23
|
export class CollectionEvent extends Event {
|
|
23
24
|
/**
|
|
24
25
|
* @param {import("./CollectionEventType.js").default} type Type.
|
|
25
|
-
* @param {
|
|
26
|
-
* @param {number}
|
|
26
|
+
* @param {T} element Element.
|
|
27
|
+
* @param {number} index The index of the added or removed element.
|
|
27
28
|
*/
|
|
28
|
-
constructor(type,
|
|
29
|
+
constructor(type, element, index) {
|
|
29
30
|
super(type);
|
|
30
31
|
|
|
31
32
|
/**
|
|
32
33
|
* The element that is added to or removed from the collection.
|
|
33
|
-
* @type {
|
|
34
|
+
* @type {T}
|
|
34
35
|
* @api
|
|
35
36
|
*/
|
|
36
|
-
this.element =
|
|
37
|
+
this.element = element;
|
|
37
38
|
|
|
38
39
|
/**
|
|
39
40
|
* The index of the added or removed element.
|
|
40
41
|
* @type {number}
|
|
41
42
|
* @api
|
|
42
43
|
*/
|
|
43
|
-
this.index =
|
|
44
|
+
this.index = index;
|
|
44
45
|
}
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
/***
|
|
49
|
+
* @template T
|
|
48
50
|
* @template Return
|
|
49
51
|
* @typedef {import("./Observable").OnSignature<import("./Observable").EventTypes, import("./events/Event.js").default, Return> &
|
|
50
52
|
* import("./Observable").OnSignature<import("./ObjectEventType").Types|'change:length', import("./Object").ObjectEvent, Return> &
|
|
51
|
-
* import("./Observable").OnSignature<'add'|'remove', CollectionEvent
|
|
53
|
+
* import("./Observable").OnSignature<'add'|'remove', CollectionEvent<T>, Return> &
|
|
52
54
|
* import("./Observable").CombinedOnSignature<import("./Observable").EventTypes|import("./ObjectEventType").Types|
|
|
53
55
|
* 'change:length'|'add'|'remove',Return>} CollectionOnSignature
|
|
54
56
|
*/
|
|
@@ -81,17 +83,17 @@ class Collection extends BaseObject {
|
|
|
81
83
|
super();
|
|
82
84
|
|
|
83
85
|
/***
|
|
84
|
-
* @type {CollectionOnSignature<import("./events").EventsKey>}
|
|
86
|
+
* @type {CollectionOnSignature<T, import("./events").EventsKey>}
|
|
85
87
|
*/
|
|
86
88
|
this.on;
|
|
87
89
|
|
|
88
90
|
/***
|
|
89
|
-
* @type {CollectionOnSignature<import("./events").EventsKey>}
|
|
91
|
+
* @type {CollectionOnSignature<T, import("./events").EventsKey>}
|
|
90
92
|
*/
|
|
91
93
|
this.once;
|
|
92
94
|
|
|
93
95
|
/***
|
|
94
|
-
* @type {CollectionOnSignature<void>}
|
|
96
|
+
* @type {CollectionOnSignature<T, void>}
|
|
95
97
|
*/
|
|
96
98
|
this.un;
|
|
97
99
|
|
|
@@ -195,6 +197,9 @@ class Collection extends BaseObject {
|
|
|
195
197
|
* @api
|
|
196
198
|
*/
|
|
197
199
|
insertAt(index, elem) {
|
|
200
|
+
if (index < 0 || index > this.getLength()) {
|
|
201
|
+
throw new Error('Index out of bounds: ' + index);
|
|
202
|
+
}
|
|
198
203
|
if (this.unique_) {
|
|
199
204
|
this.assertUnique_(elem);
|
|
200
205
|
}
|
|
@@ -254,11 +259,16 @@ class Collection extends BaseObject {
|
|
|
254
259
|
* @api
|
|
255
260
|
*/
|
|
256
261
|
removeAt(index) {
|
|
262
|
+
if (index < 0 || index >= this.getLength()) {
|
|
263
|
+
return undefined;
|
|
264
|
+
}
|
|
257
265
|
const prev = this.array_[index];
|
|
258
266
|
this.array_.splice(index, 1);
|
|
259
267
|
this.updateLength_();
|
|
260
268
|
this.dispatchEvent(
|
|
261
|
-
|
|
269
|
+
/** @type {CollectionEvent<T>} */ (
|
|
270
|
+
new CollectionEvent(CollectionEventType.REMOVE, prev, index)
|
|
271
|
+
)
|
|
262
272
|
);
|
|
263
273
|
return prev;
|
|
264
274
|
}
|
|
@@ -271,24 +281,28 @@ class Collection extends BaseObject {
|
|
|
271
281
|
*/
|
|
272
282
|
setAt(index, elem) {
|
|
273
283
|
const n = this.getLength();
|
|
274
|
-
if (index
|
|
275
|
-
if (this.unique_) {
|
|
276
|
-
this.assertUnique_(elem, index);
|
|
277
|
-
}
|
|
278
|
-
const prev = this.array_[index];
|
|
279
|
-
this.array_[index] = elem;
|
|
280
|
-
this.dispatchEvent(
|
|
281
|
-
new CollectionEvent(CollectionEventType.REMOVE, prev, index)
|
|
282
|
-
);
|
|
283
|
-
this.dispatchEvent(
|
|
284
|
-
new CollectionEvent(CollectionEventType.ADD, elem, index)
|
|
285
|
-
);
|
|
286
|
-
} else {
|
|
287
|
-
for (let j = n; j < index; ++j) {
|
|
288
|
-
this.insertAt(j, undefined);
|
|
289
|
-
}
|
|
284
|
+
if (index >= n) {
|
|
290
285
|
this.insertAt(index, elem);
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
if (index < 0) {
|
|
289
|
+
throw new Error('Index out of bounds: ' + index);
|
|
291
290
|
}
|
|
291
|
+
if (this.unique_) {
|
|
292
|
+
this.assertUnique_(elem, index);
|
|
293
|
+
}
|
|
294
|
+
const prev = this.array_[index];
|
|
295
|
+
this.array_[index] = elem;
|
|
296
|
+
this.dispatchEvent(
|
|
297
|
+
/** @type {CollectionEvent<T>} */ (
|
|
298
|
+
new CollectionEvent(CollectionEventType.REMOVE, prev, index)
|
|
299
|
+
)
|
|
300
|
+
);
|
|
301
|
+
this.dispatchEvent(
|
|
302
|
+
/** @type {CollectionEvent<T>} */ (
|
|
303
|
+
new CollectionEvent(CollectionEventType.ADD, elem, index)
|
|
304
|
+
)
|
|
305
|
+
);
|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AU,kBACpC,MAAM,GACL,MAAM,CAUjB;IAED;;;OAGG;IACH,iCAHW,OAAO,uCAOjB;IAED;;OAEG;IACH,mEAmDC;IAED;;OAEG;IACH,mCAyDC;IAED;;OAEG;IACH,2BAMC;IAED;;OAEG;IACH,6BAwFC;IAED;;OAEG;IACH,0BAEC;IAED;;OAEG;IACH,mCAEC;IAED;;OAEG;IACH,2BA6BC;IAED;;OAEG;IACH,iCAgBC;IAED;;OAEG;IACH,cAFY,OAAO,CAIlB;IAED;;;OAGG;IACH,mBAKC;IAED;;OAEG;IACH,mBAQC;IAED;;;OAGG;IACH,eAIC;IAED;;;;;;OAMG;IACH,uBALW,OAAO,sBAAsB,EAAE,OAAO,GACrC,OAAO,sBAAsB,EAAE,OAAO,GAAC,SAAS,CAM3D;IAED;;;;;;OAMG;IACH,+BALW,OAAO,8BAA8B,EAAE,OAAO,GAC7C,OAAO,8BAA8B,EAAE,OAAO,GAAC,SAAS,CAMnE;IAED;;;;;;OAMG;IACH,mBALW,OAAO,iBAAiB,EAAE,OAAO,GAChC,OAAO,iBAAiB,EAAE,OAAO,GAAC,SAAS,CAOtD;IAED;;;OAGG;IACH,2BAEC;IAED;;;;;;OAMG;IACH,uBALW,OAAO,cAAc,EAAE,OAAO,GAC7B,OAAO,cAAc,EAAE,OAAO,GAAC,SAAS,CAMnD;IAED;;;OAGG;IACH,qBA6GC;IAED;;;;;OAKG;IACH,0BAJW,UAAU,QAUpB;IAED;;;;;OAKG;IACH,cAJW,OAAO,WAAW,EAAE,IAAI,GAAC,SAAS,QAM5C;IAED;;;;;;OAMG;IACH,2DAEC;IAED;;;;;;;;OAQG;IACH,cAPW,IAAI,GAAC,QAAQ,OAAO,WAAW,EAAE,WAAW,CAAC,QAkBvD;IAED;;;;OAIG;IACH,mBAsCC;IAED;;;OAGG;IACH,4BAaC;CACF"}
|
package/PluggableMap.js
CHANGED
|
@@ -439,7 +439,7 @@ class PluggableMap extends BaseObject {
|
|
|
439
439
|
this.controls.addEventListener(
|
|
440
440
|
CollectionEventType.ADD,
|
|
441
441
|
/**
|
|
442
|
-
* @param {import("./Collection.js").CollectionEvent} event CollectionEvent
|
|
442
|
+
* @param {import("./Collection.js").CollectionEvent<import("./control/Control.js").default>} event CollectionEvent
|
|
443
443
|
*/
|
|
444
444
|
function (event) {
|
|
445
445
|
event.element.setMap(this);
|
|
@@ -449,7 +449,7 @@ class PluggableMap extends BaseObject {
|
|
|
449
449
|
this.controls.addEventListener(
|
|
450
450
|
CollectionEventType.REMOVE,
|
|
451
451
|
/**
|
|
452
|
-
* @param {import("./Collection.js").CollectionEvent} event CollectionEvent.
|
|
452
|
+
* @param {import("./Collection.js").CollectionEvent<import("./control/Control.js").default>} event CollectionEvent.
|
|
453
453
|
*/
|
|
454
454
|
function (event) {
|
|
455
455
|
event.element.setMap(null);
|
|
@@ -459,7 +459,7 @@ class PluggableMap extends BaseObject {
|
|
|
459
459
|
this.interactions.addEventListener(
|
|
460
460
|
CollectionEventType.ADD,
|
|
461
461
|
/**
|
|
462
|
-
* @param {import("./Collection.js").CollectionEvent} event CollectionEvent.
|
|
462
|
+
* @param {import("./Collection.js").CollectionEvent<import("./interaction/Interaction.js").default>} event CollectionEvent.
|
|
463
463
|
*/
|
|
464
464
|
function (event) {
|
|
465
465
|
event.element.setMap(this);
|
|
@@ -469,7 +469,7 @@ class PluggableMap extends BaseObject {
|
|
|
469
469
|
this.interactions.addEventListener(
|
|
470
470
|
CollectionEventType.REMOVE,
|
|
471
471
|
/**
|
|
472
|
-
* @param {import("./Collection.js").CollectionEvent} event CollectionEvent.
|
|
472
|
+
* @param {import("./Collection.js").CollectionEvent<import("./interaction/Interaction.js").default>} event CollectionEvent.
|
|
473
473
|
*/
|
|
474
474
|
function (event) {
|
|
475
475
|
event.element.setMap(null);
|
|
@@ -479,25 +479,20 @@ class PluggableMap extends BaseObject {
|
|
|
479
479
|
this.overlays_.addEventListener(
|
|
480
480
|
CollectionEventType.ADD,
|
|
481
481
|
/**
|
|
482
|
-
* @param {import("./Collection.js").CollectionEvent} event CollectionEvent.
|
|
482
|
+
* @param {import("./Collection.js").CollectionEvent<import("./Overlay.js").default>} event CollectionEvent.
|
|
483
483
|
*/
|
|
484
484
|
function (event) {
|
|
485
|
-
this.addOverlayInternal_(
|
|
486
|
-
/** @type {import("./Overlay.js").default} */ (event.element)
|
|
487
|
-
);
|
|
485
|
+
this.addOverlayInternal_(event.element);
|
|
488
486
|
}.bind(this)
|
|
489
487
|
);
|
|
490
488
|
|
|
491
489
|
this.overlays_.addEventListener(
|
|
492
490
|
CollectionEventType.REMOVE,
|
|
493
491
|
/**
|
|
494
|
-
* @param {import("./Collection.js").CollectionEvent} event CollectionEvent.
|
|
492
|
+
* @param {import("./Collection.js").CollectionEvent<import("./Overlay.js").default>} event CollectionEvent.
|
|
495
493
|
*/
|
|
496
494
|
function (event) {
|
|
497
|
-
const
|
|
498
|
-
event.element
|
|
499
|
-
);
|
|
500
|
-
const id = overlay.getId();
|
|
495
|
+
const id = event.element.getId();
|
|
501
496
|
if (id !== undefined) {
|
|
502
497
|
delete this.overlayIdIndex_[id.toString()];
|
|
503
498
|
}
|
|
@@ -1709,7 +1704,12 @@ function createOptionsInternal(options) {
|
|
|
1709
1704
|
options.layers &&
|
|
1710
1705
|
typeof (/** @type {?} */ (options.layers).getLayers) === 'function'
|
|
1711
1706
|
? /** @type {LayerGroup} */ (options.layers)
|
|
1712
|
-
: new LayerGroup({
|
|
1707
|
+
: new LayerGroup({
|
|
1708
|
+
layers:
|
|
1709
|
+
/** @type {Collection<import("./layer/Base.js").default>|Array<import("./layer/Base.js").default>} */ (
|
|
1710
|
+
options.layers
|
|
1711
|
+
),
|
|
1712
|
+
});
|
|
1713
1713
|
values[MapProperty.LAYERGROUP] = layerGroup;
|
|
1714
1714
|
|
|
1715
1715
|
values[MapProperty.TARGET] = options.target;
|
|
@@ -1717,6 +1717,7 @@ function createOptionsInternal(options) {
|
|
|
1717
1717
|
values[MapProperty.VIEW] =
|
|
1718
1718
|
options.view instanceof View ? options.view : new View();
|
|
1719
1719
|
|
|
1720
|
+
/** @type {Collection<import("./control/Control.js").default>} */
|
|
1720
1721
|
let controls;
|
|
1721
1722
|
if (options.controls !== undefined) {
|
|
1722
1723
|
if (Array.isArray(options.controls)) {
|
|
@@ -1726,10 +1727,11 @@ function createOptionsInternal(options) {
|
|
|
1726
1727
|
typeof (/** @type {?} */ (options.controls).getArray) === 'function',
|
|
1727
1728
|
47
|
|
1728
1729
|
); // Expected `controls` to be an array or an `import("./Collection.js").Collection`
|
|
1729
|
-
controls =
|
|
1730
|
+
controls = options.controls;
|
|
1730
1731
|
}
|
|
1731
1732
|
}
|
|
1732
1733
|
|
|
1734
|
+
/** @type {Collection<import("./interaction/Interaction").default>} */
|
|
1733
1735
|
let interactions;
|
|
1734
1736
|
if (options.interactions !== undefined) {
|
|
1735
1737
|
if (Array.isArray(options.interactions)) {
|
|
@@ -1740,10 +1742,11 @@ function createOptionsInternal(options) {
|
|
|
1740
1742
|
'function',
|
|
1741
1743
|
48
|
|
1742
1744
|
); // Expected `interactions` to be an array or an `import("./Collection.js").Collection`
|
|
1743
|
-
interactions =
|
|
1745
|
+
interactions = options.interactions;
|
|
1744
1746
|
}
|
|
1745
1747
|
}
|
|
1746
1748
|
|
|
1749
|
+
/** @type {Collection<import("./Overlay.js").default>} */
|
|
1747
1750
|
let overlays;
|
|
1748
1751
|
if (options.overlays !== undefined) {
|
|
1749
1752
|
if (Array.isArray(options.overlays)) {
|
package/control.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control.d.ts","sourceRoot":"","sources":["control.js"],"names":[],"mappings":"AAmBA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;;;GAaG;AACH,qEAJY,WAAW,OAAO,sBAAsB,EAAE,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"control.d.ts","sourceRoot":"","sources":["control.js"],"names":[],"mappings":"AAmBA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;;;GAaG;AACH,qEAJY,WAAW,OAAO,sBAAsB,EAAE,OAAO,CAAC,CA2B7D"}
|
package/control.js
CHANGED
|
@@ -50,6 +50,7 @@ export {default as ZoomToExtent} from './control/ZoomToExtent.js';
|
|
|
50
50
|
export function defaults(opt_options) {
|
|
51
51
|
const options = opt_options ? opt_options : {};
|
|
52
52
|
|
|
53
|
+
/** @type {Collection<import("./control/Control.js").default>} */
|
|
53
54
|
const controls = new Collection();
|
|
54
55
|
|
|
55
56
|
const zoomControl = options.zoom !== undefined ? options.zoom : true;
|
package/interaction/Modify.d.ts
CHANGED
|
@@ -395,7 +395,7 @@ declare class Modify extends PointerInteraction {
|
|
|
395
395
|
*/
|
|
396
396
|
private handleSourceRemove_;
|
|
397
397
|
/**
|
|
398
|
-
* @param {import("../Collection.js").CollectionEvent} evt Event.
|
|
398
|
+
* @param {import("../Collection.js").CollectionEvent<Feature>} evt Event.
|
|
399
399
|
* @private
|
|
400
400
|
*/
|
|
401
401
|
private handleFeatureAdd_;
|
|
@@ -405,7 +405,7 @@ declare class Modify extends PointerInteraction {
|
|
|
405
405
|
*/
|
|
406
406
|
private handleFeatureChange_;
|
|
407
407
|
/**
|
|
408
|
-
* @param {import("../Collection.js").CollectionEvent} evt Event.
|
|
408
|
+
* @param {import("../Collection.js").CollectionEvent<Feature>} evt Event.
|
|
409
409
|
* @private
|
|
410
410
|
*/
|
|
411
411
|
private handleFeatureRemove_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modify.d.ts","sourceRoot":"","sources":["Modify.js"],"names":[],"mappings":"AAgFA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH;;;;GAIG;AACH;IACE;;;;;;OAMG;IACH,kBANW,eAAe,YACf,WAAW,OAAO,YAAY,EAAE,WAAW,CAAC,iEAqBtD;IAbC;;;;OAIG;IACH,UAHU,WAAW,OAAO,YAAY,EAAE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;;;OAMG;IACH,8BAeC;CACF"}
|
package/interaction/Modify.js
CHANGED
|
@@ -361,6 +361,7 @@ class Modify extends PointerInteraction {
|
|
|
361
361
|
*/
|
|
362
362
|
this.hitDetection_ = null;
|
|
363
363
|
|
|
364
|
+
/** @type {Collection<Feature>} */
|
|
364
365
|
let features;
|
|
365
366
|
if (options.features) {
|
|
366
367
|
features = options.features;
|
|
@@ -574,11 +575,11 @@ class Modify extends PointerInteraction {
|
|
|
574
575
|
}
|
|
575
576
|
|
|
576
577
|
/**
|
|
577
|
-
* @param {import("../Collection.js").CollectionEvent} evt Event.
|
|
578
|
+
* @param {import("../Collection.js").CollectionEvent<Feature>} evt Event.
|
|
578
579
|
* @private
|
|
579
580
|
*/
|
|
580
581
|
handleFeatureAdd_(evt) {
|
|
581
|
-
this.addFeature_(
|
|
582
|
+
this.addFeature_(evt.element);
|
|
582
583
|
}
|
|
583
584
|
|
|
584
585
|
/**
|
|
@@ -594,12 +595,11 @@ class Modify extends PointerInteraction {
|
|
|
594
595
|
}
|
|
595
596
|
|
|
596
597
|
/**
|
|
597
|
-
* @param {import("../Collection.js").CollectionEvent} evt Event.
|
|
598
|
+
* @param {import("../Collection.js").CollectionEvent<Feature>} evt Event.
|
|
598
599
|
* @private
|
|
599
600
|
*/
|
|
600
601
|
handleFeatureRemove_(evt) {
|
|
601
|
-
|
|
602
|
-
this.removeFeature_(feature);
|
|
602
|
+
this.removeFeature_(evt.element);
|
|
603
603
|
}
|
|
604
604
|
|
|
605
605
|
/**
|
package/interaction/Select.d.ts
CHANGED
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
* @property {boolean} [multi=false] A boolean that determines if the default
|
|
47
47
|
* behaviour should select only single features or all (overlapping) features at
|
|
48
48
|
* the clicked map position. The default of `false` means single select.
|
|
49
|
-
* @property {
|
|
49
|
+
* @property {Collection<Feature>} [features]
|
|
50
50
|
* Collection where the interaction will place selected features. Optional. If
|
|
51
51
|
* not set the interaction will create a collection. In any case the collection
|
|
52
52
|
* used by the interaction is returned by
|
|
@@ -276,7 +276,7 @@ declare class Select extends Interaction {
|
|
|
276
276
|
private style_;
|
|
277
277
|
/**
|
|
278
278
|
* @private
|
|
279
|
-
* @type {
|
|
279
|
+
* @type {Collection<Feature>}
|
|
280
280
|
*/
|
|
281
281
|
private features_;
|
|
282
282
|
/**
|
|
@@ -299,10 +299,10 @@ declare class Select extends Interaction {
|
|
|
299
299
|
private addFeatureLayerAssociation_;
|
|
300
300
|
/**
|
|
301
301
|
* Get the selected features.
|
|
302
|
-
* @return {
|
|
302
|
+
* @return {Collection<Feature>} Features collection.
|
|
303
303
|
* @api
|
|
304
304
|
*/
|
|
305
|
-
getFeatures():
|
|
305
|
+
getFeatures(): Collection<Feature>;
|
|
306
306
|
/**
|
|
307
307
|
* Returns the Hit-detection tolerance.
|
|
308
308
|
* @return {number} Hit tolerance in pixels.
|
|
@@ -325,12 +325,12 @@ declare class Select extends Interaction {
|
|
|
325
325
|
*/
|
|
326
326
|
setHitTolerance(hitTolerance: number): void;
|
|
327
327
|
/**
|
|
328
|
-
* @param {import("../Collection.js").CollectionEvent} evt Event.
|
|
328
|
+
* @param {import("../Collection.js").CollectionEvent<Feature>} evt Event.
|
|
329
329
|
* @private
|
|
330
330
|
*/
|
|
331
331
|
private addFeature_;
|
|
332
332
|
/**
|
|
333
|
-
* @param {import("../Collection.js").CollectionEvent} evt Event.
|
|
333
|
+
* @param {import("../Collection.js").CollectionEvent<Feature>} evt Event.
|
|
334
334
|
* @private
|
|
335
335
|
*/
|
|
336
336
|
private removeFeature_;
|
|
@@ -339,17 +339,17 @@ declare class Select extends Interaction {
|
|
|
339
339
|
*/
|
|
340
340
|
getStyle(): import("../style/Style.js").StyleLike | null;
|
|
341
341
|
/**
|
|
342
|
-
* @param {
|
|
342
|
+
* @param {Feature} feature Feature
|
|
343
343
|
* @private
|
|
344
344
|
*/
|
|
345
345
|
private applySelectedStyle_;
|
|
346
346
|
/**
|
|
347
|
-
* @param {
|
|
347
|
+
* @param {Feature} feature Feature
|
|
348
348
|
* @private
|
|
349
349
|
*/
|
|
350
350
|
private restorePreviousStyle_;
|
|
351
351
|
/**
|
|
352
|
-
* @param {
|
|
352
|
+
* @param {Feature} feature Feature.
|
|
353
353
|
* @private
|
|
354
354
|
*/
|
|
355
355
|
private removeFeatureLayerAssociation_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["Select.js"],"names":[],"mappings":"AA4BA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAEH;;;;GAIG;AACH;IACE;;;;;;OAMG;IACH,kBANW,eAAe,YACf,MAAM,OAAO,eAAe,EAAE,OAAO,CAAC,cACtC,MAAM,OAAO,eAAe,EAAE,OAAO,CAAC,iEA2BhD;IApBC;;;;OAIG;IACH,UAHU,MAAM,OAAO,eAAe,EAAE,OAAO,CAAC,CAGxB;IAExB;;;;OAIG;IACH,YAHU,MAAM,OAAO,eAAe,EAAE,OAAO,CAAC,CAGpB;IAE5B;;;;OAIG;IACH,8DAAsC;CAEzC;;;;;;oCAhGqB,OAAO,eAAe,EAAE,OAAO,QAAE,OAAO,mBAAmB,EAAE,OAAO,CAAC,OAAO,kBAAkB,EAAE,OAAO,CAAC,KAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8IAmBrE,OAAO,mBAAmB,EAAE,OAAO,CAAC,OAAO,kBAAkB,EAAE,OAAO,CAAC,KAAG,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAuFtI,OAAO,eAAe,EAAE,WAAW,CAAC,OAAO,eAAe,EAAE,UAAU,EAAE,OAAO,oBAAoB,EAAE,OAAO,EAAE,MAAM,CAAC,GACjI,OAAW,eAAe,EAAE,WAAW,CAAC,OAAO,oBAAoB,EAAE,KAAK,GAC1E,eAAqB,EAAE,OAAO,WA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AFU,kBAAkB,IAAI,CAAC,CAE1B;IAIP;;OAEG;IACH,yBAAmD;IAEnD;;OAEG;IACH,4BAAyD;IAEzD;;;OAGG;IACH,mBAAqE;IAErE;;;OAGG;IACH,sBAAwE;IAExE;;;OAGG;IACH,yBAES;IAET;;;OAGG;IACH,yBAEgB;IAEhB;;;OAGG;IACH,eAAmD;IAEnD;;;OAGG;IACH,gBAAqD;IAErD;;;OAGG;IACH,sBAAoE;IAEpE;;;OAGG;IACH,eACyE;IAEzE;;;OAGG;IACH,kBAAqD;IAiBrD;;;OAGG;IACH,qBAA+B;IAE/B;;;;;OAKG;IACH,iCAAkC;IAGpC;;;;OAIG;IACH,oCAEC;IAED;;;;OAIG;IACH,eAHY,WAAW,OAAO,CAAC,CAK9B;IAED;;;;OAIG;IACH,mBAHY,MAAM,CAKjB;IAED;;;;;;OAMG;IACH,kBAJW,OAAO,eAAe,EAAE,OAAO,oBAQzC;IAED;;;;;OAKG;IACH,8BAHW,MAAM,QAKhB;IAuCD;;;OAGG;IACH,oBAuBC;IAED;;;OAGG;IACH,uBAIC;IAED;;OAEG;IACH,YAFY,OAAO,mBAAmB,EAAE,SAAS,GAAC,IAAI,CAIrD;IAED;;;OAGG;IACH,4BAMC;IAED;;;OAGG;IACH,8BAkBC;IAED;;;OAGG;IACH,uCAEC;CAoHF"}
|
package/interaction/Select.js
CHANGED
|
@@ -75,7 +75,7 @@ const SelectEventType = {
|
|
|
75
75
|
* @property {boolean} [multi=false] A boolean that determines if the default
|
|
76
76
|
* behaviour should select only single features or all (overlapping) features at
|
|
77
77
|
* the clicked map position. The default of `false` means single select.
|
|
78
|
-
* @property {
|
|
78
|
+
* @property {Collection<Feature>} [features]
|
|
79
79
|
* Collection where the interaction will place selected features. Optional. If
|
|
80
80
|
* not set the interaction will create a collection. In any case the collection
|
|
81
81
|
* used by the interaction is returned by
|
|
@@ -245,7 +245,7 @@ class Select extends Interaction {
|
|
|
245
245
|
|
|
246
246
|
/**
|
|
247
247
|
* @private
|
|
248
|
-
* @type {
|
|
248
|
+
* @type {Collection<Feature>}
|
|
249
249
|
*/
|
|
250
250
|
this.features_ = options.features || new Collection();
|
|
251
251
|
|
|
@@ -290,7 +290,7 @@ class Select extends Interaction {
|
|
|
290
290
|
|
|
291
291
|
/**
|
|
292
292
|
* Get the selected features.
|
|
293
|
-
* @return {
|
|
293
|
+
* @return {Collection<Feature>} Features collection.
|
|
294
294
|
* @api
|
|
295
295
|
*/
|
|
296
296
|
getFeatures() {
|
|
@@ -367,7 +367,7 @@ class Select extends Interaction {
|
|
|
367
367
|
}
|
|
368
368
|
|
|
369
369
|
/**
|
|
370
|
-
* @param {import("../Collection.js").CollectionEvent} evt Event.
|
|
370
|
+
* @param {import("../Collection.js").CollectionEvent<Feature>} evt Event.
|
|
371
371
|
* @private
|
|
372
372
|
*/
|
|
373
373
|
addFeature_(evt) {
|
|
@@ -396,13 +396,12 @@ class Select extends Interaction {
|
|
|
396
396
|
}
|
|
397
397
|
|
|
398
398
|
/**
|
|
399
|
-
* @param {import("../Collection.js").CollectionEvent} evt Event.
|
|
399
|
+
* @param {import("../Collection.js").CollectionEvent<Feature>} evt Event.
|
|
400
400
|
* @private
|
|
401
401
|
*/
|
|
402
402
|
removeFeature_(evt) {
|
|
403
|
-
const feature = evt.element;
|
|
404
403
|
if (this.style_) {
|
|
405
|
-
this.restorePreviousStyle_(
|
|
404
|
+
this.restorePreviousStyle_(evt.element);
|
|
406
405
|
}
|
|
407
406
|
}
|
|
408
407
|
|
|
@@ -414,7 +413,7 @@ class Select extends Interaction {
|
|
|
414
413
|
}
|
|
415
414
|
|
|
416
415
|
/**
|
|
417
|
-
* @param {
|
|
416
|
+
* @param {Feature} feature Feature
|
|
418
417
|
* @private
|
|
419
418
|
*/
|
|
420
419
|
applySelectedStyle_(feature) {
|
|
@@ -426,7 +425,7 @@ class Select extends Interaction {
|
|
|
426
425
|
}
|
|
427
426
|
|
|
428
427
|
/**
|
|
429
|
-
* @param {
|
|
428
|
+
* @param {Feature} feature Feature
|
|
430
429
|
* @private
|
|
431
430
|
*/
|
|
432
431
|
restorePreviousStyle_(feature) {
|
|
@@ -450,7 +449,7 @@ class Select extends Interaction {
|
|
|
450
449
|
}
|
|
451
450
|
|
|
452
451
|
/**
|
|
453
|
-
* @param {
|
|
452
|
+
* @param {Feature} feature Feature.
|
|
454
453
|
* @private
|
|
455
454
|
*/
|
|
456
455
|
removeFeatureLayerAssociation_(feature) {
|
|
@@ -476,12 +475,12 @@ class Select extends Interaction {
|
|
|
476
475
|
const features = this.getFeatures();
|
|
477
476
|
|
|
478
477
|
/**
|
|
479
|
-
* @type {Array<
|
|
478
|
+
* @type {Array<Feature>}
|
|
480
479
|
*/
|
|
481
480
|
const deselected = [];
|
|
482
481
|
|
|
483
482
|
/**
|
|
484
|
-
* @type {Array<
|
|
483
|
+
* @type {Array<Feature>}
|
|
485
484
|
*/
|
|
486
485
|
const selected = [];
|
|
487
486
|
|
package/interaction/Snap.d.ts
CHANGED
|
@@ -156,12 +156,12 @@ declare class Snap extends PointerInteraction {
|
|
|
156
156
|
*/
|
|
157
157
|
private getFeatures_;
|
|
158
158
|
/**
|
|
159
|
-
* @param {import("../source/Vector.js").VectorSourceEvent|import("../Collection.js").CollectionEvent} evt Event.
|
|
159
|
+
* @param {import("../source/Vector.js").VectorSourceEvent|import("../Collection.js").CollectionEvent<import("../Feature.js").default>} evt Event.
|
|
160
160
|
* @private
|
|
161
161
|
*/
|
|
162
162
|
private handleFeatureAdd_;
|
|
163
163
|
/**
|
|
164
|
-
* @param {import("../source/Vector.js").VectorSourceEvent|import("../Collection.js").CollectionEvent} evt Event.
|
|
164
|
+
* @param {import("../source/Vector.js").VectorSourceEvent|import("../Collection.js").CollectionEvent<import("../Feature.js").default>} evt Event.
|
|
165
165
|
* @private
|
|
166
166
|
*/
|
|
167
167
|
private handleFeatureRemove_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Snap.d.ts","sourceRoot":"","sources":["Snap.js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AE,OAAO,QAkD9C;IAED;;;;;OAKG;IACH,cALW,OAAO,aAAa,EAAE,KAAK,mBAC3B,OAAO,kBAAkB,EAAE,UAAU,OACrC,OAAO,oBAAoB,EAAE,OAAO,GACnC,MAAM,GAAC,IAAI,CA8GtB;IAED;;;OAGG;IACH,uBAGC;IAED;;;;OAIG;IACH,+BAiBC;IAED;;;;OAIG;IACH,2CAQC;IAED;;;;OAIG;IACH,mCAKC;IAED;;;;OAIG;IACH,wCAQC;IAED;;;;OAIG;IACH,mCAIC;IAED;;;;OAIG;IACH,qCAWC;IAED;;;;OAIG;IACH,8BAEC;IAED;;;;OAIG;IACH,gCAQC;CACF"}
|
package/interaction/Snap.js
CHANGED
|
@@ -45,7 +45,7 @@ import {listen, unlistenByKey} from '../events.js';
|
|
|
45
45
|
*/
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
|
-
* @param {import("../source/Vector.js").VectorSourceEvent|import("../Collection.js").CollectionEvent} evt Event.
|
|
48
|
+
* @param {import("../source/Vector.js").VectorSourceEvent|import("../Collection.js").CollectionEvent<import("../Feature.js").default>} evt Event.
|
|
49
49
|
* @return {import("../Feature.js").default} Feature.
|
|
50
50
|
*/
|
|
51
51
|
function getFeatureFromEvent(evt) {
|
|
@@ -55,11 +55,13 @@ function getFeatureFromEvent(evt) {
|
|
|
55
55
|
return /** @type {import("../source/Vector.js").VectorSourceEvent} */ (evt)
|
|
56
56
|
.feature;
|
|
57
57
|
} else if (
|
|
58
|
-
/** @type {import("../Collection.js").CollectionEvent} */ (
|
|
58
|
+
/** @type {import("../Collection.js").CollectionEvent<import("../Feature.js").default>} */ (
|
|
59
|
+
evt
|
|
60
|
+
).element
|
|
59
61
|
) {
|
|
60
|
-
return /** @type {import("../Feature.js").default} */ (
|
|
61
|
-
|
|
62
|
-
);
|
|
62
|
+
return /** @type {import("../Collection.js").CollectionEvent<import("../Feature.js").default>} */ (
|
|
63
|
+
evt
|
|
64
|
+
).element;
|
|
63
65
|
}
|
|
64
66
|
}
|
|
65
67
|
|
|
@@ -261,6 +263,7 @@ class Snap extends PointerInteraction {
|
|
|
261
263
|
* @private
|
|
262
264
|
*/
|
|
263
265
|
getFeatures_() {
|
|
266
|
+
/** @type {import("../Collection.js").default<import("../Feature.js").default>|Array<import("../Feature.js").default>} */
|
|
264
267
|
let features;
|
|
265
268
|
if (this.features_) {
|
|
266
269
|
features = this.features_;
|
|
@@ -284,7 +287,7 @@ class Snap extends PointerInteraction {
|
|
|
284
287
|
}
|
|
285
288
|
|
|
286
289
|
/**
|
|
287
|
-
* @param {import("../source/Vector.js").VectorSourceEvent|import("../Collection.js").CollectionEvent} evt Event.
|
|
290
|
+
* @param {import("../source/Vector.js").VectorSourceEvent|import("../Collection.js").CollectionEvent<import("../Feature.js").default>} evt Event.
|
|
288
291
|
* @private
|
|
289
292
|
*/
|
|
290
293
|
handleFeatureAdd_(evt) {
|
|
@@ -293,7 +296,7 @@ class Snap extends PointerInteraction {
|
|
|
293
296
|
}
|
|
294
297
|
|
|
295
298
|
/**
|
|
296
|
-
* @param {import("../source/Vector.js").VectorSourceEvent|import("../Collection.js").CollectionEvent} evt Event.
|
|
299
|
+
* @param {import("../source/Vector.js").VectorSourceEvent|import("../Collection.js").CollectionEvent<import("../Feature.js").default>} evt Event.
|
|
297
300
|
* @private
|
|
298
301
|
*/
|
|
299
302
|
handleFeatureRemove_(evt) {
|
package/interaction.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interaction.d.ts","sourceRoot":"","sources":["interaction.js"],"names":[],"mappings":"AAqCA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qEALY,OAAO,iBAAiB,EAAE,OAAO,CAAC,OAAO,8BAA8B,EAAE,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"interaction.d.ts","sourceRoot":"","sources":["interaction.js"],"names":[],"mappings":"AAqCA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qEALY,OAAO,iBAAiB,EAAE,OAAO,CAAC,OAAO,8BAA8B,EAAE,OAAO,CAAC,CA0F5F"}
|
package/interaction.js
CHANGED
|
@@ -85,6 +85,7 @@ export {default as Translate} from './interaction/Translate.js';
|
|
|
85
85
|
export function defaults(opt_options) {
|
|
86
86
|
const options = opt_options ? opt_options : {};
|
|
87
87
|
|
|
88
|
+
/** @type {Collection<import("./interaction/Interaction.js").default>} */
|
|
88
89
|
const interactions = new Collection();
|
|
89
90
|
|
|
90
91
|
const kinetic = new Kinetic(-0.005, 0.05, 100);
|
package/layer/Group.d.ts
CHANGED
|
@@ -137,33 +137,33 @@ declare class LayerGroup extends BaseLayer {
|
|
|
137
137
|
*/
|
|
138
138
|
handleLayerGroupRemove_(event: GroupEvent): void;
|
|
139
139
|
/**
|
|
140
|
-
* @param {import("../Collection.js").CollectionEvent} collectionEvent CollectionEvent.
|
|
140
|
+
* @param {import("../Collection.js").CollectionEvent<import("./Base.js").default>} collectionEvent CollectionEvent.
|
|
141
141
|
* @private
|
|
142
142
|
*/
|
|
143
143
|
private handleLayersAdd_;
|
|
144
144
|
/**
|
|
145
|
-
* @param {import("../Collection.js").CollectionEvent} collectionEvent CollectionEvent.
|
|
145
|
+
* @param {import("../Collection.js").CollectionEvent<import("./Base.js").default>} collectionEvent CollectionEvent.
|
|
146
146
|
* @private
|
|
147
147
|
*/
|
|
148
148
|
private handleLayersRemove_;
|
|
149
149
|
/**
|
|
150
150
|
* Returns the {@link module:ol/Collection~Collection collection} of {@link module:ol/layer/Layer~Layer layers}
|
|
151
151
|
* in this group.
|
|
152
|
-
* @return {!
|
|
152
|
+
* @return {!Collection<import("./Base.js").default>} Collection of
|
|
153
153
|
* {@link module:ol/layer/Base~BaseLayer layers} that are part of this group.
|
|
154
154
|
* @observable
|
|
155
155
|
* @api
|
|
156
156
|
*/
|
|
157
|
-
getLayers():
|
|
157
|
+
getLayers(): Collection<import("./Base.js").default>;
|
|
158
158
|
/**
|
|
159
159
|
* Set the {@link module:ol/Collection~Collection collection} of {@link module:ol/layer/Layer~Layer layers}
|
|
160
160
|
* in this group.
|
|
161
|
-
* @param {!
|
|
161
|
+
* @param {!Collection<import("./Base.js").default>} layers Collection of
|
|
162
162
|
* {@link module:ol/layer/Base~BaseLayer layers} that are part of this group.
|
|
163
163
|
* @observable
|
|
164
164
|
* @api
|
|
165
165
|
*/
|
|
166
|
-
setLayers(layers:
|
|
166
|
+
setLayers(layers: Collection<import("./Base.js").default>): void;
|
|
167
167
|
}
|
|
168
168
|
import Collection from "../Collection.js";
|
|
169
169
|
//# sourceMappingURL=Group.d.ts.map
|
package/layer/Group.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Group.d.ts","sourceRoot":"","sources":["Group.js"],"names":[],"mappings":"AAeA;;GAEG;AAEH;;;;;GAKG;AACH;IACE;;;OAGG;IACH,kBAHW,SAAS,SACT,SAAS,EAWnB;IANC;;;;OAIG;IACH,OAHU,SAAS,CAGD;CAErB;;wBAxBY,UAAU,GAAC,aAAa;;;;uCA4BxB,OAAO,eAAe,EAAE,WAAW,CAAC,OAAO,eAAe,EAAE,UAAU,EAAE,OAAO,oBAAoB,EAAE,OAAO,EAAE,MAAM,CAAC,GACjI,OAAW,eAAe,EAAE,WAAW,CAAC,OAAO,QAAQ,EAAE,yBAAyB,GAClF,eAAqB,EAAE,OAAO,WAAW,EAAE,WAAW,EAAE,MAAM,CAAC,GAC/D,OAAW,eAAe,EAAE,mBAAmB,CAAC,OAAO,eAAe,EAAE,UAAU,GAAC,OAAO,QAAQ,EAAE,yBAAyB,GAAC,eAAe,EAAE,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCvJ;;;;;;;GAOG;AACH;IACE;;OAEG;IACH,+CAiDC;IAxCC;;OAEG;IACH,IAFU,iBAAiB,OAAO,WAA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AC,CAEhD;IAET;;OAEG;IACH,IAFU,iBAAiB,IAAI,CAAC,CAEzB;IAEP;;;OAGG;IACH,4BAA6B;IAE7B;;;OAGG;IACH,sBAAuB;IAiBzB;;OAEG;IACH,2BAEC;IAED;;OAEG;IACH,6BAsBC;IAED;;OAEG;IACH,+BAFW,SAAS,QAqBnB;IAED;;OAEG;IACH,4BAFW,UAAU,QAIpB;IAED;;OAEG;IACH,+BAFW,UAAU,QAIpB;IAED;;;OAGG;IACH,yBAKC;IAED;;;OAGG;IACH,4BAOC;IAED;;;;;;;OAOG;IACH,aALa,WAAW,OAAO,WAAW,EAAE,OAAO,CAAC,CASnD;IAED;;;;;;;OAOG;IACH,kBALY,WAAW,OAAO,WAAW,EAAE,OAAO,CAAC,QAelD;CA0EF"}
|
package/layer/Group.js
CHANGED
|
@@ -66,7 +66,7 @@ export class GroupEvent extends Event {
|
|
|
66
66
|
* visible.
|
|
67
67
|
* @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
|
|
68
68
|
* be visible.
|
|
69
|
-
* @property {Array<import("./Base.js").default>|
|
|
69
|
+
* @property {Array<import("./Base.js").default>|Collection<import("./Base.js").default>} [layers] Child layers.
|
|
70
70
|
* @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
|
|
71
71
|
*/
|
|
72
72
|
|
|
@@ -214,26 +214,22 @@ class LayerGroup extends BaseLayer {
|
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
/**
|
|
217
|
-
* @param {import("../Collection.js").CollectionEvent} collectionEvent CollectionEvent.
|
|
217
|
+
* @param {import("../Collection.js").CollectionEvent<import("./Base.js").default>} collectionEvent CollectionEvent.
|
|
218
218
|
* @private
|
|
219
219
|
*/
|
|
220
220
|
handleLayersAdd_(collectionEvent) {
|
|
221
|
-
const layer =
|
|
222
|
-
collectionEvent.element
|
|
223
|
-
);
|
|
221
|
+
const layer = collectionEvent.element;
|
|
224
222
|
this.registerLayerListeners_(layer);
|
|
225
223
|
this.dispatchEvent(new GroupEvent('addlayer', layer));
|
|
226
224
|
this.changed();
|
|
227
225
|
}
|
|
228
226
|
|
|
229
227
|
/**
|
|
230
|
-
* @param {import("../Collection.js").CollectionEvent} collectionEvent CollectionEvent.
|
|
228
|
+
* @param {import("../Collection.js").CollectionEvent<import("./Base.js").default>} collectionEvent CollectionEvent.
|
|
231
229
|
* @private
|
|
232
230
|
*/
|
|
233
231
|
handleLayersRemove_(collectionEvent) {
|
|
234
|
-
const layer =
|
|
235
|
-
collectionEvent.element
|
|
236
|
-
);
|
|
232
|
+
const layer = collectionEvent.element;
|
|
237
233
|
const key = getUid(layer);
|
|
238
234
|
this.listenerKeys_[key].forEach(unlistenByKey);
|
|
239
235
|
delete this.listenerKeys_[key];
|
|
@@ -244,13 +240,13 @@ class LayerGroup extends BaseLayer {
|
|
|
244
240
|
/**
|
|
245
241
|
* Returns the {@link module:ol/Collection~Collection collection} of {@link module:ol/layer/Layer~Layer layers}
|
|
246
242
|
* in this group.
|
|
247
|
-
* @return {!
|
|
243
|
+
* @return {!Collection<import("./Base.js").default>} Collection of
|
|
248
244
|
* {@link module:ol/layer/Base~BaseLayer layers} that are part of this group.
|
|
249
245
|
* @observable
|
|
250
246
|
* @api
|
|
251
247
|
*/
|
|
252
248
|
getLayers() {
|
|
253
|
-
return /** @type {!
|
|
249
|
+
return /** @type {!Collection<import("./Base.js").default>} */ (
|
|
254
250
|
this.get(Property.LAYERS)
|
|
255
251
|
);
|
|
256
252
|
}
|
|
@@ -258,7 +254,7 @@ class LayerGroup extends BaseLayer {
|
|
|
258
254
|
/**
|
|
259
255
|
* Set the {@link module:ol/Collection~Collection collection} of {@link module:ol/layer/Layer~Layer layers}
|
|
260
256
|
* in this group.
|
|
261
|
-
* @param {!
|
|
257
|
+
* @param {!Collection<import("./Base.js").default>} layers Collection of
|
|
262
258
|
* {@link module:ol/layer/Base~BaseLayer layers} that are part of this group.
|
|
263
259
|
* @observable
|
|
264
260
|
* @api
|
package/package.json
CHANGED
package/source/Vector.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ export type LoadingStrategy = (arg0: import("../extent.js").Extent, arg1: number
|
|
|
43
43
|
* *
|
|
44
44
|
*/
|
|
45
45
|
export type VectorSourceOnSignature<Return> = import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default, Return> & import("../Observable").OnSignature<import("../ObjectEventType").Types, import("../Object").ObjectEvent, Return> & import("../Observable").OnSignature<import("./VectorEventType").VectorSourceEventTypes, VectorSourceEvent, Return> & import("../Observable").CombinedOnSignature<import("../Observable").EventTypes | import("../ObjectEventType").Types | import("./VectorEventType").VectorSourceEventTypes, Return>;
|
|
46
|
-
export type Options = {
|
|
46
|
+
export type Options<Geometry extends import("../geom/Geometry.js").default = import("../geom/Geometry.js").default> = {
|
|
47
47
|
/**
|
|
48
48
|
* Attributions.
|
|
49
49
|
*/
|
|
@@ -52,7 +52,7 @@ export type Options = {
|
|
|
52
52
|
* Features. If provided as {@link module :ol/Collection~Collection}, the features in the source
|
|
53
53
|
* and the collection will stay in sync.
|
|
54
54
|
*/
|
|
55
|
-
features?: import("../Feature.js").default<
|
|
55
|
+
features?: import("../Feature.js").default<Geometry>[] | Collection<import("../Feature.js").default<Geometry>> | undefined;
|
|
56
56
|
/**
|
|
57
57
|
* The feature format used by the XHR
|
|
58
58
|
* feature loader when `url` is set. Required if `url` is set, otherwise ignored.
|
|
@@ -167,7 +167,7 @@ import Event from "../events/Event.js";
|
|
|
167
167
|
/**
|
|
168
168
|
* @typedef {Object} Options
|
|
169
169
|
* @property {import("./Source.js").AttributionLike} [attributions] Attributions.
|
|
170
|
-
* @property {Array<import("../Feature.js").default
|
|
170
|
+
* @property {Array<import("../Feature.js").default<Geometry>>|Collection<import("../Feature.js").default<Geometry>>} [features]
|
|
171
171
|
* Features. If provided as {@link module:ol/Collection~Collection}, the features in the source
|
|
172
172
|
* and the collection will stay in sync.
|
|
173
173
|
* @property {import("../format/Feature.js").default} [format] The feature format used by the XHR
|
|
@@ -254,6 +254,7 @@ import Event from "../events/Event.js";
|
|
|
254
254
|
* @property {boolean} [wrapX=true] Wrap the world horizontally. For vector editing across the
|
|
255
255
|
* -180° and 180° meridians to work properly, this should be set to `false`. The
|
|
256
256
|
* resulting geometry coordinates will then exceed the world bounds.
|
|
257
|
+
* @template {import("../geom/Geometry.js").default} [Geometry=import("../geom/Geometry.js").default]
|
|
257
258
|
*/
|
|
258
259
|
/**
|
|
259
260
|
* @classdesc
|
|
@@ -267,9 +268,9 @@ import Event from "../events/Event.js";
|
|
|
267
268
|
*/
|
|
268
269
|
declare class VectorSource<Geometry extends import("../geom/Geometry.js").default = import("../geom/Geometry.js").default> extends Source {
|
|
269
270
|
/**
|
|
270
|
-
* @param {Options} [opt_options] Vector source options.
|
|
271
|
+
* @param {Options<Geometry>} [opt_options] Vector source options.
|
|
271
272
|
*/
|
|
272
|
-
constructor(opt_options?: Options | undefined);
|
|
273
|
+
constructor(opt_options?: Options<Geometry> | undefined);
|
|
273
274
|
/***
|
|
274
275
|
* @type {VectorSourceOnSignature<import("../events").EventsKey>}
|
|
275
276
|
*/
|
package/source/Vector.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Vector.d.ts","sourceRoot":"","sources":["Vector.js"],"names":[],"mappings":"AAsBA;;;;;;;GAOG;AAEH;;;;;GAKG;AACH;IACE;;;;OAIG;IACH,kBAJW,MAAM,+IAoBhB;IAbC;;;;OAIG;IACH,SAHU,OAAO,eAAe,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAC,SAAS,CAGnC;IAE1B;;;;OAIG;IACH,UAHU,MAAM,OAAO,eAAe,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,GAAC,SAAS,CAGxC;CAE/B;;;;;;;qCAjCqB,OAAO,cAAc,EAAE,MAAM,QAAE,MAAM,QAAE,OAAO,uBAAuB,EAAE,OAAO,KAAG,MAAM,OAAO,cAAc,EAAE,MAAM,CAAC;;;;8C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eAAe,EAAE,OAAO,CAAC,QAAQ,CAAC,GACxC,OAAO,eAAe,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAC,SAAS,CAqB9D;IAED;;;;;;OAMG;IACH,2BAUC;IAED;;;;;OAKG;IACH,kBAHW,OAAO,qBAAqB,EAAE,aAAa,QAKrD;IAED;;;;OAIG;IACH,YAHW,MAAM,GAAC,OAAO,qBAAqB,EAAE,kBAAkB,QAOjE;CACF"}
|
package/source/Vector.js
CHANGED
|
@@ -72,7 +72,7 @@ export class VectorSourceEvent extends Event {
|
|
|
72
72
|
/**
|
|
73
73
|
* @typedef {Object} Options
|
|
74
74
|
* @property {import("./Source.js").AttributionLike} [attributions] Attributions.
|
|
75
|
-
* @property {Array<import("../Feature.js").default
|
|
75
|
+
* @property {Array<import("../Feature.js").default<Geometry>>|Collection<import("../Feature.js").default<Geometry>>} [features]
|
|
76
76
|
* Features. If provided as {@link module:ol/Collection~Collection}, the features in the source
|
|
77
77
|
* and the collection will stay in sync.
|
|
78
78
|
* @property {import("../format/Feature.js").default} [format] The feature format used by the XHR
|
|
@@ -159,6 +159,7 @@ export class VectorSourceEvent extends Event {
|
|
|
159
159
|
* @property {boolean} [wrapX=true] Wrap the world horizontally. For vector editing across the
|
|
160
160
|
* -180° and 180° meridians to work properly, this should be set to `false`. The
|
|
161
161
|
* resulting geometry coordinates will then exceed the world bounds.
|
|
162
|
+
* @template {import("../geom/Geometry.js").default} [Geometry=import("../geom/Geometry.js").default]
|
|
162
163
|
*/
|
|
163
164
|
|
|
164
165
|
/**
|
|
@@ -173,7 +174,7 @@ export class VectorSourceEvent extends Event {
|
|
|
173
174
|
*/
|
|
174
175
|
class VectorSource extends Source {
|
|
175
176
|
/**
|
|
176
|
-
* @param {Options} [opt_options] Vector source options.
|
|
177
|
+
* @param {Options<Geometry>} [opt_options] Vector source options.
|
|
177
178
|
*/
|
|
178
179
|
constructor(opt_options) {
|
|
179
180
|
const options = opt_options || {};
|
|
@@ -296,17 +297,14 @@ class VectorSource extends Source {
|
|
|
296
297
|
*/
|
|
297
298
|
this.featuresCollection_ = null;
|
|
298
299
|
|
|
299
|
-
|
|
300
|
+
/** @type {Collection<import("../Feature.js").default<Geometry>>} */
|
|
301
|
+
let collection;
|
|
302
|
+
/** @type {Array<import("../Feature.js").default<Geometry>>} */
|
|
303
|
+
let features;
|
|
300
304
|
if (Array.isArray(options.features)) {
|
|
301
|
-
features =
|
|
302
|
-
/** @type {Array<import("../Feature.js").default<Geometry>>} */ (
|
|
303
|
-
options.features
|
|
304
|
-
);
|
|
305
|
+
features = options.features;
|
|
305
306
|
} else if (options.features) {
|
|
306
|
-
collection =
|
|
307
|
-
/** @type {Collection<import("../Feature.js").default<Geometry>>} */ (
|
|
308
|
-
options.features
|
|
309
|
-
);
|
|
307
|
+
collection = options.features;
|
|
310
308
|
features = collection.getArray();
|
|
311
309
|
}
|
|
312
310
|
if (!useSpatialIndex && collection === undefined) {
|
|
@@ -500,16 +498,12 @@ class VectorSource extends Source {
|
|
|
500
498
|
collection.addEventListener(
|
|
501
499
|
CollectionEventType.ADD,
|
|
502
500
|
/**
|
|
503
|
-
* @param {import("../Collection.js").CollectionEvent} evt The collection event
|
|
501
|
+
* @param {import("../Collection.js").CollectionEvent<import("../Feature.js").default<Geometry>>} evt The collection event
|
|
504
502
|
*/
|
|
505
503
|
function (evt) {
|
|
506
504
|
if (!modifyingCollection) {
|
|
507
505
|
modifyingCollection = true;
|
|
508
|
-
this.addFeature(
|
|
509
|
-
/** @type {import("../Feature.js").default<Geometry>} */ (
|
|
510
|
-
evt.element
|
|
511
|
-
)
|
|
512
|
-
);
|
|
506
|
+
this.addFeature(evt.element);
|
|
513
507
|
modifyingCollection = false;
|
|
514
508
|
}
|
|
515
509
|
}.bind(this)
|
|
@@ -517,16 +511,12 @@ class VectorSource extends Source {
|
|
|
517
511
|
collection.addEventListener(
|
|
518
512
|
CollectionEventType.REMOVE,
|
|
519
513
|
/**
|
|
520
|
-
* @param {import("../Collection.js").CollectionEvent} evt The collection event
|
|
514
|
+
* @param {import("../Collection.js").CollectionEvent<import("../Feature.js").default<Geometry>>} evt The collection event
|
|
521
515
|
*/
|
|
522
516
|
function (evt) {
|
|
523
517
|
if (!modifyingCollection) {
|
|
524
518
|
modifyingCollection = true;
|
|
525
|
-
this.removeFeature(
|
|
526
|
-
/** @type {import("../Feature.js").default<Geometry>} */ (
|
|
527
|
-
evt.element
|
|
528
|
-
)
|
|
529
|
-
);
|
|
519
|
+
this.removeFeature(evt.element);
|
|
530
520
|
modifyingCollection = false;
|
|
531
521
|
}
|
|
532
522
|
}.bind(this)
|