ol 10.7.1-dev.1764759764381 → 10.7.1-dev.1764841052662
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 +1 -1
- package/dist/ol.js.map +1 -1
- package/layer/Heatmap.d.ts +17 -0
- package/layer/Heatmap.d.ts.map +1 -1
- package/layer/Heatmap.js +29 -0
- package/package.json +1 -1
- package/reproj/Tile.d.ts +7 -2
- package/reproj/Tile.d.ts.map +1 -1
- package/reproj/Tile.js +12 -6
- package/util.js +1 -1
package/layer/Heatmap.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
export default Heatmap;
|
|
2
|
+
export type HeatmapEventTypes = "change:blur" | "change:radius" | "change:gradient";
|
|
3
|
+
/**
|
|
4
|
+
* *
|
|
5
|
+
*/
|
|
6
|
+
export type HeatmapOnSignature<Return> = import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default, Return> & import("../Observable").OnSignature<import("./Base").BaseLayerObjectEventTypes | import("./Layer.js").LayerEventType | HeatmapEventTypes, import("../Object").ObjectEvent, Return> & import("../Observable").OnSignature<import("../render/EventType").LayerRenderEventTypes, import("../render/Event").default, Return> & import("../Observable").CombinedOnSignature<import("../Observable").EventTypes | import("./Base").BaseLayerObjectEventTypes | import("./Layer.js").LayerEventType | HeatmapEventTypes | import("../render/EventType").LayerRenderEventTypes, Return>;
|
|
2
7
|
export type WeightExpression = import("../style/flat.js").NumberExpression | string | ((arg0: import("../Feature.js").default) => number);
|
|
3
8
|
export type Options<FeatureType extends import("../Feature.js").FeatureLike = import("../Feature.js").default<import("../geom.js").Geometry>, VectorSourceType extends import("../source/Vector.js").default<FeatureType> = import("../source/Vector.js").default<FeatureType>> = {
|
|
4
9
|
/**
|
|
@@ -106,6 +111,18 @@ declare class Heatmap<FeatureType extends import("../Feature.js").FeatureLike =
|
|
|
106
111
|
* @param {Options<FeatureType, VectorSourceType>} [options] Options.
|
|
107
112
|
*/
|
|
108
113
|
constructor(options?: Options<FeatureType, VectorSourceType>);
|
|
114
|
+
/***
|
|
115
|
+
* @type {HeatmapOnSignature<import("../events").EventsKey>}
|
|
116
|
+
*/
|
|
117
|
+
on: HeatmapOnSignature<import("../events").EventsKey>;
|
|
118
|
+
/***
|
|
119
|
+
* @type {HeatmapOnSignature<import("../events").EventsKey>}
|
|
120
|
+
*/
|
|
121
|
+
once: HeatmapOnSignature<import("../events").EventsKey>;
|
|
122
|
+
/***
|
|
123
|
+
* @type {HeatmapOnSignature<void>}
|
|
124
|
+
*/
|
|
125
|
+
un: HeatmapOnSignature<void>;
|
|
109
126
|
filter_: import("../style/flat.js").BooleanExpression;
|
|
110
127
|
/**
|
|
111
128
|
* @type {import('../style/flat.js').StyleVariables}
|
package/layer/Heatmap.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Heatmap.d.ts","sourceRoot":"","sources":["Heatmap.js"],"names":[],"mappings":";+
|
|
1
|
+
{"version":3,"file":"Heatmap.d.ts","sourceRoot":"","sources":["Heatmap.js"],"names":[],"mappings":";gCAkBa,aAAa,GAAC,eAAe,GAAC,iBAAiB;;;;+BAI/C,MAAM,IACN,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,OAAa,YAAY,EAAE,cAAc,GAAC,iBAAiB,EAAE,OAAO,WAAW,EAAE,WAAW,EAAE,MAAM,CAAC,GACrG,OAAW,eAAe,EAAE,WAAW,CAAC,OAAO,qBAAqB,EAAE,qBAAqB,EAAE,OAAO,iBAAiB,EAAE,OAAO,EAAE,MAAM,CAAC,GACvI,OAAW,eAAe,EAAE,mBAAmB,CAAC,OAAO,eAAe,EAAE,UAAU,GAAC,OAAO,QAAQ,EAAE,yBAAyB,GAC7H,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;;;;OAKG;IACH,oBAJW,KAAK,CAAC,MAAM,CAAC,QAMvB;IAED;;;;;OAKG;IACH,kBAJW,OAAO,kBAAkB,EAAE,gBAAgB,QAarD;IAED;;;;OAIG;IACH,kBAHW,OAAO,kBAAkB,EAAE,iBAAiB,QAOtD;IAED;;;;OAIG;IACH,kBAHW,gBAAgB,QAO1B;IAuHD;;;OAGG;IACH,gCAFW,OAAO,kBAAkB,EAAE,cAAc,QAKnD;IAED;;OAEG;IACH,iCAAoB;CACrB;qCApYoC,kCAAkC;uBAChD,iBAAiB"}
|
package/layer/Heatmap.js
CHANGED
|
@@ -15,6 +15,20 @@ import {
|
|
|
15
15
|
import WebGLVectorLayerRenderer from '../renderer/webgl/VectorLayer.js';
|
|
16
16
|
import BaseVector from './BaseVector.js';
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* @typedef {'change:blur'|'change:radius'|'change:gradient'} HeatmapEventTypes
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/***
|
|
23
|
+
* @template Return
|
|
24
|
+
* @typedef {import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default, Return> &
|
|
25
|
+
* import("../Observable").OnSignature<import("./Base").BaseLayerObjectEventTypes|
|
|
26
|
+
* import("./Layer.js").LayerEventType|HeatmapEventTypes, import("../Object").ObjectEvent, Return> &
|
|
27
|
+
* import("../Observable").OnSignature<import("../render/EventType").LayerRenderEventTypes, import("../render/Event").default, Return> &
|
|
28
|
+
* import("../Observable").CombinedOnSignature<import("../Observable").EventTypes|import("./Base").BaseLayerObjectEventTypes|
|
|
29
|
+
* import("./Layer.js").LayerEventType|HeatmapEventTypes|import("../render/EventType").LayerRenderEventTypes, Return>} HeatmapOnSignature
|
|
30
|
+
*/
|
|
31
|
+
|
|
18
32
|
/**
|
|
19
33
|
* @typedef {import("../style/flat.js").NumberExpression|string|function(import("../Feature.js").default):number} WeightExpression
|
|
20
34
|
*/
|
|
@@ -100,6 +114,21 @@ class Heatmap extends BaseVector {
|
|
|
100
114
|
delete baseOptions.weight;
|
|
101
115
|
super(baseOptions);
|
|
102
116
|
|
|
117
|
+
/***
|
|
118
|
+
* @type {HeatmapOnSignature<import("../events").EventsKey>}
|
|
119
|
+
*/
|
|
120
|
+
this.on;
|
|
121
|
+
|
|
122
|
+
/***
|
|
123
|
+
* @type {HeatmapOnSignature<import("../events").EventsKey>}
|
|
124
|
+
*/
|
|
125
|
+
this.once;
|
|
126
|
+
|
|
127
|
+
/***
|
|
128
|
+
* @type {HeatmapOnSignature<void>}
|
|
129
|
+
*/
|
|
130
|
+
this.un;
|
|
131
|
+
|
|
103
132
|
this.filter_ = options.filter ?? true;
|
|
104
133
|
|
|
105
134
|
/**
|
package/package.json
CHANGED
package/reproj/Tile.d.ts
CHANGED
|
@@ -4,7 +4,11 @@ export type TileOffset = {
|
|
|
4
4
|
/**
|
|
5
5
|
* Tile.
|
|
6
6
|
*/
|
|
7
|
-
tile
|
|
7
|
+
tile?: import("../ImageTile.js").default | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Tile getter.
|
|
10
|
+
*/
|
|
11
|
+
getTile: () => import("../ImageTile.js").default;
|
|
8
12
|
/**
|
|
9
13
|
* Offset.
|
|
10
14
|
*/
|
|
@@ -15,7 +19,8 @@ export type TileOffset = {
|
|
|
15
19
|
*/
|
|
16
20
|
/**
|
|
17
21
|
* @typedef {Object} TileOffset
|
|
18
|
-
* @property {import("../ImageTile.js").default} tile Tile.
|
|
22
|
+
* @property {import("../ImageTile.js").default} [tile] Tile.
|
|
23
|
+
* @property {function(): import("../ImageTile.js").default} getTile Tile getter.
|
|
19
24
|
* @property {number} offset Offset.
|
|
20
25
|
*/
|
|
21
26
|
/**
|
package/reproj/Tile.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tile.d.ts","sourceRoot":"","sources":["Tile.js"],"names":[],"mappings":";2BAoBa,CAAS,IAAM,EAAN,MAAM,EAAE,IAAM,EAAN,MAA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"}
|
package/reproj/Tile.js
CHANGED
|
@@ -23,7 +23,8 @@ import {ERROR_THRESHOLD} from './common.js';
|
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* @typedef {Object} TileOffset
|
|
26
|
-
* @property {import("../ImageTile.js").default} tile Tile.
|
|
26
|
+
* @property {import("../ImageTile.js").default} [tile] Tile.
|
|
27
|
+
* @property {function(): import("../ImageTile.js").default} getTile Tile getter.
|
|
27
28
|
* @property {number} offset Offset.
|
|
28
29
|
*/
|
|
29
30
|
|
|
@@ -244,11 +245,12 @@ class ReprojTile extends Tile {
|
|
|
244
245
|
|
|
245
246
|
for (let srcX = sourceRange.minX; srcX <= sourceRange.maxX; srcX++) {
|
|
246
247
|
for (let srcY = sourceRange.minY; srcY <= sourceRange.maxY; srcY++) {
|
|
247
|
-
const
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
248
|
+
const offset = worldsAway * worldWidth;
|
|
249
|
+
this.sourceTiles_.push({
|
|
250
|
+
getTile: () =>
|
|
251
|
+
getTileFunction(this.sourceZ_, srcX, srcY, pixelRatio),
|
|
252
|
+
offset,
|
|
253
|
+
});
|
|
252
254
|
}
|
|
253
255
|
}
|
|
254
256
|
++worldsAway;
|
|
@@ -334,6 +336,9 @@ class ReprojTile extends Tile {
|
|
|
334
336
|
* @override
|
|
335
337
|
*/
|
|
336
338
|
load() {
|
|
339
|
+
for (const sourceTile of this.sourceTiles_) {
|
|
340
|
+
sourceTile.tile = sourceTile.getTile();
|
|
341
|
+
}
|
|
337
342
|
if (this.state == TileState.IDLE) {
|
|
338
343
|
this.state = TileState.LOADING;
|
|
339
344
|
this.changed();
|
|
@@ -400,6 +405,7 @@ class ReprojTile extends Tile {
|
|
|
400
405
|
canvasPool.push(this.canvas_);
|
|
401
406
|
this.canvas_ = null;
|
|
402
407
|
}
|
|
408
|
+
this.sourceTiles_.length = 0;
|
|
403
409
|
super.release();
|
|
404
410
|
}
|
|
405
411
|
}
|
package/util.js
CHANGED