ol 9.2.5-sh.1 → 9.2.5-sh.2
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/VectorRenderTile.d.ts +3 -3
- package/VectorRenderTile.d.ts.map +1 -1
- package/VectorTile.d.ts +19 -16
- package/VectorTile.d.ts.map +1 -1
- package/VectorTile.js +12 -9
- package/dist/ol.js +2 -2
- package/dist/ol.js.map +1 -1
- package/featureloader.d.ts +8 -8
- package/featureloader.d.ts.map +1 -1
- package/featureloader.js +5 -5
- package/format/EsriJSON.d.ts +0 -7
- package/format/EsriJSON.d.ts.map +1 -1
- package/format/Feature.d.ts +10 -10
- package/format/Feature.d.ts.map +1 -1
- package/format/Feature.js +6 -6
- package/format/GeoJSON.d.ts +9 -9
- package/format/GeoJSON.d.ts.map +1 -1
- package/format/GeoJSON.js +22 -17
- package/format/JSONFeature.d.ts +7 -27
- package/format/JSONFeature.d.ts.map +1 -1
- package/format/JSONFeature.js +10 -12
- package/format/MVT.d.ts +12 -12
- package/format/MVT.d.ts.map +1 -1
- package/format/MVT.js +16 -18
- package/format/TextFeature.d.ts +0 -9
- package/format/TextFeature.d.ts.map +1 -1
- package/format/TopoJSON.d.ts +0 -7
- package/format/TopoJSON.d.ts.map +1 -1
- package/format/XMLFeature.d.ts +0 -9
- package/format/XMLFeature.d.ts.map +1 -1
- package/interaction/Draw.d.ts +1 -1
- package/interaction/Draw.d.ts.map +1 -1
- package/interaction/Modify.d.ts +3 -3
- package/interaction/Modify.d.ts.map +1 -1
- package/interaction/Select.d.ts +1 -2
- package/interaction/Select.d.ts.map +1 -1
- package/layer/BaseVector.d.ts +7 -6
- package/layer/BaseVector.d.ts.map +1 -1
- package/layer/BaseVector.js +6 -4
- package/layer/Graticule.d.ts +3 -2
- package/layer/Graticule.d.ts.map +1 -1
- package/layer/Graticule.js +1 -1
- package/layer/Heatmap.d.ts +8 -7
- package/layer/Heatmap.d.ts.map +1 -1
- package/layer/Heatmap.js +7 -5
- package/layer/Tile.d.ts +2 -2
- package/layer/Tile.js +1 -1
- package/layer/Vector.d.ts +19 -9
- package/layer/Vector.d.ts.map +1 -1
- package/layer/Vector.js +12 -5
- package/layer/VectorImage.d.ts +9 -7
- package/layer/VectorImage.d.ts.map +1 -1
- package/layer/VectorImage.js +6 -4
- package/layer/VectorTile.d.ts +19 -9
- package/layer/VectorTile.d.ts.map +1 -1
- package/layer/VectorTile.js +16 -9
- package/package.json +1 -1
- package/renderer/canvas/TileLayer.d.ts +2 -2
- package/renderer/canvas/TileLayer.js +1 -1
- package/renderer/canvas/VectorImageLayer.d.ts +1 -1
- package/renderer/canvas/VectorImageLayer.d.ts.map +1 -1
- package/renderer/canvas/VectorLayer.d.ts +1 -1
- package/renderer/canvas/VectorLayer.d.ts.map +1 -1
- package/renderer/canvas/VectorTileLayer.d.ts +3 -3
- package/renderer/canvas/VectorTileLayer.d.ts.map +1 -1
- package/renderer/canvas/VectorTileLayer.js +1 -1
- package/source/OGCVectorTile.d.ts +7 -7
- package/source/OGCVectorTile.d.ts.map +1 -1
- package/source/OGCVectorTile.js +3 -3
- package/source/SentinelHub.d.ts +11 -11
- package/source/SentinelHub.d.ts.map +1 -1
- package/source/SentinelHub.js +20 -20
- package/source/Vector.d.ts +14 -14
- package/source/Vector.d.ts.map +1 -1
- package/source/Vector.js +10 -10
- package/source/VectorTile.d.ts +8 -7
- package/source/VectorTile.d.ts.map +1 -1
- package/source/VectorTile.js +3 -2
- package/util.js +1 -1
package/layer/VectorImage.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default VectorImageLayer;
|
|
2
|
-
export type Options<
|
|
2
|
+
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>> = {
|
|
3
3
|
/**
|
|
4
4
|
* A CSS class name to set to the layer element.
|
|
5
5
|
*/
|
|
@@ -99,7 +99,8 @@ export type Options<VectorSourceType extends import("../source/Vector.js").defau
|
|
|
99
99
|
} | undefined;
|
|
100
100
|
};
|
|
101
101
|
/**
|
|
102
|
-
* @template {import("../
|
|
102
|
+
* @template {import("../Feature.js").FeatureLike} [FeatureType=import("../Feature.js").default]
|
|
103
|
+
* @template {import("../source/Vector.js").default<FeatureType>} [VectorSourceType=import("../source/Vector.js").default<FeatureType>]
|
|
103
104
|
* @typedef {Object} Options
|
|
104
105
|
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
|
|
105
106
|
* @property {number} [opacity=1] Opacity (0, 1).
|
|
@@ -154,15 +155,16 @@ export type Options<VectorSourceType extends import("../source/Vector.js").defau
|
|
|
154
155
|
* property on the layer object; for example, setting `title: 'My Title'` in the
|
|
155
156
|
* options means that `title` is observable, and has get/set accessors.
|
|
156
157
|
*
|
|
157
|
-
* @template {import("../Feature.js").default} FeatureType
|
|
158
|
-
* @
|
|
158
|
+
* @template {import("../Feature.js").default} [FeatureType=import("../Feature.js").default]
|
|
159
|
+
* @template {import("../source/Vector.js").default<FeatureType>} [VectorSourceType=import("../source/Vector.js").default<FeatureType>]
|
|
160
|
+
* @extends {BaseVectorLayer<FeatureType, VectorSourceType, CanvasVectorImageLayerRenderer>}
|
|
159
161
|
* @api
|
|
160
162
|
*/
|
|
161
|
-
declare class VectorImageLayer<FeatureType extends import("../Feature.js").default<import("../geom.js").Geometry
|
|
163
|
+
declare class VectorImageLayer<FeatureType extends import("../Feature.js").default<import("../geom.js").Geometry> = import("../Feature.js").default<import("../geom.js").Geometry>, VectorSourceType extends import("../source/Vector.js").default<FeatureType> = import("../source/Vector.js").default<FeatureType>> extends BaseVectorLayer<FeatureType, VectorSourceType, CanvasVectorImageLayerRenderer> {
|
|
162
164
|
/**
|
|
163
|
-
* @param {Options<
|
|
165
|
+
* @param {Options<FeatureType, VectorSourceType>} [options] Options.
|
|
164
166
|
*/
|
|
165
|
-
constructor(options?: Options<
|
|
167
|
+
constructor(options?: Options<FeatureType, VectorSourceType> | undefined);
|
|
166
168
|
/**
|
|
167
169
|
* @type {number}
|
|
168
170
|
* @private
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorImage.d.ts","sourceRoot":"","sources":["VectorImage.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA
|
|
1
|
+
{"version":3,"file":"VectorImage.d.ts","sourceRoot":"","sources":["VectorImage.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH;;;;;;;;;;;;;;;GAeG;AACH;IACE;;OAEG;IACH,0EAaC;IANC;;;OAGG;IACH,oBAC2D;IAG7D;;OAEG;IACH,iBAFY,MAAM,CAIjB;CAKF;2CA9F0C,wCAAwC;4BADvD,iBAAiB"}
|
package/layer/VectorImage.js
CHANGED
|
@@ -5,7 +5,8 @@ import BaseVectorLayer from './BaseVector.js';
|
|
|
5
5
|
import CanvasVectorImageLayerRenderer from '../renderer/canvas/VectorImageLayer.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* @template {import("../
|
|
8
|
+
* @template {import("../Feature.js").FeatureLike} [FeatureType=import("../Feature.js").default]
|
|
9
|
+
* @template {import("../source/Vector.js").default<FeatureType>} [VectorSourceType=import("../source/Vector.js").default<FeatureType>]
|
|
9
10
|
* @typedef {Object} Options
|
|
10
11
|
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
|
|
11
12
|
* @property {number} [opacity=1] Opacity (0, 1).
|
|
@@ -61,13 +62,14 @@ import CanvasVectorImageLayerRenderer from '../renderer/canvas/VectorImageLayer.
|
|
|
61
62
|
* property on the layer object; for example, setting `title: 'My Title'` in the
|
|
62
63
|
* options means that `title` is observable, and has get/set accessors.
|
|
63
64
|
*
|
|
64
|
-
* @template {import("../Feature.js").default} FeatureType
|
|
65
|
-
* @
|
|
65
|
+
* @template {import("../Feature.js").default} [FeatureType=import("../Feature.js").default]
|
|
66
|
+
* @template {import("../source/Vector.js").default<FeatureType>} [VectorSourceType=import("../source/Vector.js").default<FeatureType>]
|
|
67
|
+
* @extends {BaseVectorLayer<FeatureType, VectorSourceType, CanvasVectorImageLayerRenderer>}
|
|
66
68
|
* @api
|
|
67
69
|
*/
|
|
68
70
|
class VectorImageLayer extends BaseVectorLayer {
|
|
69
71
|
/**
|
|
70
|
-
* @param {Options<
|
|
72
|
+
* @param {Options<FeatureType, VectorSourceType>} [options] Options.
|
|
71
73
|
*/
|
|
72
74
|
constructor(options) {
|
|
73
75
|
options = options ? options : {};
|
package/layer/VectorTile.d.ts
CHANGED
|
@@ -4,7 +4,11 @@ export default VectorTileLayer;
|
|
|
4
4
|
*/
|
|
5
5
|
export type VectorTileLayerOnSignature<Return> = import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default, Return> & import("../Observable").OnSignature<import("./Base").BaseLayerObjectEventTypes | import("./Layer.js").LayerEventType | 'change:preload' | 'change:useInterimTilesOnError', 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 | 'change:preload' | 'change:useInterimTilesOnError' | import("../render/EventType").LayerRenderEventTypes, Return>;
|
|
6
6
|
export type VectorTileRenderType = 'hybrid' | 'vector';
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* *
|
|
9
|
+
*/
|
|
10
|
+
export type ExtractedFeatureType<T> = T extends import("../source/VectorTile.js").default<infer U extends import("../Feature.js").FeatureLike> ? U : never;
|
|
11
|
+
export type Options<VectorTileSourceType extends import("../source/VectorTile.js").default<FeatureType> = import("../source/VectorTile.js").default<any>, FeatureType extends import("../Feature.js").FeatureLike = ExtractedFeatureType<VectorTileSourceType>> = {
|
|
8
12
|
/**
|
|
9
13
|
* A CSS class name to set to the layer element.
|
|
10
14
|
*/
|
|
@@ -77,7 +81,7 @@ export type Options<FeatureType extends import("../Feature").FeatureLike> = {
|
|
|
77
81
|
/**
|
|
78
82
|
* Source.
|
|
79
83
|
*/
|
|
80
|
-
source?:
|
|
84
|
+
source?: VectorTileSourceType | undefined;
|
|
81
85
|
/**
|
|
82
86
|
* Sets the layer as overlay on a map. The map will not manage
|
|
83
87
|
* this layer in its layers collection, and the layer will be rendered on top. This is useful for
|
|
@@ -144,8 +148,13 @@ export type Options<FeatureType extends import("../Feature").FeatureLike> = {
|
|
|
144
148
|
/**
|
|
145
149
|
* @typedef {'hybrid' | 'vector'} VectorTileRenderType
|
|
146
150
|
*/
|
|
151
|
+
/***
|
|
152
|
+
* @template T
|
|
153
|
+
* @typedef {T extends import("../source/VectorTile.js").default<infer U extends import("../Feature.js").FeatureLike> ? U : never} ExtractedFeatureType
|
|
154
|
+
*/
|
|
147
155
|
/**
|
|
148
|
-
* @template {import(
|
|
156
|
+
* @template {import("../source/VectorTile.js").default<FeatureType>} [VectorTileSourceType=import("../source/VectorTile.js").default<*>]
|
|
157
|
+
* @template {import("../Feature").FeatureLike} [FeatureType=ExtractedFeatureType<VectorTileSourceType>]
|
|
149
158
|
* @typedef {Object} Options
|
|
150
159
|
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
|
|
151
160
|
* @property {number} [opacity=1] Opacity (0, 1).
|
|
@@ -180,7 +189,7 @@ export type Options<FeatureType extends import("../Feature").FeatureLike> = {
|
|
|
180
189
|
* this mode for improved performance and visual epxerience on vector tile layers with not too many
|
|
181
190
|
* rendered features (e.g. for highlighting a subset of features of another layer with the same
|
|
182
191
|
* source).
|
|
183
|
-
* @property {
|
|
192
|
+
* @property {VectorTileSourceType} [source] Source.
|
|
184
193
|
* @property {import("../Map.js").default} [map] Sets the layer as overlay on a map. The map will not manage
|
|
185
194
|
* this layer in its layers collection, and the layer will be rendered on top. This is useful for
|
|
186
195
|
* temporary layers. The standard way to add a layer to a map and have it managed by the map is to
|
|
@@ -213,15 +222,16 @@ export type Options<FeatureType extends import("../Feature").FeatureLike> = {
|
|
|
213
222
|
* property on the layer object; for example, setting `title: 'My Title'` in the
|
|
214
223
|
* options means that `title` is observable, and has get/set accessors.
|
|
215
224
|
*
|
|
216
|
-
* @template {import(
|
|
217
|
-
* @
|
|
225
|
+
* @template {import("../source/VectorTile.js").default<FeatureType>} [VectorTileSourceType=import("../source/VectorTile.js").default<*>]
|
|
226
|
+
* @template {import("../Feature.js").FeatureLike} [FeatureType=ExtractedFeatureType<VectorTileSourceType>]
|
|
227
|
+
* @extends {BaseVectorLayer<FeatureType, VectorTileSourceType, CanvasVectorTileLayerRenderer>}
|
|
218
228
|
* @api
|
|
219
229
|
*/
|
|
220
|
-
declare class VectorTileLayer<
|
|
230
|
+
declare class VectorTileLayer<VectorTileSourceType extends import("../source/VectorTile.js").default<FeatureType> = import("../source/VectorTile.js").default<any>, FeatureType extends import("../Feature.js").FeatureLike = ExtractedFeatureType<VectorTileSourceType>> extends BaseVectorLayer<FeatureType, VectorTileSourceType, CanvasVectorTileLayerRenderer> {
|
|
221
231
|
/**
|
|
222
|
-
* @param {Options<FeatureType>} [options] Options.
|
|
232
|
+
* @param {Options<VectorTileSourceType, FeatureType>} [options] Options.
|
|
223
233
|
*/
|
|
224
|
-
constructor(options?: Options<FeatureType> | undefined);
|
|
234
|
+
constructor(options?: Options<VectorTileSourceType, FeatureType> | undefined);
|
|
225
235
|
/***
|
|
226
236
|
* @type {VectorTileLayerOnSignature<import("../events").EventsKey>}
|
|
227
237
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorTile.d.ts","sourceRoot":"","sources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,yBAAyB,GAC7H,OAAa,YAAY,EAAE,cAAc,GAAC,gBAAgB,GAAC,+BAA+B,GAAC,OAAO,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,CAAC;mCAI3I,QAAQ,GAAG,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAXhC;;;;;;;;GAQG;AAEH;;GAEG;AAEH;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AAEH;;;;;;;;;;;GAWG;AACH;IACE;;OAEG;IACH,8EAwDC;IA/CC;;OAEG;IACH,IAFU,2BAA2B,OAAO,WAAW,EAAE,SAAS,CAAC,CAE5D;IAEP;;OAEG;IACH,MAFU,2BAA2B,OAAO,WAAW,EAAE,SAAS,CAAC,CAE1D;IAET;;OAEG;IACH,IAFU,2BAA2B,IAAI,CAAC,CAEnC;IAQP;;;OAGG;IACH,oBAA6B;IAgD/B;;OAEG;IACH,iBAFY,oBAAoB,CAI/B;IAED;;;;;OAKG;IACH,cAJY,MAAM,CAMjB;IAED;;;;;OAKG;IACH,6BAJY,OAAO,CAQlB;IAED;;;;;OAKG;IACH,oBAJW,MAAM,QAMhB;IAED;;;;;OAKG;IACH,kDAJW,OAAO,QAMjB;CACF;0CAzOyC,uCAAuC;4BADrD,iBAAiB"}
|
package/layer/VectorTile.js
CHANGED
|
@@ -20,8 +20,14 @@ import {assert} from '../asserts.js';
|
|
|
20
20
|
* @typedef {'hybrid' | 'vector'} VectorTileRenderType
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
|
+
/***
|
|
24
|
+
* @template T
|
|
25
|
+
* @typedef {T extends import("../source/VectorTile.js").default<infer U extends import("../Feature.js").FeatureLike> ? U : never} ExtractedFeatureType
|
|
26
|
+
*/
|
|
27
|
+
|
|
23
28
|
/**
|
|
24
|
-
* @template {import(
|
|
29
|
+
* @template {import("../source/VectorTile.js").default<FeatureType>} [VectorTileSourceType=import("../source/VectorTile.js").default<*>]
|
|
30
|
+
* @template {import("../Feature").FeatureLike} [FeatureType=ExtractedFeatureType<VectorTileSourceType>]
|
|
25
31
|
* @typedef {Object} Options
|
|
26
32
|
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
|
|
27
33
|
* @property {number} [opacity=1] Opacity (0, 1).
|
|
@@ -56,7 +62,7 @@ import {assert} from '../asserts.js';
|
|
|
56
62
|
* this mode for improved performance and visual epxerience on vector tile layers with not too many
|
|
57
63
|
* rendered features (e.g. for highlighting a subset of features of another layer with the same
|
|
58
64
|
* source).
|
|
59
|
-
* @property {
|
|
65
|
+
* @property {VectorTileSourceType} [source] Source.
|
|
60
66
|
* @property {import("../Map.js").default} [map] Sets the layer as overlay on a map. The map will not manage
|
|
61
67
|
* this layer in its layers collection, and the layer will be rendered on top. This is useful for
|
|
62
68
|
* temporary layers. The standard way to add a layer to a map and have it managed by the map is to
|
|
@@ -90,20 +96,19 @@ import {assert} from '../asserts.js';
|
|
|
90
96
|
* property on the layer object; for example, setting `title: 'My Title'` in the
|
|
91
97
|
* options means that `title` is observable, and has get/set accessors.
|
|
92
98
|
*
|
|
93
|
-
* @template {import(
|
|
94
|
-
* @
|
|
99
|
+
* @template {import("../source/VectorTile.js").default<FeatureType>} [VectorTileSourceType=import("../source/VectorTile.js").default<*>]
|
|
100
|
+
* @template {import("../Feature.js").FeatureLike} [FeatureType=ExtractedFeatureType<VectorTileSourceType>]
|
|
101
|
+
* @extends {BaseVectorLayer<FeatureType, VectorTileSourceType, CanvasVectorTileLayerRenderer>}
|
|
95
102
|
* @api
|
|
96
103
|
*/
|
|
97
104
|
class VectorTileLayer extends BaseVectorLayer {
|
|
98
105
|
/**
|
|
99
|
-
* @param {Options<FeatureType>} [options] Options.
|
|
106
|
+
* @param {Options<VectorTileSourceType, FeatureType>} [options] Options.
|
|
100
107
|
*/
|
|
101
108
|
constructor(options) {
|
|
102
109
|
options = options ? options : {};
|
|
103
110
|
|
|
104
|
-
const baseOptions =
|
|
105
|
-
Object.assign({}, options)
|
|
106
|
-
);
|
|
111
|
+
const baseOptions = Object.assign({}, options);
|
|
107
112
|
delete baseOptions.preload;
|
|
108
113
|
delete baseOptions.useInterimTilesOnError;
|
|
109
114
|
|
|
@@ -159,7 +164,9 @@ class VectorTileLayer extends BaseVectorLayer {
|
|
|
159
164
|
}
|
|
160
165
|
|
|
161
166
|
createRenderer() {
|
|
162
|
-
return new CanvasVectorTileLayerRenderer(
|
|
167
|
+
return new CanvasVectorTileLayerRenderer(
|
|
168
|
+
/** @type {VectorTileLayer} */ (this),
|
|
169
|
+
);
|
|
163
170
|
}
|
|
164
171
|
|
|
165
172
|
/**
|
package/package.json
CHANGED
|
@@ -3,10 +3,10 @@ export default CanvasTileLayerRenderer;
|
|
|
3
3
|
* @classdesc
|
|
4
4
|
* Canvas renderer for tile layers.
|
|
5
5
|
* @api
|
|
6
|
-
* @template {import("../../layer/Tile.js").default
|
|
6
|
+
* @template {import("../../layer/Tile.js").default|import("../../layer/VectorTile.js").default} [LayerType=import("../../layer/Tile.js").default<import("../../source/Tile.js").default>|import("../../layer/VectorTile.js").default]
|
|
7
7
|
* @extends {CanvasLayerRenderer<LayerType>}
|
|
8
8
|
*/
|
|
9
|
-
declare class CanvasTileLayerRenderer<LayerType extends import("../../layer/Tile.js").default<import("../../source/Tile.js").default> | import("../../layer/VectorTile.js").default<any> = import("../../layer/Tile.js").default<import("../../source/Tile.js").default> | import("../../layer/VectorTile.js").default<any>> extends CanvasLayerRenderer<LayerType> {
|
|
9
|
+
declare class CanvasTileLayerRenderer<LayerType extends import("../../layer/Tile.js").default<import("../../source/Tile.js").default> | import("../../layer/VectorTile.js").default<import("../../source.js").VectorTile<any>, any> = import("../../layer/Tile.js").default<import("../../source/Tile.js").default> | import("../../layer/VectorTile.js").default<import("../../source.js").VectorTile<any>, any>> extends CanvasLayerRenderer<LayerType> {
|
|
10
10
|
/**
|
|
11
11
|
* @param {LayerType} tileLayer Tile layer.
|
|
12
12
|
*/
|
|
@@ -28,7 +28,7 @@ import {toSize} from '../../size.js';
|
|
|
28
28
|
* @classdesc
|
|
29
29
|
* Canvas renderer for tile layers.
|
|
30
30
|
* @api
|
|
31
|
-
* @template {import("../../layer/Tile.js").default
|
|
31
|
+
* @template {import("../../layer/Tile.js").default|import("../../layer/VectorTile.js").default} [LayerType=import("../../layer/Tile.js").default<import("../../source/Tile.js").default>|import("../../layer/VectorTile.js").default]
|
|
32
32
|
* @extends {CanvasLayerRenderer<LayerType>}
|
|
33
33
|
*/
|
|
34
34
|
class CanvasTileLayerRenderer extends CanvasLayerRenderer {
|
|
@@ -8,7 +8,7 @@ declare class CanvasVectorImageLayerRenderer extends CanvasImageLayerRenderer {
|
|
|
8
8
|
/**
|
|
9
9
|
* @param {import("../../layer/VectorImage.js").default} layer Vector image layer.
|
|
10
10
|
*/
|
|
11
|
-
constructor(layer: import("../../layer/VectorImage.js").default
|
|
11
|
+
constructor(layer: import("../../layer/VectorImage.js").default);
|
|
12
12
|
/**
|
|
13
13
|
* @private
|
|
14
14
|
* @type {import("./VectorLayer.js").default}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorImageLayer.d.ts","sourceRoot":"","sources":["VectorImageLayer.js"],"names":[],"mappings":";AAcA;;;;GAIG;AACH;IACE;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"VectorImageLayer.d.ts","sourceRoot":"","sources":["VectorImageLayer.js"],"names":[],"mappings":";AAcA;;;;GAIG;AACH;IACE;;OAEG;IACH,mBAFW,OAAO,4BAA4B,EAAE,OAAO,EA4BtD;IAvBC;;;OAGG;IACH,wBAA2D;IAE3D;;;OAGG;IACH,yBAA6C;IAE7C;;;OAGG;IACH,0CAAiD;IAEjD;;;OAGG;IACH,4CAA+C;IAWjD;;;;OAIG;IACH,mBAHW,OAAO,gBAAgB,EAAE,KAAK,GAC7B,QAAQ,MAAM,OAAO,eAAe,EAAE,OAAO,CAAC,CAAC,CAW1D;IAgHD;OACG;IACH,kBAAc;IAEd;OACG;IACH,mBAAe;IAEf;OACG;IACH,wBAAoB;CAmCrB;qCAnOoC,iBAAiB"}
|
|
@@ -8,7 +8,7 @@ declare class CanvasVectorLayerRenderer extends CanvasLayerRenderer<any> {
|
|
|
8
8
|
/**
|
|
9
9
|
* @param {import("../../layer/BaseVector.js").default} vectorLayer Vector layer.
|
|
10
10
|
*/
|
|
11
|
-
constructor(vectorLayer: import("../../layer/BaseVector.js").default<any, any>);
|
|
11
|
+
constructor(vectorLayer: import("../../layer/BaseVector.js").default<any, any, any>);
|
|
12
12
|
/** @private */
|
|
13
13
|
private boundHandleStyleImageChange_;
|
|
14
14
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorLayer.d.ts","sourceRoot":"","sources":["VectorLayer.js"],"names":[],"mappings":";AA4CA;;;;GAIG;AACH;IACE;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"VectorLayer.d.ts","sourceRoot":"","sources":["VectorLayer.js"],"names":[],"mappings":";AA4CA;;;;GAIG;AACH;IACE;;OAEG;IACH,qFAqHC;IAlHC,eAAe;IACf,qCAA2E;IAE3E;;OAEG;IACH,yBAFU,OAAO,CAEW;IAE5B;;OAEG;IACH,wBAFU,SAAS,GAAC,IAAI,CAEU;IAElC;;;OAGG;IACH,iBAAqB;IAErB;;;OAGG;IACH,0BAA6B;IAE7B;;;OAGG;IACH,0BAA2B;IAE3B;;;OAGG;IACH,4BAA8B;IAE9B;;;OAGG;IACH,wBAAoC;IAEpC;;;OAGG;IACH,+BAA2C;IAE3C;;;OAGG;IACH,0BAAsB;IAEtB;;;OAGG;IACH,wBAA2B;IAE3B;;;OAGG;IACH,4BAA+B;IAE/B;;;OAGG;IACH,4BAA4B;IAE5B;;;OAGG;IACH,6BAAgC;IAEhC;;;OAGG;IACH,gCAA4B;IAE5B;;;OAGG;IACH,qBAAwB;IAExB;;;OAGG;IACH,oBAFU,OAAO,CAEa;IAE9B;;;OAGG;IACH,UAFU,OAAO,CAEG;IAEpB;;;OAGG;IACH,uBAA0B;IAE1B;;;OAGG;IACH,iBAAiB;IAGnB;;;;;OAKG;IACH,4BALW,aAAa,cACb,OAAO,cAAc,EAAE,UAAU,6CA4D3C;IAED;;OAEG;IACH,wBASC;IAED;;OAEG;IACH,0BAWC;IAED;;;OAGG;IACH,4BAFW,OAAO,cAAc,EAAE,UAAU,QAO3C;IAmFD;;;;;OAKG;IACH,mBAJW,OAAO,gBAAgB,EAAE,KAAK,GAC7B,QAAQ,MAAM,OAAO,eAAe,EAAE,OAAO,CAAC,CAAC,CA8F1D;IA4FD;;;;OAIG;IACH,gCAEC;IA0MD;;;;;;;;;OASG;IACH,uBATW,OAAO,kBAAkB,EAAE,OAAO,oBAClC,MAAM,UACN,OAAO,sBAAsB,EAAE,OAAO,GAAC,MAAM,OAAO,sBAAsB,EAAE,OAAO,CAAC,gBACpF,OAAO,qCAAqC,EAAE,OAAO,mIAIpD,OAAO,CA0ClB;CACF;gCAnyB6C,YAAY;0BAKnD,sCAAsC"}
|
|
@@ -3,13 +3,13 @@ export default CanvasVectorTileLayerRenderer;
|
|
|
3
3
|
* @classdesc
|
|
4
4
|
* Canvas renderer for vector tile layers.
|
|
5
5
|
* @api
|
|
6
|
-
* @extends {CanvasTileLayerRenderer<import("../../layer/VectorTile.js").default
|
|
6
|
+
* @extends {CanvasTileLayerRenderer<import("../../layer/VectorTile.js").default<import('../../source/VectorTile.js').default<import('../../Feature.js').FeatureLike>>>}
|
|
7
7
|
*/
|
|
8
|
-
declare class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer<import("../../layer/VectorTile.js").default<
|
|
8
|
+
declare class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer<import("../../layer/VectorTile.js").default<import("../../source/VectorTile.js").default<import("../../Feature.js").FeatureLike>, import("../../Feature.js").FeatureLike>> {
|
|
9
9
|
/**
|
|
10
10
|
* @param {import("../../layer/VectorTile.js").default} layer VectorTile layer.
|
|
11
11
|
*/
|
|
12
|
-
constructor(layer: import("../../layer/VectorTile.js").default
|
|
12
|
+
constructor(layer: import("../../layer/VectorTile.js").default);
|
|
13
13
|
/** @private */
|
|
14
14
|
private boundHandleStyleImageChange_;
|
|
15
15
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorTileLayer.d.ts","sourceRoot":"","sources":["VectorTileLayer.js"],"names":[],"mappings":";AA4DA;;;;;GAKG;AACH;IACE;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"VectorTileLayer.d.ts","sourceRoot":"","sources":["VectorTileLayer.js"],"names":[],"mappings":";AA4DA;;;;;GAKG;AACH;IACE;;OAEG;IACH,mBAFW,OAAO,2BAA2B,EAAE,OAAO,EA2CrD;IAtCC,eAAe;IACf,qCAA2E;IAE3E;;;OAGG;IACH,+BAA2B;IAE3B;;;OAGG;IACH,4CAA+C;IAE/C;;;OAGG;IACH,0BAAsB;IAEtB;;;OAGG;IACH,yBAAyB;IAEzB;;;OAGG;IACH,sBAAsC;IAEtC;;;OAGG;IACH,0BAA6B;IAG/B;;;;;OAKG;IACH,kBALW,OAAO,2BAA2B,EAAE,OAAO,cAC3C,MAAM,cACN,OAAO,uBAAuB,EAAE,OAAO,GACtC,OAAO,GAAC,SAAS,CAY5B;IAkCD;;;OAGG;IACH,qBAHW,OAAO,2BAA2B,EAAE,OAAO,GAC1C,OAAO,CAUlB;IAED;;OAEG;IACH,6BAEC;IAgBD;;;;;OAKG;IACH,6BAqHC;IAyND;;;;OAIG;IACH,gCAEC;IAED;;;;OAIG;IACH,4BAHW,OAAO,cAAc,EAAE,UAAU,cACjC,OAAO,sBAAsB,EAAE,KAAK,QAiC9C;IA0DD,6DA+BC;IAkID;;;;;;;;OAQG;IACH,uBARW,OAAO,kBAAkB,EAAE,WAAW,oBACtC,MAAM,UACN,OAAO,sBAAsB,EAAE,OAAO,GAAC,MAAM,OAAO,sBAAsB,EAAE,OAAO,CAAC,gBACpF,OAAO,qCAAqC,EAAE,OAAO,gEAGpD,OAAO,CAyClB;IAED;;;;OAIG;IACH,8BAcC;IAED;;;;OAIG;IACH,yBAwDC;CACF;oCAh6BmC,gBAAgB"}
|
|
@@ -62,7 +62,7 @@ const VECTOR_REPLAYS = {
|
|
|
62
62
|
* @classdesc
|
|
63
63
|
* Canvas renderer for vector tile layers.
|
|
64
64
|
* @api
|
|
65
|
-
* @extends {CanvasTileLayerRenderer<import("../../layer/VectorTile.js").default
|
|
65
|
+
* @extends {CanvasTileLayerRenderer<import("../../layer/VectorTile.js").default<import('../../source/VectorTile.js').default<import('../../Feature.js').FeatureLike>>>}
|
|
66
66
|
*/
|
|
67
67
|
class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer {
|
|
68
68
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default OGCVectorTile;
|
|
2
|
-
export type Options<FeatureType extends import("../Feature.js").FeatureLike> = {
|
|
2
|
+
export type Options<FeatureType extends import("../Feature.js").FeatureLike = import("../render/Feature.js").default> = {
|
|
3
3
|
/**
|
|
4
4
|
* URL to the OGC Vector Tileset endpoint.
|
|
5
5
|
*/
|
|
@@ -10,9 +10,9 @@ export type Options<FeatureType extends import("../Feature.js").FeatureLike> = {
|
|
|
10
10
|
*/
|
|
11
11
|
context?: any;
|
|
12
12
|
/**
|
|
13
|
-
* Feature
|
|
13
|
+
* Feature format for tiles. Used and required by the default.
|
|
14
14
|
*/
|
|
15
|
-
format
|
|
15
|
+
format?: import("../format/Feature.js").default<import("../format/Feature.js").FeatureToFeatureClass<FeatureType>> | undefined;
|
|
16
16
|
/**
|
|
17
17
|
* The content type for the tiles (e.g. "application/vnd.mapbox-vector-tile"). If not provided,
|
|
18
18
|
* the source will try to find a link with rel="item" that uses a vector type supported by the configured format.
|
|
@@ -70,12 +70,12 @@ export type Options<FeatureType extends import("../Feature.js").FeatureLike> = {
|
|
|
70
70
|
collections?: string[] | undefined;
|
|
71
71
|
};
|
|
72
72
|
/**
|
|
73
|
-
* @template {import("../Feature.js").FeatureLike} FeatureType
|
|
73
|
+
* @template {import("../Feature.js").FeatureLike} [FeatureType=import("../render/Feature.js").default]
|
|
74
74
|
* @typedef {Object} Options
|
|
75
75
|
* @property {string} url URL to the OGC Vector Tileset endpoint.
|
|
76
76
|
* @property {Object} [context] A lookup of values to use in the tile URL template. The `{tileMatrix}`
|
|
77
77
|
* (zoom level), `{tileRow}`, and `{tileCol}` variables in the URL will always be provided by the source.
|
|
78
|
-
* @property {import("../format/Feature.js").default<import(
|
|
78
|
+
* @property {import("../format/Feature.js").default<import("../format/Feature.js").FeatureToFeatureClass<FeatureType>>} [format] Feature format for tiles. Used and required by the default.
|
|
79
79
|
* @property {string} [mediaType] The content type for the tiles (e.g. "application/vnd.mapbox-vector-tile"). If not provided,
|
|
80
80
|
* the source will try to find a link with rel="item" that uses a vector type supported by the configured format.
|
|
81
81
|
* @property {import("./Source.js").AttributionLike} [attributions] Attributions.
|
|
@@ -112,10 +112,10 @@ export type Options<FeatureType extends import("../Feature.js").FeatureLike> = {
|
|
|
112
112
|
* which of the advertised media types is used. If you need to force the use of a particular media type, you can
|
|
113
113
|
* provide the `mediaType` option.
|
|
114
114
|
* @api
|
|
115
|
-
* @template {import("../Feature.js").FeatureLike} FeatureType
|
|
115
|
+
* @template {import("../Feature.js").FeatureLike} [FeatureType=import("../render/Feature.js").default]
|
|
116
116
|
* @extends {VectorTileSource<FeatureType>}
|
|
117
117
|
*/
|
|
118
|
-
declare class OGCVectorTile<FeatureType extends import("../Feature.js").FeatureLike> extends VectorTileSource<FeatureType> {
|
|
118
|
+
declare class OGCVectorTile<FeatureType extends import("../Feature.js").FeatureLike = import("../render/Feature.js").default> extends VectorTileSource<FeatureType> {
|
|
119
119
|
/**
|
|
120
120
|
* @param {Options<FeatureType>} options OGC vector tile options.
|
|
121
121
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OGCVectorTile.d.ts","sourceRoot":"","sources":["OGCVectorTile.js"],"names":[],"mappings":";;;;;SAWc,MAAM
|
|
1
|
+
{"version":3,"file":"OGCVectorTile.d.ts","sourceRoot":"","sources":["OGCVectorTile.js"],"names":[],"mappings":";;;;;SAWc,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAaN,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAhBjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH;;;;;;;;;;;;;;GAcG;AACH;IACE;;OAEG;IACH,qBAFW,QAAQ,WAAW,CAAC,EA6B9B;IAED;;;OAGG;IACH,2BAIC;IAED;;;OAGG;IACH,qBAGC;CACF;6BAtG4B,iBAAiB"}
|
package/source/OGCVectorTile.js
CHANGED
|
@@ -7,12 +7,12 @@ import {getTileSetInfo} from './ogcTileUtil.js';
|
|
|
7
7
|
import {error as logError} from '../console.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* @template {import("../Feature.js").FeatureLike} FeatureType
|
|
10
|
+
* @template {import("../Feature.js").FeatureLike} [FeatureType=import("../render/Feature.js").default]
|
|
11
11
|
* @typedef {Object} Options
|
|
12
12
|
* @property {string} url URL to the OGC Vector Tileset endpoint.
|
|
13
13
|
* @property {Object} [context] A lookup of values to use in the tile URL template. The `{tileMatrix}`
|
|
14
14
|
* (zoom level), `{tileRow}`, and `{tileCol}` variables in the URL will always be provided by the source.
|
|
15
|
-
* @property {import("../format/Feature.js").default<import(
|
|
15
|
+
* @property {import("../format/Feature.js").default<import("../format/Feature.js").FeatureToFeatureClass<FeatureType>>} [format] Feature format for tiles. Used and required by the default.
|
|
16
16
|
* @property {string} [mediaType] The content type for the tiles (e.g. "application/vnd.mapbox-vector-tile"). If not provided,
|
|
17
17
|
* the source will try to find a link with rel="item" that uses a vector type supported by the configured format.
|
|
18
18
|
* @property {import("./Source.js").AttributionLike} [attributions] Attributions.
|
|
@@ -50,7 +50,7 @@ import {error as logError} from '../console.js';
|
|
|
50
50
|
* which of the advertised media types is used. If you need to force the use of a particular media type, you can
|
|
51
51
|
* provide the `mediaType` option.
|
|
52
52
|
* @api
|
|
53
|
-
* @template {import("../Feature.js").FeatureLike} FeatureType
|
|
53
|
+
* @template {import("../Feature.js").FeatureLike} [FeatureType=import("../render/Feature.js").default]
|
|
54
54
|
* @extends {VectorTileSource<FeatureType>}
|
|
55
55
|
*/
|
|
56
56
|
class OGCVectorTile extends VectorTileSource {
|
package/source/SentinelHub.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export type AccessTokenClaims = {
|
|
|
41
41
|
*/
|
|
42
42
|
exp: number;
|
|
43
43
|
};
|
|
44
|
-
export type
|
|
44
|
+
export type Evalscript = {
|
|
45
45
|
/**
|
|
46
46
|
* The setup function.
|
|
47
47
|
*/
|
|
@@ -343,10 +343,10 @@ export type Options = {
|
|
|
343
343
|
data?: ProcessRequestInputDataItem[] | undefined;
|
|
344
344
|
/**
|
|
345
345
|
* The process applied to the input data. If not provided in the constructor,
|
|
346
|
-
* the source will not be rendered until {@link module :ol/source/SentinelHub~SentinelHub#
|
|
347
|
-
* `
|
|
346
|
+
* the source will not be rendered until {@link module :ol/source/SentinelHub~SentinelHub#setEvalscript} is called. See the
|
|
347
|
+
* `setEvalscript` documentation for details on the restrictions when passing process functions.
|
|
348
348
|
*/
|
|
349
|
-
|
|
349
|
+
evalscript?: string | Evalscript | undefined;
|
|
350
350
|
/**
|
|
351
351
|
* The pixel width and height of the source tiles.
|
|
352
352
|
*/
|
|
@@ -390,9 +390,9 @@ export type Options = {
|
|
|
390
390
|
* is called.
|
|
391
391
|
* @property {Array<ProcessRequestInputDataItem>} [data] The input data configuration. If not provided in the constructor,
|
|
392
392
|
* the source will not be rendered until {@link module:ol/source/SentinelHub~SentinelHub#setData} is called.
|
|
393
|
-
* @property {
|
|
394
|
-
* the source will not be rendered until {@link module:ol/source/SentinelHub~SentinelHub#
|
|
395
|
-
* `
|
|
393
|
+
* @property {Evalscript|string} [evalscript] The process applied to the input data. If not provided in the constructor,
|
|
394
|
+
* the source will not be rendered until {@link module:ol/source/SentinelHub~SentinelHub#setEvalscript} is called. See the
|
|
395
|
+
* `setEvalscript` documentation for details on the restrictions when passing process functions.
|
|
396
396
|
* @property {number|import("../size.js").Size} [tileSize=[512, 512]] The pixel width and height of the source tiles.
|
|
397
397
|
* @property {string} [url='https://services.sentinel-hub.com/api/v1/process'] The Sentinel Hub Processing API URL.
|
|
398
398
|
* @property {boolean} [opaque=false] Whether the layer is opaque.
|
|
@@ -408,8 +408,8 @@ export type Options = {
|
|
|
408
408
|
* @classdesc
|
|
409
409
|
* A tile source that generates tiles using the Sentinel Hub [Processing API](https://docs.sentinel-hub.com/api/latest/api/process/).
|
|
410
410
|
* All of the constructor options are optional, however the source will not be ready for rendering until the `auth`, `data`,
|
|
411
|
-
* and `
|
|
412
|
-
* {@link module:ol/source/SentinelHub~SentinelHub#setData}, and {@link module:ol/source/SentinelHub~SentinelHub#
|
|
411
|
+
* and `evalscript` properties are provided. These can be set after construction with the {@link module:ol/source/SentinelHub~SentinelHub#setAuth},
|
|
412
|
+
* {@link module:ol/source/SentinelHub~SentinelHub#setData}, and {@link module:ol/source/SentinelHub~SentinelHub#setEvalscript}
|
|
413
413
|
* methods.
|
|
414
414
|
*
|
|
415
415
|
* If there are errors while configuring the source or fetching an access token, the `change` event will be fired and the
|
|
@@ -474,10 +474,10 @@ declare class SentinelHub extends DataTileSource {
|
|
|
474
474
|
* they cannot refer to other variables or functions that are not provided by the Processing API
|
|
475
475
|
* context.
|
|
476
476
|
*
|
|
477
|
-
* @param {
|
|
477
|
+
* @param {Evalscript|string} evalscript The process to apply to the input data.
|
|
478
478
|
* @api
|
|
479
479
|
*/
|
|
480
|
-
|
|
480
|
+
setEvalscript(evalscript: Evalscript | string): void;
|
|
481
481
|
fireWhenReady_(): void;
|
|
482
482
|
/**
|
|
483
483
|
* @param {number} z The z tile index.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SentinelHub.d.ts","sourceRoot":"","sources":["SentinelHub.js"],"names":[],"mappings":"AA+QA;;;GAGG;AACH,wCAHW,MAAM,GACL,iBAAiB,CAiB5B;AAED;;;;;;GAMG;AACH,oDAHW,OAAO,uBAAuB,EAAE,OAAO,GACtC,MAAM,CAiBjB;AAED;;;;;;;GAOG;AACH,wCAJW,MAAM,QACN,WAAS,SAAS,GACjB,MAAM,CAgBjB;;;;;;;;;;cAzTa,MAAM;;;;kBACN,MAAM;;;;;;SAKN,MAAM;;;;;;WAKN,KAAK;;;;mBACL,aAAa;;;;;;;;;;;;;;;;;;0BAQF,WAAW;mCAId,MAAM,GAAC,MAAM,MAAM,CAAC,QAAE,MAAM,QAAE,aAAa,QAAE,UAAU,QAAE,cAAc,KAAG,YAAY,GAAC,MAAM,MAAM,CAAC,GAAC,IAAI;;QAIlG,MAAM,GAAE,wBAAwB;MAAI,IAAI;0CAI/C,MAAM,QAAE,aAAa,QAAE,cAAc,KAAG,IAAI;;;;;WAKpD,MAAM,MAAM,CAAC,GAAC,MAAM,gBAAgB,CAAC;;;;YACrC,iBAAiB,GAAC,MAAM,iBAAiB,CAAC;;;;;;;;;;WAM1C,MAAM,MAAM,CAAC;;;;;;;;;;;;;;;;;;WAQb,MAAM;;;;;;;;;;;;;;WAON,MAAM;;yBAIP,MAAM,GAAC,OAAO,GAAC,OAAO,GAAC,QAAQ,GAAC,SAAS,GAAC,MAAM;;QAIzC,MAAM,GAAE,MAAM;;;;;;;;;;;;;;YAOpB,MAAM;;;;;;;;;;;;;;;;cAWN,MAAM;;;;YACN,MAAM;;;;;;;;;;UAMN,MAAM;;;;mBACN,MAAM;;;;cACN,MAAM;;;;UACN,MAAM;;;;;;oBAKN,MAAM;;;;yBACN,MAAM;;;QAIA,MAAM,GAAE,OAAO;;;;;;;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,mBAAsB;IAEtB;;;OAGG;IACH,oBAAkD;IAElD;;;OAGG;IACH,eAAgB;IAEhB;;;OAGG;IACH,wBAAoB;IAetB;;;;;;;OAOG;IACH,cAHW,UAAU,GAAC,MAAM,iBAmC3B;IAED;;;;;OAKG;IACH,cAHW,MAAM,2BAA2B,CAAC,QAM5C;IAED;;;;;;;;;OASG;IACH,0BAHW,UAAU,GAAC,MAAM,QAkB3B;IAED,uBAUC;IAED;;;;;;OAMG;IACH,kBA2CC;IAED;;;;;;;;;;;;;OAaG;IACH,YAHY,KAAK,GAAC,IAAI,CAKrB;CAMF;2BAjmB0B,eAAe"}
|
package/source/SentinelHub.js
CHANGED
|
@@ -33,7 +33,7 @@ const defaultTileSize = [512, 512];
|
|
|
33
33
|
*/
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
* @typedef {Object}
|
|
36
|
+
* @typedef {Object} Evalscript
|
|
37
37
|
* @property {Setup} setup The setup function.
|
|
38
38
|
* @property {EvaluatePixel} evaluatePixel The function to transform input samples into output values.
|
|
39
39
|
* @property {UpdateOutput} [updateOutput] Optional function to adjust the output bands.
|
|
@@ -206,15 +206,15 @@ const defaultTileSize = [512, 512];
|
|
|
206
206
|
*/
|
|
207
207
|
|
|
208
208
|
/**
|
|
209
|
-
* @param {
|
|
210
|
-
* @return {string} The serialized
|
|
209
|
+
* @param {Evalscript} evalscript The object to serialize.
|
|
210
|
+
* @return {string} The serialized Evalscript.
|
|
211
211
|
*/
|
|
212
|
-
function
|
|
213
|
-
const version =
|
|
212
|
+
function serializeEvalscript(evalscript) {
|
|
213
|
+
const version = evalscript.version || defaultEvalscriptVersion;
|
|
214
214
|
return `//VERSION=${version}
|
|
215
|
-
${serializeFunction('setup',
|
|
216
|
-
${serializeFunction('evaluatePixel',
|
|
217
|
-
${serializeFunction('updateOutput',
|
|
215
|
+
${serializeFunction('setup', evalscript.setup)}
|
|
216
|
+
${serializeFunction('evaluatePixel', evalscript.evaluatePixel)}
|
|
217
|
+
${serializeFunction('updateOutput', evalscript.updateOutput)}
|
|
218
218
|
`;
|
|
219
219
|
}
|
|
220
220
|
|
|
@@ -346,9 +346,9 @@ export function serializeFunction(name, func) {
|
|
|
346
346
|
* is called.
|
|
347
347
|
* @property {Array<ProcessRequestInputDataItem>} [data] The input data configuration. If not provided in the constructor,
|
|
348
348
|
* the source will not be rendered until {@link module:ol/source/SentinelHub~SentinelHub#setData} is called.
|
|
349
|
-
* @property {
|
|
350
|
-
* the source will not be rendered until {@link module:ol/source/SentinelHub~SentinelHub#
|
|
351
|
-
* `
|
|
349
|
+
* @property {Evalscript|string} [evalscript] The process applied to the input data. If not provided in the constructor,
|
|
350
|
+
* the source will not be rendered until {@link module:ol/source/SentinelHub~SentinelHub#setEvalscript} is called. See the
|
|
351
|
+
* `setEvalscript` documentation for details on the restrictions when passing process functions.
|
|
352
352
|
* @property {number|import("../size.js").Size} [tileSize=[512, 512]] The pixel width and height of the source tiles.
|
|
353
353
|
* @property {string} [url='https://services.sentinel-hub.com/api/v1/process'] The Sentinel Hub Processing API URL.
|
|
354
354
|
* @property {boolean} [opaque=false] Whether the layer is opaque.
|
|
@@ -365,8 +365,8 @@ export function serializeFunction(name, func) {
|
|
|
365
365
|
* @classdesc
|
|
366
366
|
* A tile source that generates tiles using the Sentinel Hub [Processing API](https://docs.sentinel-hub.com/api/latest/api/process/).
|
|
367
367
|
* All of the constructor options are optional, however the source will not be ready for rendering until the `auth`, `data`,
|
|
368
|
-
* and `
|
|
369
|
-
* {@link module:ol/source/SentinelHub~SentinelHub#setData}, and {@link module:ol/source/SentinelHub~SentinelHub#
|
|
368
|
+
* and `evalscript` properties are provided. These can be set after construction with the {@link module:ol/source/SentinelHub~SentinelHub#setAuth},
|
|
369
|
+
* {@link module:ol/source/SentinelHub~SentinelHub#setData}, and {@link module:ol/source/SentinelHub~SentinelHub#setEvalscript}
|
|
370
370
|
* methods.
|
|
371
371
|
*
|
|
372
372
|
* If there are errors while configuring the source or fetching an access token, the `change` event will be fired and the
|
|
@@ -440,8 +440,8 @@ class SentinelHub extends DataTileSource {
|
|
|
440
440
|
this.setData(config.data);
|
|
441
441
|
}
|
|
442
442
|
|
|
443
|
-
if (config.
|
|
444
|
-
this.
|
|
443
|
+
if (config.evalscript) {
|
|
444
|
+
this.setEvalscript(config.evalscript);
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
447
|
|
|
@@ -505,16 +505,16 @@ class SentinelHub extends DataTileSource {
|
|
|
505
505
|
* they cannot refer to other variables or functions that are not provided by the Processing API
|
|
506
506
|
* context.
|
|
507
507
|
*
|
|
508
|
-
* @param {
|
|
508
|
+
* @param {Evalscript|string} evalscript The process to apply to the input data.
|
|
509
509
|
* @api
|
|
510
510
|
*/
|
|
511
|
-
|
|
511
|
+
setEvalscript(evalscript) {
|
|
512
512
|
let script;
|
|
513
|
-
if (typeof
|
|
514
|
-
script =
|
|
513
|
+
if (typeof evalscript === 'string') {
|
|
514
|
+
script = evalscript;
|
|
515
515
|
} else {
|
|
516
516
|
try {
|
|
517
|
-
script =
|
|
517
|
+
script = serializeEvalscript(evalscript);
|
|
518
518
|
} catch (error) {
|
|
519
519
|
this.error_ = error;
|
|
520
520
|
this.setState('error');
|