ol 9.2.2-dev.1715952885334 → 9.2.2-dev.1716040825122
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/VectorTile.d.ts +3 -3
- package/VectorTile.d.ts.map +1 -1
- package/VectorTile.js +2 -2
- package/dist/ol.js +1 -1
- package/dist/ol.js.map +1 -1
- package/featureloader.d.ts +2 -2
- package/featureloader.d.ts.map +1 -1
- package/featureloader.js +1 -1
- package/format/Feature.d.ts +13 -13
- package/format/Feature.d.ts.map +1 -1
- package/format/Feature.js +7 -7
- package/format/MVT.d.ts +0 -5
- package/format/MVT.d.ts.map +1 -1
- package/format/MVT.js +5 -9
- package/layer/Vector.d.ts +157 -2
- package/layer/Vector.d.ts.map +1 -1
- package/layer/Vector.js +51 -1
- package/layer/VectorTile.d.ts +133 -7
- package/layer/VectorTile.d.ts.map +1 -1
- package/layer/VectorTile.js +8 -11
- package/package.json +1 -1
- package/source/Cluster.d.ts +2 -2
- package/source/Cluster.d.ts.map +1 -1
- package/source/Cluster.js +3 -2
- package/source/OGCVectorTile.d.ts +9 -6
- package/source/OGCVectorTile.d.ts.map +1 -1
- package/source/OGCVectorTile.js +5 -2
- package/source/Vector.d.ts.map +1 -1
- package/source/Vector.js +1 -4
- package/source/VectorTile.d.ts +4 -4
- package/source/VectorTile.d.ts.map +1 -1
- package/source/VectorTile.js +2 -2
- package/util.js +1 -1
package/featureloader.d.ts
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
/**
|
|
37
37
|
* @template {import("./Feature.js").FeatureLike} [FeatureType=import("./Feature.js").FeatureLike]
|
|
38
38
|
* @param {string|FeatureUrlFunction} url Feature URL service.
|
|
39
|
-
* @param {import("./format/Feature.js").default} format Feature format.
|
|
39
|
+
* @param {import("./format/Feature.js").default<import('./format/Feature.js').FeatureToFeatureClass<FeatureType>>} format Feature format.
|
|
40
40
|
* @param {import("./extent.js").Extent} extent Extent.
|
|
41
41
|
* @param {number} resolution Resolution.
|
|
42
42
|
* @param {import("./proj/Projection.js").default} projection Projection.
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
* @param {function(): void} failure Failure
|
|
46
46
|
* Function called when loading failed.
|
|
47
47
|
*/
|
|
48
|
-
export function loadFeaturesXhr<FeatureType extends import("./Feature.js").FeatureLike = import("./Feature.js").FeatureLike>(url: string | FeatureUrlFunction, format: import("./format/Feature.js").default
|
|
48
|
+
export function loadFeaturesXhr<FeatureType extends import("./Feature.js").FeatureLike = import("./Feature.js").FeatureLike>(url: string | FeatureUrlFunction, format: import("./format/Feature.js").default<import("./format/Feature.js").FeatureToFeatureClass<FeatureType>>, extent: import("./extent.js").Extent, resolution: number, projection: import("./proj/Projection.js").default, success: (arg0: FeatureType[], arg1: import("./proj/Projection.js").default) => void, failure: () => void): void;
|
|
49
49
|
/**
|
|
50
50
|
* Create an XHR feature loader for a `url` and `format`. The feature loader
|
|
51
51
|
* loads features (with XHR), parses the features, and adds them to the
|
package/featureloader.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"featureloader.d.ts","sourceRoot":"","sources":["featureloader.js"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH;;;;;;;;;;GAUG;AAEH;;;;;;;;;;;GAWG;AACH,kIAVW,MAAM,GAAC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"featureloader.d.ts","sourceRoot":"","sources":["featureloader.js"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH;;;;;;;;;;GAUG;AAEH;;;;;;;;;;;GAWG;AACH,kIAVW,MAAM,GAAC,kBAAkB,2HAEzB,OAAO,aAAa,EAAE,MAAM,cAC5B,MAAM,cACN,OAAO,sBAAsB,EAAE,OAAO,uCACT,OAAO,sBAAsB,EAAE,OAAO,KAAG,IAAI,iBAE9D,IAAI,QAkE1B;AAED;;;;;;;;;GASG;AACH,sHALW,MAAM,GAAC,kBAAkB,+IAsCnC;AAED;;;;;;GAMG;AACH,uDAJW,OAAO,QAMjB;;;;;;;;;;;;;;;;0JAxJ0B,CAAC,OAAO,iBAAiB,EAAE,OAAO,GAAC,OAAO,iBAAiB,EAAE,OAAO,CAAC,QAC/F,OAAmB,aAAa,EAAE,MAAM,QACxC,MAAkB,QAClB,OAAmB,sBAAsB,EAAE,OAAO,gBAC7B,MAAM,WAAW,CAAC,KAAG,IAAI,4BACtB,IAAI,kBAAI,IAAI;;;;;;;;;;wCAYf,OAAO,aAAa,EAAE,MAAM,QAAE,MAAM,QAAE,OAAO,sBAAsB,EAAE,OAAO,KAAG,MAAM"}
|
package/featureloader.js
CHANGED
|
@@ -50,7 +50,7 @@ let withCredentials = false;
|
|
|
50
50
|
/**
|
|
51
51
|
* @template {import("./Feature.js").FeatureLike} [FeatureType=import("./Feature.js").FeatureLike]
|
|
52
52
|
* @param {string|FeatureUrlFunction} url Feature URL service.
|
|
53
|
-
* @param {import("./format/Feature.js").default} format Feature format.
|
|
53
|
+
* @param {import("./format/Feature.js").default<import('./format/Feature.js').FeatureToFeatureClass<FeatureType>>} format Feature format.
|
|
54
54
|
* @param {import("./extent.js").Extent} extent Extent.
|
|
55
55
|
* @param {number} resolution Resolution.
|
|
56
56
|
* @param {import("./proj/Projection.js").default} projection Projection.
|
package/format/Feature.d.ts
CHANGED
|
@@ -121,13 +121,13 @@ export type FeatureObject = {
|
|
|
121
121
|
} | undefined;
|
|
122
122
|
};
|
|
123
123
|
/**
|
|
124
|
-
*
|
|
124
|
+
* *
|
|
125
125
|
*/
|
|
126
|
-
export type FeatureToFeatureClass<T extends import("../
|
|
126
|
+
export type FeatureToFeatureClass<T extends Feature<import("../geom.js").Geometry> | RenderFeature> = T extends RenderFeature ? typeof RenderFeature : typeof Feature;
|
|
127
127
|
/**
|
|
128
|
-
*
|
|
128
|
+
* *
|
|
129
129
|
*/
|
|
130
|
-
export type FeatureClassToFeature<T extends import("../Feature.js").FeatureClass> = T[keyof T] extends
|
|
130
|
+
export type FeatureClassToFeature<T extends import("../Feature.js").FeatureClass> = T[keyof T] extends RenderFeature ? RenderFeature : Feature;
|
|
131
131
|
import RenderFeature from '../render/Feature.js';
|
|
132
132
|
/**
|
|
133
133
|
* @typedef {Object} ReadOptions
|
|
@@ -191,12 +191,12 @@ import RenderFeature from '../render/Feature.js';
|
|
|
191
191
|
* @property {Object<string, *>} [properties] Properties.
|
|
192
192
|
*/
|
|
193
193
|
/***
|
|
194
|
-
* @template {
|
|
195
|
-
* @typedef {T extends
|
|
194
|
+
* @template {Feature|RenderFeature} T
|
|
195
|
+
* @typedef {T extends RenderFeature ? typeof RenderFeature : typeof Feature} FeatureToFeatureClass
|
|
196
196
|
*/
|
|
197
197
|
/***
|
|
198
198
|
* @template {import("../Feature.js").FeatureClass} T
|
|
199
|
-
* @typedef {T[keyof T] extends
|
|
199
|
+
* @typedef {T[keyof T] extends RenderFeature ? RenderFeature : Feature} FeatureClassToFeature
|
|
200
200
|
*/
|
|
201
201
|
/**
|
|
202
202
|
* @classdesc
|
|
@@ -224,9 +224,9 @@ declare class FeatureFormat<T extends import("../Feature.js").FeatureClass = typ
|
|
|
224
224
|
protected defaultFeatureProjection: import("../proj/Projection.js").default | undefined;
|
|
225
225
|
/**
|
|
226
226
|
* @protected
|
|
227
|
-
* @type {
|
|
227
|
+
* @type {T}
|
|
228
228
|
*/
|
|
229
|
-
protected featureClass:
|
|
229
|
+
protected featureClass: T;
|
|
230
230
|
/**
|
|
231
231
|
* A list media types supported by the format in descending order of preference.
|
|
232
232
|
* @type {Array<string>}
|
|
@@ -294,20 +294,20 @@ declare class FeatureFormat<T extends import("../Feature.js").FeatureClass = typ
|
|
|
294
294
|
* Encode a feature in this format.
|
|
295
295
|
*
|
|
296
296
|
* @abstract
|
|
297
|
-
* @param {
|
|
297
|
+
* @param {Feature} feature Feature.
|
|
298
298
|
* @param {WriteOptions} [options] Write options.
|
|
299
299
|
* @return {string|ArrayBuffer} Result.
|
|
300
300
|
*/
|
|
301
|
-
writeFeature(feature:
|
|
301
|
+
writeFeature(feature: Feature, options?: WriteOptions | undefined): string | ArrayBuffer;
|
|
302
302
|
/**
|
|
303
303
|
* Encode an array of features in this format.
|
|
304
304
|
*
|
|
305
305
|
* @abstract
|
|
306
|
-
* @param {Array<
|
|
306
|
+
* @param {Array<Feature>} features Features.
|
|
307
307
|
* @param {WriteOptions} [options] Write options.
|
|
308
308
|
* @return {string|ArrayBuffer} Result.
|
|
309
309
|
*/
|
|
310
|
-
writeFeatures(features: Array<
|
|
310
|
+
writeFeatures(features: Array<Feature>, options?: WriteOptions | undefined): string | ArrayBuffer;
|
|
311
311
|
/**
|
|
312
312
|
* Write a single geometry in this format.
|
|
313
313
|
*
|
package/format/Feature.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Feature.d.ts","sourceRoot":"","sources":["Feature.js"],"names":[],"mappings":"AAgSA;;;;;;GAMG;AACH,0HAJW,OAAO,uDAkDjB;AAED;;;;GAIG;AACH,mDAJW,OAAO,cAAc,EAAE,MAAM,sCAE5B,OAAO,cAAc,EAAE,MAAM,CAgBxC;AA2BD;;;;GAIG;AACH,4CAJW,aAAa,qDAEZ,aAAa,GAAC,MAAM,aAAa,CAAC,CAkC7C;AAED;;;;GAIG;AACH,uCAJW,cAAc,GAAC,IAAI,qDAElB,OAAO,qBAAqB,EAAE,OAAO,CAkBhD;;;;;;;;;;qBAnaa,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;wBASnC,OAAO,YAAY,EAAE,cAAc;;;;;;;;;qBAOnC,OAAO,YAAY,EAAE,cAAc;;;;;;wBAInC,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;mBAoBpC,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK;;;;;UAKtC,OAAO,qBAAqB,EAAE,IAAI;;;;qBAClC,MAAM,MAAM,CAAC;;;;;;;;;;uCAMd,MAAM,cAAc,CAAC;6BAIrB,oBAAoB,mBAAyB;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Feature.d.ts","sourceRoot":"","sources":["Feature.js"],"names":[],"mappings":"AAgSA;;;;;;GAMG;AACH,0HAJW,OAAO,uDAkDjB;AAED;;;;GAIG;AACH,mDAJW,OAAO,cAAc,EAAE,MAAM,sCAE5B,OAAO,cAAc,EAAE,MAAM,CAgBxC;AA2BD;;;;GAIG;AACH,4CAJW,aAAa,qDAEZ,aAAa,GAAC,MAAM,aAAa,CAAC,CAkC7C;AAED;;;;GAIG;AACH,uCAJW,cAAc,GAAC,IAAI,qDAElB,OAAO,qBAAqB,EAAE,OAAO,CAkBhD;;;;;;;;;;qBAnaa,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;wBASnC,OAAO,YAAY,EAAE,cAAc;;;;;;;;;qBAOnC,OAAO,YAAY,EAAE,cAAc;;;;;;wBAInC,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;mBAoBpC,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK;;;;;UAKtC,OAAO,qBAAqB,EAAE,IAAI;;;;qBAClC,MAAM,MAAM,CAAC;;;;;;;;;;uCAMd,MAAM,cAAc,CAAC;6BAIrB,oBAAoB,mBAAyB;;;;;;;;;;;;;;;;;;;;sGAY7C,CAAC,SAAS,aAAa,GAAG,oBAAoB,GAAG,cAAc;;;;oFAK/D,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,GAAG,OAAO;0BAnG7C,sBAAsB;AAwBhD;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH;;GAEG;AAEH;;;;;;GAMG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;;;;GAKG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;;;;;;;;;;GAYG;AACH;IAEI;;;OAGG;IACH,0BAFU,OAAO,uBAAuB,EAAE,OAAO,GAAC,SAAS,CAE5B;IAE/B;;;OAGG;IACH,oCAFU,OAAO,uBAAuB,EAAE,OAAO,GAAC,SAAS,CAElB;IAEzC;;;OAGG;IACH,wBAFU,CAAC,CAEmC;IAE9C;;;OAGG;IACH,qBAFU,MAAM,MAAM,CAAC,CAEQ;IAGjC;;;;;;OAMG;IACH,iCALW,QAAQ,GAAC,OAAO,SAAQ,MAAM,sCAE7B,WAAW,GAAC,SAAS,CAsBhC;IAED;;;;;;;;OAQG;IACH,gCANW,YAAY,GAAC,WAAW,GAAC,SAAS,GAGjC,YAAY,GAAC,WAAW,GAAC,SAAS,CAY7C;IAED;;;OAGG;IACH,WAFY,IAAI,CAIf;IAED;;;;;;;OAOG;IACH,oBAJW,QAAQ,GAAC,OAAO,SAAQ,MAAM,sCAE7B,OAAO,eAAe,EAAE,WAAW,GAAC,MAAM,OAAO,sBAAsB,EAAE,OAAO,CAAC,CAI5F;IAED;;;;;;;OAOG;IACH,qBAJW,QAAQ,GAAC,OAAO,GAAC,WAAW,SAAQ,MAAM,sCAEzC,MAAM,OAAO,eAAe,EAAE,WAAW,GAAC,sBAAsB,CAAC,CAAC,CAAC,CAI9E;IAED;;;;;;;OAOG;IACH,qBAJW,QAAQ,GAAC,OAAO,SAAQ,MAAM,sCAE7B,OAAO,qBAAqB,EAAE,OAAO,CAIhD;IAED;;;;;;OAMG;IACH,uBAHW,QAAQ,GAAC,OAAO,SAAQ,MAAM,GAC7B,OAAO,uBAAuB,EAAE,OAAO,GAAC,SAAS,CAI5D;IAED;;;;;;;OAOG;IACH,sBAJW,OAAO,uCAEN,MAAM,GAAC,WAAW,CAI7B;IAED;;;;;;;OAOG;IACH,wBAJW,MAAM,OAAO,CAAC,uCAEb,MAAM,GAAC,WAAW,CAI7B;IAED;;;;;;;OAOG;IACH,wBAJW,OAAO,qBAAqB,EAAE,OAAO,uCAEpC,MAAM,GAAC,WAAW,CAI7B;CACF;oBAzRmB,eAAe"}
|
package/format/Feature.js
CHANGED
|
@@ -95,13 +95,13 @@ import {
|
|
|
95
95
|
*/
|
|
96
96
|
|
|
97
97
|
/***
|
|
98
|
-
* @template {
|
|
99
|
-
* @typedef {T extends
|
|
98
|
+
* @template {Feature|RenderFeature} T
|
|
99
|
+
* @typedef {T extends RenderFeature ? typeof RenderFeature : typeof Feature} FeatureToFeatureClass
|
|
100
100
|
*/
|
|
101
101
|
|
|
102
102
|
/***
|
|
103
103
|
* @template {import("../Feature.js").FeatureClass} T
|
|
104
|
-
* @typedef {T[keyof T] extends
|
|
104
|
+
* @typedef {T[keyof T] extends RenderFeature ? RenderFeature : Feature} FeatureClassToFeature
|
|
105
105
|
*/
|
|
106
106
|
|
|
107
107
|
/**
|
|
@@ -133,9 +133,9 @@ class FeatureFormat {
|
|
|
133
133
|
|
|
134
134
|
/**
|
|
135
135
|
* @protected
|
|
136
|
-
* @type {
|
|
136
|
+
* @type {T}
|
|
137
137
|
*/
|
|
138
|
-
this.featureClass = Feature;
|
|
138
|
+
this.featureClass = /** @type {T} */ (Feature);
|
|
139
139
|
|
|
140
140
|
/**
|
|
141
141
|
* A list media types supported by the format in descending order of preference.
|
|
@@ -251,7 +251,7 @@ class FeatureFormat {
|
|
|
251
251
|
* Encode a feature in this format.
|
|
252
252
|
*
|
|
253
253
|
* @abstract
|
|
254
|
-
* @param {
|
|
254
|
+
* @param {Feature} feature Feature.
|
|
255
255
|
* @param {WriteOptions} [options] Write options.
|
|
256
256
|
* @return {string|ArrayBuffer} Result.
|
|
257
257
|
*/
|
|
@@ -263,7 +263,7 @@ class FeatureFormat {
|
|
|
263
263
|
* Encode an array of features in this format.
|
|
264
264
|
*
|
|
265
265
|
* @abstract
|
|
266
|
-
* @param {Array<
|
|
266
|
+
* @param {Array<Feature>} features Features.
|
|
267
267
|
* @param {WriteOptions} [options] Write options.
|
|
268
268
|
* @return {string|ArrayBuffer} Result.
|
|
269
269
|
*/
|
package/format/MVT.d.ts
CHANGED
|
@@ -51,11 +51,6 @@ declare class MVT<T extends import("../Feature.js").FeatureClass = typeof Render
|
|
|
51
51
|
* @param {Options<T>} [options] Options.
|
|
52
52
|
*/
|
|
53
53
|
constructor(options?: Options<T> | undefined);
|
|
54
|
-
/**
|
|
55
|
-
* @private
|
|
56
|
-
* @type {import("../Feature.js").FeatureClass}
|
|
57
|
-
*/
|
|
58
|
-
private featureClass_;
|
|
59
54
|
/**
|
|
60
55
|
* @private
|
|
61
56
|
* @type {string|undefined}
|
package/format/MVT.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MVT.d.ts","sourceRoot":"","sources":["MVT.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA;;;;;;;;;;;;GAYG;AAEH;;;;;;;GAOG;AACH;IACE;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"MVT.d.ts","sourceRoot":"","sources":["MVT.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA;;;;;;;;;;;;GAYG;AAEH;;;;;;;GAOG;AACH;IACE;;OAEG;IACH,8CA6CC;IA5BC;;;OAGG;IACH,sBAAyC;IAEzC;;;OAGG;IACH,mBAAiE;IAEjE;;;OAGG;IACH,gBAAqD;IAErD;;;OAGG;IACH,oBAAqC;IAQvC;;;;;;;;OAQG;IACH,yBAoDC;IAED;;;;;;OAMG;IACH,uBAuEC;IASD;;;;;;;OAOG;IACH,qBALW,WAAW,6DAEV,MAAM,OAAO,cAAc,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAkCjE;IAED;;;;;;OAMG;IACH,uBAJW,QAAQ,GAAC,OAAO,SAAQ,MAAM,GAC7B,OAAO,uBAAuB,EAAE,OAAO,CAKlD;IAED;;;;OAIG;IACH,kBAHW,MAAM,MAAM,CAAC,QAKvB;CACF;0BA/RyB,sBAAsB;0BATU,cAAc"}
|
package/format/MVT.js
CHANGED
|
@@ -55,13 +55,9 @@ class MVT extends FeatureFormat {
|
|
|
55
55
|
units: 'tile-pixels',
|
|
56
56
|
});
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
* @private
|
|
60
|
-
* @type {import("../Feature.js").FeatureClass}
|
|
61
|
-
*/
|
|
62
|
-
this.featureClass_ = options.featureClass
|
|
58
|
+
this.featureClass = options.featureClass
|
|
63
59
|
? options.featureClass
|
|
64
|
-
: RenderFeature;
|
|
60
|
+
: /** @type {T} */ (RenderFeature);
|
|
65
61
|
|
|
66
62
|
/**
|
|
67
63
|
* @private
|
|
@@ -188,8 +184,8 @@ class MVT extends FeatureFormat {
|
|
|
188
184
|
|
|
189
185
|
const geometryType = getGeometryType(type, ends.length);
|
|
190
186
|
|
|
191
|
-
if (this.
|
|
192
|
-
feature = new this.
|
|
187
|
+
if (this.featureClass === RenderFeature) {
|
|
188
|
+
feature = new /** @type {typeof RenderFeature} */ (this.featureClass)(
|
|
193
189
|
geometryType,
|
|
194
190
|
flatCoordinates,
|
|
195
191
|
ends,
|
|
@@ -219,7 +215,7 @@ class MVT extends FeatureFormat {
|
|
|
219
215
|
: null;
|
|
220
216
|
}
|
|
221
217
|
const ctor = /** @type {typeof import("../Feature.js").default} */ (
|
|
222
|
-
this.
|
|
218
|
+
this.featureClass
|
|
223
219
|
);
|
|
224
220
|
feature = new ctor();
|
|
225
221
|
if (this.geometryName_) {
|
package/layer/Vector.d.ts
CHANGED
|
@@ -1,4 +1,159 @@
|
|
|
1
1
|
export default VectorLayer;
|
|
2
|
+
export type Options<FeatureType extends import("../Feature.js").FeatureLike> = {
|
|
3
|
+
/**
|
|
4
|
+
* A CSS class name to set to the layer element.
|
|
5
|
+
*/
|
|
6
|
+
className?: string | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Opacity (0, 1).
|
|
9
|
+
*/
|
|
10
|
+
opacity?: number | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Visibility.
|
|
13
|
+
*/
|
|
14
|
+
visible?: boolean | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* The bounding extent for layer rendering. The layer will not be
|
|
17
|
+
* rendered outside of this extent.
|
|
18
|
+
*/
|
|
19
|
+
extent?: import("../extent.js").Extent | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* The z-index for layer rendering. At rendering time, the layers
|
|
22
|
+
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
|
|
23
|
+
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
|
|
24
|
+
* method was used.
|
|
25
|
+
*/
|
|
26
|
+
zIndex?: number | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* The minimum resolution (inclusive) at which this layer will be
|
|
29
|
+
* visible.
|
|
30
|
+
*/
|
|
31
|
+
minResolution?: number | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* The maximum resolution (exclusive) below which this layer will
|
|
34
|
+
* be visible.
|
|
35
|
+
*/
|
|
36
|
+
maxResolution?: number | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* The minimum view zoom level (exclusive) above which this layer will be
|
|
39
|
+
* visible.
|
|
40
|
+
*/
|
|
41
|
+
minZoom?: number | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* The maximum view zoom level (inclusive) at which this layer will
|
|
44
|
+
* be visible.
|
|
45
|
+
*/
|
|
46
|
+
maxZoom?: number | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Render order. Function to be used when sorting
|
|
49
|
+
* features before rendering. By default features are drawn in the order that they are created. Use
|
|
50
|
+
* `null` to avoid the sort, but get an undefined draw order.
|
|
51
|
+
*/
|
|
52
|
+
renderOrder?: import("../render.js").OrderFunction | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* The buffer in pixels around the viewport extent used by the
|
|
55
|
+
* renderer when getting features from the vector source for the rendering or hit-detection.
|
|
56
|
+
* Recommended value: the size of the largest symbol, line width or label.
|
|
57
|
+
*/
|
|
58
|
+
renderBuffer?: number | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* Source.
|
|
61
|
+
*/
|
|
62
|
+
source?: import("../source/Vector.js").default<FeatureType> | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Sets the layer as overlay on a map. The map will not manage
|
|
65
|
+
* this layer in its layers collection, and the layer will be rendered on top. This is useful for
|
|
66
|
+
* temporary layers. The standard way to add a layer to a map and have it managed by the map is to
|
|
67
|
+
* use [map.addLayer()]{@link import ("../Map.js").default#addLayer}.
|
|
68
|
+
*/
|
|
69
|
+
map?: import("../Map.js").default | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* Declutter images and text. Any truthy value will enable
|
|
72
|
+
* decluttering. Within a layer, a feature rendered before another has higher priority. All layers with the
|
|
73
|
+
* same `declutter` value will be decluttered together. The priority is determined by the drawing order of the
|
|
74
|
+
* layers with the same `declutter` value. Higher in the layer stack means higher priority. To declutter distinct
|
|
75
|
+
* layers or groups of layers separately, use different truthy values for `declutter`.
|
|
76
|
+
*/
|
|
77
|
+
declutter?: string | number | boolean | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* Layer style. When set to `null`, only
|
|
80
|
+
* features that have their own style will be rendered. See {@link module :ol/style/Style~Style} for the default style
|
|
81
|
+
* which will be used if this is not set.
|
|
82
|
+
*/
|
|
83
|
+
style?: import("../style/Style.js").StyleLike | import("../style/flat.js").FlatStyleLike | null | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* Background color for the layer. If not specified, no background
|
|
86
|
+
* will be rendered.
|
|
87
|
+
*/
|
|
88
|
+
background?: import("./Base.js").BackgroundColor | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* When set to `true`, feature batches will
|
|
91
|
+
* be recreated during animations. This means that no vectors will be shown clipped, but the
|
|
92
|
+
* setting will have a performance impact for large amounts of vector data. When set to `false`,
|
|
93
|
+
* batches will be recreated when no animation is active.
|
|
94
|
+
*/
|
|
95
|
+
updateWhileAnimating?: boolean | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* When set to `true`, feature batches will
|
|
98
|
+
* be recreated during interactions. See also `updateWhileAnimating`.
|
|
99
|
+
*/
|
|
100
|
+
updateWhileInteracting?: boolean | undefined;
|
|
101
|
+
/**
|
|
102
|
+
* Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
|
|
103
|
+
*/
|
|
104
|
+
properties?: {
|
|
105
|
+
[x: string]: any;
|
|
106
|
+
} | undefined;
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* @template {import('../Feature.js').FeatureLike} FeatureType
|
|
110
|
+
* @typedef {Object} Options
|
|
111
|
+
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
|
|
112
|
+
* @property {number} [opacity=1] Opacity (0, 1).
|
|
113
|
+
* @property {boolean} [visible=true] Visibility.
|
|
114
|
+
* @property {import("../extent.js").Extent} [extent] The bounding extent for layer rendering. The layer will not be
|
|
115
|
+
* rendered outside of this extent.
|
|
116
|
+
* @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers
|
|
117
|
+
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
|
|
118
|
+
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
|
|
119
|
+
* method was used.
|
|
120
|
+
* @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be
|
|
121
|
+
* visible.
|
|
122
|
+
* @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
|
|
123
|
+
* be visible.
|
|
124
|
+
* @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be
|
|
125
|
+
* visible.
|
|
126
|
+
* @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
|
|
127
|
+
* be visible.
|
|
128
|
+
* @property {import("../render.js").OrderFunction} [renderOrder] Render order. Function to be used when sorting
|
|
129
|
+
* features before rendering. By default features are drawn in the order that they are created. Use
|
|
130
|
+
* `null` to avoid the sort, but get an undefined draw order.
|
|
131
|
+
* @property {number} [renderBuffer=100] The buffer in pixels around the viewport extent used by the
|
|
132
|
+
* renderer when getting features from the vector source for the rendering or hit-detection.
|
|
133
|
+
* Recommended value: the size of the largest symbol, line width or label.
|
|
134
|
+
* @property {import("../source/Vector.js").default<FeatureType>} [source] Source.
|
|
135
|
+
* @property {import("../Map.js").default} [map] Sets the layer as overlay on a map. The map will not manage
|
|
136
|
+
* this layer in its layers collection, and the layer will be rendered on top. This is useful for
|
|
137
|
+
* temporary layers. The standard way to add a layer to a map and have it managed by the map is to
|
|
138
|
+
* use [map.addLayer()]{@link import("../Map.js").default#addLayer}.
|
|
139
|
+
* @property {boolean|string|number} [declutter=false] Declutter images and text. Any truthy value will enable
|
|
140
|
+
* decluttering. Within a layer, a feature rendered before another has higher priority. All layers with the
|
|
141
|
+
* same `declutter` value will be decluttered together. The priority is determined by the drawing order of the
|
|
142
|
+
* layers with the same `declutter` value. Higher in the layer stack means higher priority. To declutter distinct
|
|
143
|
+
* layers or groups of layers separately, use different truthy values for `declutter`.
|
|
144
|
+
* @property {import("../style/Style.js").StyleLike|import("../style/flat.js").FlatStyleLike|null} [style] Layer style. When set to `null`, only
|
|
145
|
+
* features that have their own style will be rendered. See {@link module:ol/style/Style~Style} for the default style
|
|
146
|
+
* which will be used if this is not set.
|
|
147
|
+
* @property {import("./Base.js").BackgroundColor} [background] Background color for the layer. If not specified, no background
|
|
148
|
+
* will be rendered.
|
|
149
|
+
* @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will
|
|
150
|
+
* be recreated during animations. This means that no vectors will be shown clipped, but the
|
|
151
|
+
* setting will have a performance impact for large amounts of vector data. When set to `false`,
|
|
152
|
+
* batches will be recreated when no animation is active.
|
|
153
|
+
* @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will
|
|
154
|
+
* be recreated during interactions. See also `updateWhileAnimating`.
|
|
155
|
+
* @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
|
|
156
|
+
*/
|
|
2
157
|
/**
|
|
3
158
|
* @classdesc
|
|
4
159
|
* Vector data is rendered client-side, as vectors. This layer type provides most accurate rendering
|
|
@@ -16,9 +171,9 @@ export default VectorLayer;
|
|
|
16
171
|
*/
|
|
17
172
|
declare class VectorLayer<FeatureType extends import("../Feature.js").FeatureLike> extends BaseVectorLayer<import("../source/Vector.js").default<FeatureType>, CanvasVectorLayerRenderer> {
|
|
18
173
|
/**
|
|
19
|
-
* @param {
|
|
174
|
+
* @param {Options<FeatureType>} [options] Options.
|
|
20
175
|
*/
|
|
21
|
-
constructor(options?:
|
|
176
|
+
constructor(options?: Options<FeatureType> | undefined);
|
|
22
177
|
}
|
|
23
178
|
import CanvasVectorLayerRenderer from '../renderer/canvas/VectorLayer.js';
|
|
24
179
|
import BaseVectorLayer from './BaseVector.js';
|
package/layer/Vector.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Vector.d.ts","sourceRoot":"","sources":["Vector.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Vector.d.ts","sourceRoot":"","sources":["Vector.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH;;;;;;;;;;;;;;GAcG;AACH;IACE;;OAEG;IACH,wDAEC;CAKF;sCA9EqC,mCAAmC;4BAD7C,iBAAiB"}
|
package/layer/Vector.js
CHANGED
|
@@ -4,6 +4,56 @@
|
|
|
4
4
|
import BaseVectorLayer from './BaseVector.js';
|
|
5
5
|
import CanvasVectorLayerRenderer from '../renderer/canvas/VectorLayer.js';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* @template {import('../Feature.js').FeatureLike} FeatureType
|
|
9
|
+
* @typedef {Object} Options
|
|
10
|
+
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
|
|
11
|
+
* @property {number} [opacity=1] Opacity (0, 1).
|
|
12
|
+
* @property {boolean} [visible=true] Visibility.
|
|
13
|
+
* @property {import("../extent.js").Extent} [extent] The bounding extent for layer rendering. The layer will not be
|
|
14
|
+
* rendered outside of this extent.
|
|
15
|
+
* @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers
|
|
16
|
+
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
|
|
17
|
+
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
|
|
18
|
+
* method was used.
|
|
19
|
+
* @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be
|
|
20
|
+
* visible.
|
|
21
|
+
* @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
|
|
22
|
+
* be visible.
|
|
23
|
+
* @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be
|
|
24
|
+
* visible.
|
|
25
|
+
* @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
|
|
26
|
+
* be visible.
|
|
27
|
+
* @property {import("../render.js").OrderFunction} [renderOrder] Render order. Function to be used when sorting
|
|
28
|
+
* features before rendering. By default features are drawn in the order that they are created. Use
|
|
29
|
+
* `null` to avoid the sort, but get an undefined draw order.
|
|
30
|
+
* @property {number} [renderBuffer=100] The buffer in pixels around the viewport extent used by the
|
|
31
|
+
* renderer when getting features from the vector source for the rendering or hit-detection.
|
|
32
|
+
* Recommended value: the size of the largest symbol, line width or label.
|
|
33
|
+
* @property {import("../source/Vector.js").default<FeatureType>} [source] Source.
|
|
34
|
+
* @property {import("../Map.js").default} [map] Sets the layer as overlay on a map. The map will not manage
|
|
35
|
+
* this layer in its layers collection, and the layer will be rendered on top. This is useful for
|
|
36
|
+
* temporary layers. The standard way to add a layer to a map and have it managed by the map is to
|
|
37
|
+
* use [map.addLayer()]{@link import("../Map.js").default#addLayer}.
|
|
38
|
+
* @property {boolean|string|number} [declutter=false] Declutter images and text. Any truthy value will enable
|
|
39
|
+
* decluttering. Within a layer, a feature rendered before another has higher priority. All layers with the
|
|
40
|
+
* same `declutter` value will be decluttered together. The priority is determined by the drawing order of the
|
|
41
|
+
* layers with the same `declutter` value. Higher in the layer stack means higher priority. To declutter distinct
|
|
42
|
+
* layers or groups of layers separately, use different truthy values for `declutter`.
|
|
43
|
+
* @property {import("../style/Style.js").StyleLike|import("../style/flat.js").FlatStyleLike|null} [style] Layer style. When set to `null`, only
|
|
44
|
+
* features that have their own style will be rendered. See {@link module:ol/style/Style~Style} for the default style
|
|
45
|
+
* which will be used if this is not set.
|
|
46
|
+
* @property {import("./Base.js").BackgroundColor} [background] Background color for the layer. If not specified, no background
|
|
47
|
+
* will be rendered.
|
|
48
|
+
* @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will
|
|
49
|
+
* be recreated during animations. This means that no vectors will be shown clipped, but the
|
|
50
|
+
* setting will have a performance impact for large amounts of vector data. When set to `false`,
|
|
51
|
+
* batches will be recreated when no animation is active.
|
|
52
|
+
* @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will
|
|
53
|
+
* be recreated during interactions. See also `updateWhileAnimating`.
|
|
54
|
+
* @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
|
|
55
|
+
*/
|
|
56
|
+
|
|
7
57
|
/**
|
|
8
58
|
* @classdesc
|
|
9
59
|
* Vector data is rendered client-side, as vectors. This layer type provides most accurate rendering
|
|
@@ -21,7 +71,7 @@ import CanvasVectorLayerRenderer from '../renderer/canvas/VectorLayer.js';
|
|
|
21
71
|
*/
|
|
22
72
|
class VectorLayer extends BaseVectorLayer {
|
|
23
73
|
/**
|
|
24
|
-
* @param {
|
|
74
|
+
* @param {Options<FeatureType>} [options] Options.
|
|
25
75
|
*/
|
|
26
76
|
constructor(options) {
|
|
27
77
|
super(options);
|
package/layer/VectorTile.d.ts
CHANGED
|
@@ -4,7 +4,134 @@ 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
|
-
export type Options =
|
|
7
|
+
export type Options<FeatureType extends import("../Feature").FeatureLike> = {
|
|
8
|
+
/**
|
|
9
|
+
* A CSS class name to set to the layer element.
|
|
10
|
+
*/
|
|
11
|
+
className?: string | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Opacity (0, 1).
|
|
14
|
+
*/
|
|
15
|
+
opacity?: number | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Visibility.
|
|
18
|
+
*/
|
|
19
|
+
visible?: boolean | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* The bounding extent for layer rendering. The layer will not be
|
|
22
|
+
* rendered outside of this extent.
|
|
23
|
+
*/
|
|
24
|
+
extent?: import("../extent.js").Extent | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* The z-index for layer rendering. At rendering time, the layers
|
|
27
|
+
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
|
|
28
|
+
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
|
|
29
|
+
* method was used.
|
|
30
|
+
*/
|
|
31
|
+
zIndex?: number | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* The minimum resolution (inclusive) at which this layer will be
|
|
34
|
+
* visible.
|
|
35
|
+
*/
|
|
36
|
+
minResolution?: number | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* The maximum resolution (exclusive) below which this layer will
|
|
39
|
+
* be visible.
|
|
40
|
+
*/
|
|
41
|
+
maxResolution?: number | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* The minimum view zoom level (exclusive) above which this layer will be
|
|
44
|
+
* visible.
|
|
45
|
+
*/
|
|
46
|
+
minZoom?: number | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* The maximum view zoom level (inclusive) at which this layer will
|
|
49
|
+
* be visible.
|
|
50
|
+
*/
|
|
51
|
+
maxZoom?: number | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Render order. Function to be used when sorting
|
|
54
|
+
* features before rendering. By default features are drawn in the order that they are created. Use
|
|
55
|
+
* `null` to avoid the sort, but get an undefined draw order.
|
|
56
|
+
*/
|
|
57
|
+
renderOrder?: import("../render.js").OrderFunction | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* The buffer in pixels around the tile extent used by the
|
|
60
|
+
* renderer when getting features from the vector tile for the rendering or hit-detection.
|
|
61
|
+
* Recommended value: Vector tiles are usually generated with a buffer, so this value should match
|
|
62
|
+
* the largest possible buffer of the used tiles. It should be at least the size of the largest
|
|
63
|
+
* point symbol or line width.
|
|
64
|
+
*/
|
|
65
|
+
renderBuffer?: number | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Render mode for vector tiles:
|
|
68
|
+
* * `'hybrid'`: Polygon and line elements are rendered as images, so pixels are scaled during zoom
|
|
69
|
+
* animations. Point symbols and texts are accurately rendered as vectors and can stay upright on
|
|
70
|
+
* rotated views, but get lifted above all polygon and line elements.
|
|
71
|
+
* * `'vector'`: Everything is rendered as vectors and the original render order is maintained. Use
|
|
72
|
+
* this mode for improved performance and visual epxerience on vector tile layers with not too many
|
|
73
|
+
* rendered features (e.g. for highlighting a subset of features of another layer with the same
|
|
74
|
+
* source).
|
|
75
|
+
*/
|
|
76
|
+
renderMode?: VectorTileRenderType | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* Source.
|
|
79
|
+
*/
|
|
80
|
+
source?: import("../source/VectorTile.js").default<FeatureType> | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* Sets the layer as overlay on a map. The map will not manage
|
|
83
|
+
* this layer in its layers collection, and the layer will be rendered on top. This is useful for
|
|
84
|
+
* temporary layers. The standard way to add a layer to a map and have it managed by the map is to
|
|
85
|
+
* use [map.addLayer()]{@link import ("../Map.js").default#addLayer}.
|
|
86
|
+
*/
|
|
87
|
+
map?: import("../Map.js").default | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* Declutter images and text. Any truthy value will enable
|
|
90
|
+
* decluttering. Within a layer, a feature rendered before another has higher priority. All layers with the
|
|
91
|
+
* same `declutter` value will be decluttered together. The priority is determined by the drawing order of the
|
|
92
|
+
* layers with the same `declutter` value. Higher in the layer stack means higher priority. To declutter distinct
|
|
93
|
+
* layers or groups of layers separately, use different truthy values for `declutter`.
|
|
94
|
+
*/
|
|
95
|
+
declutter?: string | number | boolean | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* Layer style. When set to `null`, only
|
|
98
|
+
* features that have their own style will be rendered. See {@link module :ol/style/Style~Style} for the default style
|
|
99
|
+
* which will be used if this is not set.
|
|
100
|
+
*/
|
|
101
|
+
style?: import("../style/Style.js").StyleLike | null | undefined;
|
|
102
|
+
/**
|
|
103
|
+
* Background color for the layer. If not specified, no
|
|
104
|
+
* background will be rendered.
|
|
105
|
+
*/
|
|
106
|
+
background?: import("./Base").BackgroundColor | undefined;
|
|
107
|
+
/**
|
|
108
|
+
* When set to `true`, feature batches will be
|
|
109
|
+
* recreated during animations. This means that no vectors will be shown clipped, but the setting
|
|
110
|
+
* will have a performance impact for large amounts of vector data. When set to `false`, batches
|
|
111
|
+
* will be recreated when no animation is active.
|
|
112
|
+
*/
|
|
113
|
+
updateWhileAnimating?: boolean | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* When set to `true`, feature batches will be
|
|
116
|
+
* recreated during interactions. See also `updateWhileAnimating`.
|
|
117
|
+
*/
|
|
118
|
+
updateWhileInteracting?: boolean | undefined;
|
|
119
|
+
/**
|
|
120
|
+
* Preload. Load low-resolution tiles up to `preload` levels. `0`
|
|
121
|
+
* means no preloading.
|
|
122
|
+
*/
|
|
123
|
+
preload?: number | undefined;
|
|
124
|
+
/**
|
|
125
|
+
* Use interim tiles on error.
|
|
126
|
+
*/
|
|
127
|
+
useInterimTilesOnError?: boolean | undefined;
|
|
128
|
+
/**
|
|
129
|
+
* Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
|
|
130
|
+
*/
|
|
131
|
+
properties?: {
|
|
132
|
+
[x: string]: any;
|
|
133
|
+
} | undefined;
|
|
134
|
+
};
|
|
8
135
|
/***
|
|
9
136
|
* @template Return
|
|
10
137
|
* @typedef {import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default, Return> &
|
|
@@ -18,8 +145,8 @@ export type Options = any;
|
|
|
18
145
|
* @typedef {'hybrid' | 'vector'} VectorTileRenderType
|
|
19
146
|
*/
|
|
20
147
|
/**
|
|
148
|
+
* @template {import('../Feature').FeatureLike} FeatureType
|
|
21
149
|
* @typedef {Object} Options
|
|
22
|
-
* @template {import("../source/VectorTile.js").default<import('../Feature').FeatureLike>} VectorTileSourceType
|
|
23
150
|
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
|
|
24
151
|
* @property {number} [opacity=1] Opacity (0, 1).
|
|
25
152
|
* @property {boolean} [visible=true] Visibility.
|
|
@@ -53,7 +180,7 @@ export type Options = any;
|
|
|
53
180
|
* this mode for improved performance and visual epxerience on vector tile layers with not too many
|
|
54
181
|
* rendered features (e.g. for highlighting a subset of features of another layer with the same
|
|
55
182
|
* source).
|
|
56
|
-
* @property {
|
|
183
|
+
* @property {import("../source/VectorTile.js").default<FeatureType>} [source] Source.
|
|
57
184
|
* @property {import("../Map.js").default} [map] Sets the layer as overlay on a map. The map will not manage
|
|
58
185
|
* this layer in its layers collection, and the layer will be rendered on top. This is useful for
|
|
59
186
|
* temporary layers. The standard way to add a layer to a map and have it managed by the map is to
|
|
@@ -66,7 +193,7 @@ export type Options = any;
|
|
|
66
193
|
* @property {import("../style/Style.js").StyleLike|null} [style] Layer style. When set to `null`, only
|
|
67
194
|
* features that have their own style will be rendered. See {@link module:ol/style/Style~Style} for the default style
|
|
68
195
|
* which will be used if this is not set.
|
|
69
|
-
* @property {import("./Base.js").BackgroundColor
|
|
196
|
+
* @property {import("./Base.js").BackgroundColor} [background] Background color for the layer. If not specified, no
|
|
70
197
|
* background will be rendered.
|
|
71
198
|
* @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will be
|
|
72
199
|
* recreated during animations. This means that no vectors will be shown clipped, but the setting
|
|
@@ -86,16 +213,15 @@ export type Options = any;
|
|
|
86
213
|
* property on the layer object; for example, setting `title: 'My Title'` in the
|
|
87
214
|
* options means that `title` is observable, and has get/set accessors.
|
|
88
215
|
*
|
|
89
|
-
* @param {Options} [options] Options.
|
|
90
216
|
* @template {import('../Feature').FeatureLike} FeatureType
|
|
91
217
|
* @extends {BaseVectorLayer<import("../source/VectorTile.js").default<FeatureType>, CanvasVectorTileLayerRenderer>}
|
|
92
218
|
* @api
|
|
93
219
|
*/
|
|
94
220
|
declare class VectorTileLayer<FeatureType extends import("../Feature").FeatureLike> extends BaseVectorLayer<import("../source/VectorTile.js").default<FeatureType>, CanvasVectorTileLayerRenderer> {
|
|
95
221
|
/**
|
|
96
|
-
* @param {Options} [options] Options.
|
|
222
|
+
* @param {Options<FeatureType>} [options] Options.
|
|
97
223
|
*/
|
|
98
|
-
constructor(options?: Options);
|
|
224
|
+
constructor(options?: Options<FeatureType> | undefined);
|
|
99
225
|
/***
|
|
100
226
|
* @type {VectorTileLayerOnSignature<import("../events").EventsKey>}
|
|
101
227
|
*/
|