ol 9.2.5-dev.1718652616882 → 9.2.5-dev.1718925536936
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/DataTile.d.ts +14 -0
- package/DataTile.d.ts.map +1 -1
- package/DataTile.js +24 -1
- package/Map.d.ts +1 -1
- package/Map.d.ts.map +1 -1
- package/Map.js +9 -10
- package/Tile.d.ts +2 -22
- package/Tile.d.ts.map +1 -1
- package/Tile.js +2 -77
- package/TileQueue.d.ts.map +1 -1
- package/TileQueue.js +6 -4
- package/VectorRenderTile.d.ts +8 -13
- package/VectorRenderTile.d.ts.map +1 -1
- package/VectorRenderTile.js +17 -24
- package/VectorTile.d.ts +5 -5
- package/VectorTile.d.ts.map +1 -1
- package/VectorTile.js +3 -3
- package/dist/ol.d.ts +10 -2
- package/dist/ol.d.ts.map +1 -1
- package/dist/ol.js +2 -2
- package/dist/ol.js.map +1 -1
- package/featureloader.d.ts +4 -4
- package/featureloader.d.ts.map +1 -1
- package/featureloader.js +2 -2
- package/format/EsriJSON.d.ts +1 -1
- package/format/Feature.d.ts +8 -8
- package/format/Feature.d.ts.map +1 -1
- package/format/Feature.js +7 -5
- package/format/GeoJSON.d.ts +9 -9
- package/format/GeoJSON.d.ts.map +1 -1
- package/format/GeoJSON.js +10 -14
- package/format/JSONFeature.d.ts +7 -7
- package/format/JSONFeature.d.ts.map +1 -1
- package/format/JSONFeature.js +9 -11
- package/format/MVT.d.ts +12 -12
- package/format/MVT.d.ts.map +1 -1
- package/format/MVT.js +12 -14
- package/format/TextFeature.d.ts +1 -1
- package/format/TopoJSON.d.ts +1 -1
- package/format/WKB.d.ts +1 -1
- package/format/XMLFeature.d.ts +1 -1
- package/interaction/DragAndDrop.d.ts +1 -1
- package/layer/BaseTile.d.ts +23 -6
- package/layer/BaseTile.d.ts.map +1 -1
- package/layer/BaseTile.js +22 -3
- package/layer/Tile.d.ts +1 -1
- package/layer/Tile.d.ts.map +1 -1
- package/layer/Tile.js +3 -1
- package/layer/VectorTile.d.ts +19 -6
- package/layer/VectorTile.d.ts.map +1 -1
- package/layer/VectorTile.js +20 -8
- package/layer/WebGLTile.d.ts +5 -10
- package/layer/WebGLTile.d.ts.map +1 -1
- package/layer/WebGLTile.js +3 -12
- package/package.json +1 -1
- package/renderer/Layer.d.ts +22 -25
- package/renderer/Layer.d.ts.map +1 -1
- package/renderer/Layer.js +36 -36
- package/renderer/canvas/TileLayer.d.ts +100 -38
- package/renderer/canvas/TileLayer.d.ts.map +1 -1
- package/renderer/canvas/TileLayer.js +542 -329
- package/renderer/canvas/VectorTileLayer.d.ts +11 -11
- package/renderer/canvas/VectorTileLayer.d.ts.map +1 -1
- package/renderer/canvas/VectorTileLayer.js +33 -46
- package/renderer/webgl/TileLayerBase.d.ts +0 -6
- package/renderer/webgl/TileLayerBase.d.ts.map +1 -1
- package/renderer/webgl/TileLayerBase.js +61 -78
- package/reproj/DataTile.d.ts.map +1 -1
- package/reproj/DataTile.js +103 -100
- package/source/BingMaps.d.ts +2 -2
- package/source/BingMaps.d.ts.map +1 -1
- package/source/BingMaps.js +1 -2
- package/source/CartoDB.d.ts +2 -2
- package/source/CartoDB.js +1 -1
- package/source/DataTile.d.ts +49 -20
- package/source/DataTile.d.ts.map +1 -1
- package/source/DataTile.js +56 -9
- package/source/GeoTIFF.d.ts +2 -6
- package/source/GeoTIFF.d.ts.map +1 -1
- package/source/GeoTIFF.js +3 -3
- package/source/Google.d.ts.map +1 -1
- package/source/Google.js +0 -2
- package/source/IIIF.d.ts +1 -1
- package/source/IIIF.js +1 -1
- package/source/ImageTile.d.ts +102 -0
- package/source/ImageTile.d.ts.map +1 -0
- package/source/ImageTile.js +208 -0
- package/source/OGCMapTile.d.ts +2 -2
- package/source/OGCMapTile.js +1 -1
- package/source/OGCVectorTile.d.ts +4 -4
- package/source/OGCVectorTile.js +2 -2
- package/source/OSM.d.ts +2 -7
- package/source/OSM.d.ts.map +1 -1
- package/source/OSM.js +1 -3
- package/source/StadiaMaps.d.ts +2 -2
- package/source/StadiaMaps.d.ts.map +1 -1
- package/source/StadiaMaps.js +2 -18
- package/source/Tile.d.ts +7 -36
- package/source/Tile.d.ts.map +1 -1
- package/source/Tile.js +5 -69
- package/source/TileArcGISRest.d.ts +2 -2
- package/source/TileArcGISRest.js +1 -1
- package/source/TileDebug.d.ts.map +1 -1
- package/source/TileDebug.js +0 -1
- package/source/TileImage.d.ts +7 -11
- package/source/TileImage.d.ts.map +1 -1
- package/source/TileImage.js +11 -43
- package/source/TileJSON.d.ts +2 -2
- package/source/TileJSON.js +1 -1
- package/source/TileWMS.d.ts +2 -2
- package/source/TileWMS.d.ts.map +1 -1
- package/source/TileWMS.js +1 -4
- package/source/UTFGrid.d.ts +1 -1
- package/source/UrlTile.d.ts +14 -12
- package/source/UrlTile.d.ts.map +1 -1
- package/source/UrlTile.js +12 -7
- package/source/Vector.d.ts +5 -5
- package/source/Vector.d.ts.map +1 -1
- package/source/Vector.js +3 -3
- package/source/VectorTile.d.ts +4 -17
- package/source/VectorTile.d.ts.map +1 -1
- package/source/VectorTile.js +10 -85
- package/source/WMTS.d.ts +2 -2
- package/source/WMTS.js +3 -3
- package/source/XYZ.d.ts +14 -17
- package/source/XYZ.d.ts.map +1 -1
- package/source/XYZ.js +7 -8
- package/source/Zoomify.d.ts +2 -2
- package/source/Zoomify.d.ts.map +1 -1
- package/source/Zoomify.js +3 -2
- package/source.d.ts +1 -0
- package/source.d.ts.map +1 -1
- package/source.js +1 -0
- package/tilecoord.d.ts +7 -0
- package/tilecoord.d.ts.map +1 -1
- package/tilecoord.js +11 -1
- package/tileurlfunction.d.ts +3 -7
- package/tileurlfunction.d.ts.map +1 -1
- package/tileurlfunction.js +14 -47
- package/uri.d.ts +23 -3
- package/uri.d.ts.map +1 -1
- package/uri.js +75 -0
- package/util.js +1 -1
package/DataTile.d.ts
CHANGED
|
@@ -23,6 +23,10 @@ export function asArrayLike(data: Data): ArrayLike | null;
|
|
|
23
23
|
* @return {Uint8ClampedArray} The data.
|
|
24
24
|
*/
|
|
25
25
|
export function toArray(image: ImageLike): Uint8ClampedArray;
|
|
26
|
+
/**
|
|
27
|
+
* This is set as the cancellation reason when a tile is disposed.
|
|
28
|
+
*/
|
|
29
|
+
export const disposedError: Error;
|
|
26
30
|
export default DataTile;
|
|
27
31
|
export type ImageLike = HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap;
|
|
28
32
|
export type ArrayLike = Uint8Array | Uint8ClampedArray | Float32Array | DataView;
|
|
@@ -54,6 +58,10 @@ export type Options = {
|
|
|
54
58
|
* Tile size.
|
|
55
59
|
*/
|
|
56
60
|
size?: import("./size.js").Size | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* An abort controller.
|
|
63
|
+
*/
|
|
64
|
+
controller?: AbortController | undefined;
|
|
57
65
|
};
|
|
58
66
|
/**
|
|
59
67
|
* @typedef {Object} Options
|
|
@@ -65,6 +73,7 @@ export type Options = {
|
|
|
65
73
|
* @property {boolean} [interpolate=false] Use interpolated values when resampling. By default,
|
|
66
74
|
* the nearest neighbor is used when resampling.
|
|
67
75
|
* @property {import('./size.js').Size} [size=[256, 256]] Tile size.
|
|
76
|
+
* @property {AbortController} [controller] An abort controller.
|
|
68
77
|
* @api
|
|
69
78
|
*/
|
|
70
79
|
declare class DataTile extends Tile {
|
|
@@ -92,6 +101,11 @@ declare class DataTile extends Tile {
|
|
|
92
101
|
* @private
|
|
93
102
|
*/
|
|
94
103
|
private size_;
|
|
104
|
+
/**
|
|
105
|
+
* @type {AbortController|null}
|
|
106
|
+
* @private
|
|
107
|
+
*/
|
|
108
|
+
private controller_;
|
|
95
109
|
/**
|
|
96
110
|
* Get the tile size.
|
|
97
111
|
* @return {import('./size.js').Size} Tile size.
|
package/DataTile.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTile.d.ts","sourceRoot":"","sources":["DataTile.js"],"names":[],"mappings":"AAOA;;GAEG;AAEH;;GAEG;AAEH;;;GAGG;AAEH;;;GAGG;AACH,kCAHW,IAAI,GACH,SAAS,GAAC,IAAI,CASzB;AAED;;;GAGG;AACH,kCAHW,IAAI,GACH,SAAS,GAAC,IAAI,CASzB;
|
|
1
|
+
{"version":3,"file":"DataTile.d.ts","sourceRoot":"","sources":["DataTile.js"],"names":[],"mappings":"AAOA;;GAEG;AAEH;;GAEG;AAEH;;;GAGG;AAEH;;;GAGG;AACH,kCAHW,IAAI,GACH,SAAS,GAAC,IAAI,CASzB;AAED;;;GAGG;AACH,kCAHW,IAAI,GACH,SAAS,GAAC,IAAI,CASzB;AAYD;;;GAGG;AACH,+BAHW,SAAS,GACR,iBAAiB,CAuB5B;AAnCD;;GAEG;AACH,kCAAmD;;wBAzCtC,gBAAgB,GAAC,iBAAiB,GAAC,gBAAgB,GAAC,WAAW;wBAI/D,UAAU,GAAC,iBAAiB,GAAC,YAAY,GAAC,QAAQ;;;;mBAKlD,SAAS,GAAC,SAAS;;;;;eAyElB,OAAO,gBAAgB,EAAE,SAAS;;;;;kBACtB,QAAQ,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;AAHvC;;;;;;;;;;;;GAYG;AAEH;IACE;;OAEG;IACH,qBAFW,OAAO,EAuCjB;IA7BC;;;OAGG;IACH,gBAA6B;IAE7B;;;OAGG;IACH,cAAiB;IAEjB;;;OAGG;IACH,eAAkB;IAElB;;;OAGG;IACH,cAAiC;IAEjC;;;OAGG;IACH,oBAA6C;IAG/C;;;OAGG;IACH,WAFY,OAAO,WAAW,EAAE,IAAI,CAWnC;IAED;;;;OAIG;IACH,WAHY,IAAI,CAKf;IAED;;;;OAIG;IACH,YAHY,KAAK,CAKhB;CAqCF;iBAlNgB,WAAW"}
|
package/DataTile.js
CHANGED
|
@@ -44,6 +44,11 @@ export function asArrayLike(data) {
|
|
|
44
44
|
: null;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
/**
|
|
48
|
+
* This is set as the cancellation reason when a tile is disposed.
|
|
49
|
+
*/
|
|
50
|
+
export const disposedError = new Error('disposed');
|
|
51
|
+
|
|
47
52
|
/**
|
|
48
53
|
* @type {CanvasRenderingContext2D|null}
|
|
49
54
|
*/
|
|
@@ -91,6 +96,7 @@ const defaultSize = [256, 256];
|
|
|
91
96
|
* @property {boolean} [interpolate=false] Use interpolated values when resampling. By default,
|
|
92
97
|
* the nearest neighbor is used when resampling.
|
|
93
98
|
* @property {import('./size.js').Size} [size=[256, 256]] Tile size.
|
|
99
|
+
* @property {AbortController} [controller] An abort controller.
|
|
94
100
|
* @api
|
|
95
101
|
*/
|
|
96
102
|
|
|
@@ -129,6 +135,12 @@ class DataTile extends Tile {
|
|
|
129
135
|
* @private
|
|
130
136
|
*/
|
|
131
137
|
this.size_ = options.size || null;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* @type {AbortController|null}
|
|
141
|
+
* @private
|
|
142
|
+
*/
|
|
143
|
+
this.controller_ = options.controller || null;
|
|
132
144
|
}
|
|
133
145
|
|
|
134
146
|
/**
|
|
@@ -165,7 +177,7 @@ class DataTile extends Tile {
|
|
|
165
177
|
}
|
|
166
178
|
|
|
167
179
|
/**
|
|
168
|
-
* Load
|
|
180
|
+
* Load the tile data.
|
|
169
181
|
* @api
|
|
170
182
|
*/
|
|
171
183
|
load() {
|
|
@@ -188,6 +200,17 @@ class DataTile extends Tile {
|
|
|
188
200
|
self.changed();
|
|
189
201
|
});
|
|
190
202
|
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Clean up.
|
|
206
|
+
*/
|
|
207
|
+
disposeInternal() {
|
|
208
|
+
if (this.controller_) {
|
|
209
|
+
this.controller_.abort(disposedError);
|
|
210
|
+
this.controller_ = null;
|
|
211
|
+
}
|
|
212
|
+
super.disposeInternal();
|
|
213
|
+
}
|
|
191
214
|
}
|
|
192
215
|
|
|
193
216
|
export default DataTile;
|
package/Map.d.ts
CHANGED
package/Map.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
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W,UAAU,QAUpB;IAED;;;;;OAKG;IACH,cAJW,OAAO,WAAW,EAAE,IAAI,GAAC,SAAS,QAM5C;IAED;;;;;;OAMG;IACH,2DAEC;IAED;;;;;;;;OAQG;IACH,cAPW,IAAI,GAAC,QAAQ,OAAO,WAAW,EAAE,WAAW,CAAC,QAkBvD;IAED;;;;OAIG;IACH,mBAwCC;IAED;;;;OAIG;IACH,4BAKC;CACF;sBAzrDwC,gBAAgB;uBAflC,iBAAiB;4BAMZ,sBAAsB;uBADb,kBAAkB;iBAWtC,WAAW;uBAjBL,aAAa"}
|
package/Map.js
CHANGED
|
@@ -264,9 +264,9 @@ class Map extends BaseObject {
|
|
|
264
264
|
|
|
265
265
|
/**
|
|
266
266
|
* @private
|
|
267
|
-
* @type {boolean
|
|
267
|
+
* @type {boolean}
|
|
268
268
|
*/
|
|
269
|
-
this.renderComplete_;
|
|
269
|
+
this.renderComplete_ = false;
|
|
270
270
|
|
|
271
271
|
/**
|
|
272
272
|
* @private
|
|
@@ -1193,7 +1193,7 @@ class Map extends BaseObject {
|
|
|
1193
1193
|
}
|
|
1194
1194
|
|
|
1195
1195
|
if (frameState && this.renderer_ && !frameState.animate) {
|
|
1196
|
-
if (this.renderComplete_
|
|
1196
|
+
if (this.renderComplete_) {
|
|
1197
1197
|
if (this.hasListener(RenderEventType.RENDERCOMPLETE)) {
|
|
1198
1198
|
this.renderer_.dispatchRenderEvent(
|
|
1199
1199
|
RenderEventType.RENDERCOMPLETE,
|
|
@@ -1608,13 +1608,12 @@ class Map extends BaseObject {
|
|
|
1608
1608
|
this.dispatchEvent(new MapEvent(MapEventType.POSTRENDER, this, frameState));
|
|
1609
1609
|
|
|
1610
1610
|
this.renderComplete_ =
|
|
1611
|
-
this.hasListener(MapEventType.LOADSTART) ||
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
: undefined;
|
|
1611
|
+
(this.hasListener(MapEventType.LOADSTART) ||
|
|
1612
|
+
this.hasListener(MapEventType.LOADEND) ||
|
|
1613
|
+
this.hasListener(RenderEventType.RENDERCOMPLETE)) &&
|
|
1614
|
+
!this.tileQueue_.getTilesLoading() &&
|
|
1615
|
+
!this.tileQueue_.getCount() &&
|
|
1616
|
+
!this.getLoadingOrNotReady();
|
|
1618
1617
|
|
|
1619
1618
|
if (!this.postRenderTimeoutHandle_) {
|
|
1620
1619
|
this.postRenderTimeoutHandle_ = setTimeout(() => {
|
package/Tile.d.ts
CHANGED
|
@@ -137,16 +137,8 @@ declare class Tile extends EventTarget {
|
|
|
137
137
|
*/
|
|
138
138
|
protected state: any;
|
|
139
139
|
/**
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
* on the source.
|
|
143
|
-
* @type {Tile|null}
|
|
144
|
-
*/
|
|
145
|
-
interimTile: Tile | null;
|
|
146
|
-
/**
|
|
147
|
-
* A key assigned to the tile. This is used by the tile source to determine
|
|
148
|
-
* if this tile can effectively be used, or if a new tile should be created
|
|
149
|
-
* and this one be used as an interim tile for this new tile.
|
|
140
|
+
* A key assigned to the tile. This is used in conjunction with a source key
|
|
141
|
+
* to determine if a cached version of this tile may be used by the renderer.
|
|
150
142
|
* @type {string}
|
|
151
143
|
*/
|
|
152
144
|
key: string;
|
|
@@ -179,18 +171,6 @@ declare class Tile extends EventTarget {
|
|
|
179
171
|
* @return {string} Key.
|
|
180
172
|
*/
|
|
181
173
|
getKey(): string;
|
|
182
|
-
/**
|
|
183
|
-
* Get the interim tile most suitable for rendering using the chain of interim
|
|
184
|
-
* tiles. This corresponds to the most recent tile that has been loaded, if no
|
|
185
|
-
* such tile exists, the original tile is returned.
|
|
186
|
-
* @return {!Tile} Best tile for rendering.
|
|
187
|
-
*/
|
|
188
|
-
getInterimTile(): Tile;
|
|
189
|
-
/**
|
|
190
|
-
* Goes through the chain of interim tiles and discards sections of the chain
|
|
191
|
-
* that are no longer relevant.
|
|
192
|
-
*/
|
|
193
|
-
refreshInterimChain(): void;
|
|
194
174
|
/**
|
|
195
175
|
* Get the tile coordinate for this tile.
|
|
196
176
|
* @return {import("./tilecoord.js").TileCoord} The tile coordinate.
|
package/Tile.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tile.d.ts","sourceRoot":"","sources":["Tile.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCA0CsB,IAAI,QAAE,MAAM,KAAG,IAAI;;;;;;;;;;;iCAcnB,OAAO,gBAAgB,EAAE,SAAS,QAAE,MAAM,QAC/D,OAAmB,sBAAsB,EAAE,OAAO,KAAG,CAAC,MAAM,GAAC,SAAS,CAAC;;;;;;;;;;;;;AAhDxE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH;;;;;;;;;;;;;GAaG;AAEH;;;;;;;GAOG;AAEH;;;;;GAKG;AACH;IACE;;;;OAIG;IACH,uBAJW,OAAO,gBAAgB,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"Tile.d.ts","sourceRoot":"","sources":["Tile.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCA0CsB,IAAI,QAAE,MAAM,KAAG,IAAI;;;;;;;;;;;iCAcnB,OAAO,gBAAgB,EAAE,SAAS,QAAE,MAAM,QAC/D,OAAmB,sBAAsB,EAAE,OAAO,KAAG,CAAC,MAAM,GAAC,SAAS,CAAC;;;;;;;;;;;;;AAhDxE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH;;;;;;;;;;;;;GAaG;AAEH;;;;;;;GAOG;AAEH;;;;;GAKG;AACH;IACE;;;;OAIG;IACH,uBAJW,OAAO,gBAAgB,EAAE,SAAS,6CA6C5C;IApCC;;OAEG;IACH,WAFU,OAAO,gBAAgB,EAAE,SAAS,CAElB;IAE1B;;;OAGG;IACH,qBAAkB;IAElB;;;;OAIG;IACH,KAFU,MAAM,CAEH;IAEb;;;OAGG;IACH,aAFU,MAAM,CAG6C;IAE7D;;;;OAIG;IACH;YAFiB,MAAM,GAAE,MAAM;MAEJ;IAE3B;;OAEG;IACH,aAFU,OAAO,CAEuB;IAG1C;;OAEG;IACH,0BAEC;IAED;;OAEG;IACH,gBAKC;IAED;;OAEG;IACH,UAFY,MAAM,CAIjB;IAED;;;;OAIG;IACH,gBAHY,OAAO,gBAAgB,EAAE,SAAS,CAK7C;IAED;;OAEG;IACH,gBAEC;IAED;;;;;;;OAOG;IACH,2BAMC;IAED;;;;;;OAMG;IACH,aAEC;IAED;;;;;OAKG;IACH,aAJW,MAAM,QACN,MAAM,GACL,MAAM,CAoBjB;IAED;;;;;;OAMG;IACH,iBAHW,MAAM,GACL,OAAO,CAOlB;IAED;;;OAGG;IACH,kBAFW,MAAM,QAMhB;CACF;wBA9OuB,oBAAoB"}
|
package/Tile.js
CHANGED
|
@@ -97,17 +97,8 @@ class Tile extends EventTarget {
|
|
|
97
97
|
this.state = state;
|
|
98
98
|
|
|
99
99
|
/**
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
* on the source.
|
|
103
|
-
* @type {Tile|null}
|
|
104
|
-
*/
|
|
105
|
-
this.interimTile = null;
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* A key assigned to the tile. This is used by the tile source to determine
|
|
109
|
-
* if this tile can effectively be used, or if a new tile should be created
|
|
110
|
-
* and this one be used as an interim tile for this new tile.
|
|
100
|
+
* A key assigned to the tile. This is used in conjunction with a source key
|
|
101
|
+
* to determine if a cached version of this tile may be used by the renderer.
|
|
111
102
|
* @type {string}
|
|
112
103
|
*/
|
|
113
104
|
this.key = '';
|
|
@@ -156,72 +147,6 @@ class Tile extends EventTarget {
|
|
|
156
147
|
return this.key + '/' + this.tileCoord;
|
|
157
148
|
}
|
|
158
149
|
|
|
159
|
-
/**
|
|
160
|
-
* Get the interim tile most suitable for rendering using the chain of interim
|
|
161
|
-
* tiles. This corresponds to the most recent tile that has been loaded, if no
|
|
162
|
-
* such tile exists, the original tile is returned.
|
|
163
|
-
* @return {!Tile} Best tile for rendering.
|
|
164
|
-
*/
|
|
165
|
-
getInterimTile() {
|
|
166
|
-
let tile = this.interimTile;
|
|
167
|
-
if (!tile) {
|
|
168
|
-
//empty chain
|
|
169
|
-
return this;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
// find the first loaded tile and return it. Since the chain is sorted in
|
|
173
|
-
// decreasing order of creation time, there is no need to search the remainder
|
|
174
|
-
// of the list (all those tiles correspond to older requests and will be
|
|
175
|
-
// cleaned up by refreshInterimChain)
|
|
176
|
-
do {
|
|
177
|
-
if (tile.getState() == TileState.LOADED) {
|
|
178
|
-
// Show tile immediately instead of fading it in after loading, because
|
|
179
|
-
// the interim tile is in place already
|
|
180
|
-
this.transition_ = 0;
|
|
181
|
-
return tile;
|
|
182
|
-
}
|
|
183
|
-
tile = tile.interimTile;
|
|
184
|
-
} while (tile);
|
|
185
|
-
|
|
186
|
-
// we can not find a better tile
|
|
187
|
-
return this;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* Goes through the chain of interim tiles and discards sections of the chain
|
|
192
|
-
* that are no longer relevant.
|
|
193
|
-
*/
|
|
194
|
-
refreshInterimChain() {
|
|
195
|
-
let tile = this.interimTile;
|
|
196
|
-
if (!tile) {
|
|
197
|
-
return;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/** @type {Tile} */
|
|
201
|
-
let prev = this;
|
|
202
|
-
do {
|
|
203
|
-
if (tile.getState() == TileState.LOADED) {
|
|
204
|
-
//we have a loaded tile, we can discard the rest of the list
|
|
205
|
-
//we would could abort any LOADING tile request
|
|
206
|
-
//older than this tile (i.e. any LOADING tile following this entry in the chain)
|
|
207
|
-
tile.interimTile = null;
|
|
208
|
-
break;
|
|
209
|
-
}
|
|
210
|
-
if (tile.getState() == TileState.LOADING) {
|
|
211
|
-
//keep this LOADING tile any loaded tiles later in the chain are
|
|
212
|
-
//older than this tile, so we're still interested in the request
|
|
213
|
-
prev = tile;
|
|
214
|
-
} else if (tile.getState() == TileState.IDLE) {
|
|
215
|
-
//the head of the list is the most current tile, we don't need
|
|
216
|
-
//to start any other requests for this chain
|
|
217
|
-
prev.interimTile = tile.interimTile;
|
|
218
|
-
} else {
|
|
219
|
-
prev = tile;
|
|
220
|
-
}
|
|
221
|
-
tile = prev.interimTile;
|
|
222
|
-
} while (tile);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
150
|
/**
|
|
226
151
|
* Get the tile coordinate for this tile.
|
|
227
152
|
* @return {import("./tilecoord.js").TileCoord} The tile coordinate.
|
package/TileQueue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TileQueue.d.ts","sourceRoot":"","sources":["TileQueue.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TileQueue.d.ts","sourceRoot":"","sources":["TileQueue.js"],"names":[],"mappings":"AAiIA;;;;;;;GAOG;AACH,4CAPW,OAAO,UAAU,EAAE,UAAU,QAC7B,OAAO,WAAW,EAAE,OAAO,iBAC3B,MAAM,cACN,OAAO,iBAAiB,EAAE,UAAU,kBACpC,MAAM,GACL,MAAM,CA8BjB;;sCA7JqB,OAAO,WAAW,EAAE,OAAO,QAAE,MAAM,QAAE,OAAO,iBAAiB,EAAE,UAAU,QAAE,MAAM,KAAG,MAAM;AADhH;;GAEG;AAEH;IACE;;;OAGG;IACH,kCAHW,gBAAgB,qCAyC1B;IApBC,eAAe;IACf,+BAA8D;IAE9D;;;OAGG;IACH,4BAA6C;IAE7C;;;OAGG;IACH,sBAAsB;IAEtB;;;OAGG;IACH,0BAA2B;IAG7B;;;OAGG;IACH,yBAFY,OAAO,CASlB;IAED;;OAEG;IACH,mBAFY,MAAM,CAIjB;IAED;;;OAGG;IACH,kCAHW,OAAO,mBAAmB,EAAE,OAAO,QAqB7C;IAED;;;OAGG;IACH,+BAHW,MAAM,eACN,MAAM,QAsBhB;CACF;0BAzHiC,4BAA4B"}
|
package/TileQueue.js
CHANGED
|
@@ -104,15 +104,17 @@ class TileQueue extends PriorityQueue {
|
|
|
104
104
|
*/
|
|
105
105
|
loadMoreTiles(maxTotalLoading, maxNewLoads) {
|
|
106
106
|
let newLoads = 0;
|
|
107
|
-
let state, tile, tileKey;
|
|
108
107
|
while (
|
|
109
108
|
this.tilesLoading_ < maxTotalLoading &&
|
|
110
109
|
newLoads < maxNewLoads &&
|
|
111
110
|
this.getCount() > 0
|
|
112
111
|
) {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
112
|
+
/**
|
|
113
|
+
* @type {import("./Tile.js").default}
|
|
114
|
+
*/
|
|
115
|
+
const tile = this.dequeue()[0];
|
|
116
|
+
const tileKey = tile.getKey();
|
|
117
|
+
const state = tile.getState();
|
|
116
118
|
if (state === TileState.IDLE && !(tileKey in this.tilesLoadingKeys_)) {
|
|
117
119
|
this.tilesLoadingKeys_[tileKey] = true;
|
|
118
120
|
++this.tilesLoading_;
|
package/VectorRenderTile.d.ts
CHANGED
|
@@ -40,16 +40,14 @@ declare class VectorRenderTile extends Tile {
|
|
|
40
40
|
constructor(tileCoord: import("./tilecoord.js").TileCoord, state: any, urlTileCoord: import("./tilecoord.js").TileCoord, getSourceTiles: (arg0: VectorRenderTile) => Array<import("./VectorTile").default<any>>);
|
|
41
41
|
/**
|
|
42
42
|
* @private
|
|
43
|
-
* @type {
|
|
43
|
+
* @type {CanvasRenderingContext2D|null}
|
|
44
44
|
*/
|
|
45
45
|
private context_;
|
|
46
46
|
/**
|
|
47
|
-
* Executor groups
|
|
48
|
-
* @type {
|
|
47
|
+
* Executor groups. Read/written by the renderer.
|
|
48
|
+
* @type {Array<import("./render/canvas/ExecutorGroup.js").default>}
|
|
49
49
|
*/
|
|
50
|
-
executorGroups:
|
|
51
|
-
[x: string]: Array<import("./render/canvas/ExecutorGroup.js").default>;
|
|
52
|
-
};
|
|
50
|
+
executorGroups: Array<import("./render/canvas/ExecutorGroup.js").default>;
|
|
53
51
|
/**
|
|
54
52
|
* Number of loading source tiles. Read/written by the source.
|
|
55
53
|
* @type {number}
|
|
@@ -89,21 +87,18 @@ declare class VectorRenderTile extends Tile {
|
|
|
89
87
|
*/
|
|
90
88
|
wrappedTileCoord: import("./tilecoord.js").TileCoord;
|
|
91
89
|
/**
|
|
92
|
-
* @param {import("./layer/Layer.js").default} layer Layer.
|
|
93
90
|
* @return {CanvasRenderingContext2D} The rendering context.
|
|
94
91
|
*/
|
|
95
|
-
getContext(
|
|
92
|
+
getContext(): CanvasRenderingContext2D;
|
|
96
93
|
/**
|
|
97
|
-
* @
|
|
98
|
-
* @return {boolean} Tile has a rendering context for the given layer.
|
|
94
|
+
* @return {boolean} Tile has a rendering context.
|
|
99
95
|
*/
|
|
100
|
-
hasContext(
|
|
96
|
+
hasContext(): boolean;
|
|
101
97
|
/**
|
|
102
98
|
* Get the Canvas for this tile.
|
|
103
|
-
* @param {import("./layer/Layer.js").default} layer Layer.
|
|
104
99
|
* @return {HTMLCanvasElement} Canvas.
|
|
105
100
|
*/
|
|
106
|
-
getImage(
|
|
101
|
+
getImage(): HTMLCanvasElement;
|
|
107
102
|
/**
|
|
108
103
|
* @param {import("./layer/Layer.js").default} layer Layer.
|
|
109
104
|
* @return {ReplayState} The replay state.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorRenderTile.d.ts","sourceRoot":"","sources":["VectorRenderTile.js"],"names":[],"mappings":";;;;;WASc,OAAO;;;;yBACP,IAAI,GAAC,OAAO,aAAa,EAAE,aAAa;;;;0BACxC,MAAM;;;;wBACN,MAAM;;;;sBACN,MAAM;;;;4BACN,MAAM;;;;mBACN,MAAM;;AAQpB;IACE;;;;;;OAMG;IACH,uBANW,OAAO,gBAAgB,EAAE,SAAS,4BAElC,OAAO,gBAAgB,EAAE,SAAS,yBACzB,gBAAgB,KAAE,0CAAqC,EA2D1E;IArDC;;;OAGG;IACH,
|
|
1
|
+
{"version":3,"file":"VectorRenderTile.d.ts","sourceRoot":"","sources":["VectorRenderTile.js"],"names":[],"mappings":";;;;;WASc,OAAO;;;;yBACP,IAAI,GAAC,OAAO,aAAa,EAAE,aAAa;;;;0BACxC,MAAM;;;;wBACN,MAAM;;;;sBACN,MAAM;;;;4BACN,MAAM;;;;mBACN,MAAM;;AAQpB;IACE;;;;;;OAMG;IACH,uBANW,OAAO,gBAAgB,EAAE,SAAS,4BAElC,OAAO,gBAAgB,EAAE,SAAS,yBACzB,gBAAgB,KAAE,0CAAqC,EA2D1E;IArDC;;;OAGG;IACH,iBAAoB;IAEpB;;;OAGG;IACH,gBAFU,MAAM,OAAO,kCAAkC,EAAE,OAAO,CAAC,CAE3C;IAExB;;;OAGG;IACH,oBAFU,MAAM,CAEW;IAE3B;;OAEG;IACH;YAFiB,MAAM,GAAE,SAAS;MAEH;IAE/B;;;OAGG;IACH,qBAAsB;IAEtB;;OAEG;IACH,aAFU,0CAAwC,CAE7B;IAErB;;OAEG;IACH;YAFiB,MAAM,GAAE,OAAO;MAET;IAEvB;;OAEG;IACH,kBAFU,MAAM,CAEK;IAErB;;OAEG;IACH,sBAFsB,0CAAwC,CAEJ;IAE1D;;OAEG;IACH,kBAFU,OAAO,gBAAgB,EAAE,SAAS,CAER;IAGtC;;OAEG;IACH,cAFY,wBAAwB,CAOnC;IAED;;OAEG;IACH,cAFY,OAAO,CAIlB;IAED;;;OAGG;IACH,YAFY,iBAAiB,CAI5B;IAED;;;OAGG;IACH,sBAHW,OAAO,kBAAkB,EAAE,OAAO,GACjC,WAAW,CAgBtB;CAkBF;iBAnJgB,WAAW"}
|
package/VectorRenderTile.js
CHANGED
|
@@ -34,15 +34,15 @@ class VectorRenderTile extends Tile {
|
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* @private
|
|
37
|
-
* @type {
|
|
37
|
+
* @type {CanvasRenderingContext2D|null}
|
|
38
38
|
*/
|
|
39
|
-
this.context_ =
|
|
39
|
+
this.context_ = null;
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
|
-
* Executor groups
|
|
43
|
-
* @type {
|
|
42
|
+
* Executor groups. Read/written by the renderer.
|
|
43
|
+
* @type {Array<import("./render/canvas/ExecutorGroup.js").default>}
|
|
44
44
|
*/
|
|
45
|
-
this.executorGroups =
|
|
45
|
+
this.executorGroups = [];
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
48
|
* Number of loading source tiles. Read/written by the source.
|
|
@@ -88,32 +88,28 @@ class VectorRenderTile extends Tile {
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
/**
|
|
91
|
-
* @param {import("./layer/Layer.js").default} layer Layer.
|
|
92
91
|
* @return {CanvasRenderingContext2D} The rendering context.
|
|
93
92
|
*/
|
|
94
|
-
getContext(
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
this.context_[key] = createCanvasContext2D(1, 1, canvasPool);
|
|
93
|
+
getContext() {
|
|
94
|
+
if (!this.context_) {
|
|
95
|
+
this.context_ = createCanvasContext2D(1, 1, canvasPool);
|
|
98
96
|
}
|
|
99
|
-
return this.context_
|
|
97
|
+
return this.context_;
|
|
100
98
|
}
|
|
101
99
|
|
|
102
100
|
/**
|
|
103
|
-
* @
|
|
104
|
-
* @return {boolean} Tile has a rendering context for the given layer.
|
|
101
|
+
* @return {boolean} Tile has a rendering context.
|
|
105
102
|
*/
|
|
106
|
-
hasContext(
|
|
107
|
-
return
|
|
103
|
+
hasContext() {
|
|
104
|
+
return !!this.context_;
|
|
108
105
|
}
|
|
109
106
|
|
|
110
107
|
/**
|
|
111
108
|
* Get the Canvas for this tile.
|
|
112
|
-
* @param {import("./layer/Layer.js").default} layer Layer.
|
|
113
109
|
* @return {HTMLCanvasElement} Canvas.
|
|
114
110
|
*/
|
|
115
|
-
getImage(
|
|
116
|
-
return this.hasContext(
|
|
111
|
+
getImage() {
|
|
112
|
+
return this.hasContext() ? this.getContext().canvas : null;
|
|
117
113
|
}
|
|
118
114
|
|
|
119
115
|
/**
|
|
@@ -147,12 +143,9 @@ class VectorRenderTile extends Tile {
|
|
|
147
143
|
* Remove from the cache due to expiry
|
|
148
144
|
*/
|
|
149
145
|
release() {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
canvasPool.push(context.canvas);
|
|
154
|
-
delete this.context_[key];
|
|
155
|
-
}
|
|
146
|
+
releaseCanvas(this.context_);
|
|
147
|
+
canvasPool.push(this.context_.canvas);
|
|
148
|
+
this.context_ = null;
|
|
156
149
|
super.release();
|
|
157
150
|
}
|
|
158
151
|
}
|
package/VectorTile.d.ts
CHANGED
|
@@ -7,11 +7,11 @@ declare class VectorTile<FeatureType extends import("./Feature.js").FeatureLike>
|
|
|
7
7
|
* @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate.
|
|
8
8
|
* @param {import("./TileState.js").default} state State.
|
|
9
9
|
* @param {string} src Data source url.
|
|
10
|
-
* @param {import("./format/Feature.js").default<
|
|
10
|
+
* @param {import("./format/Feature.js").default<FeatureType>} format Feature format.
|
|
11
11
|
* @param {import("./Tile.js").LoadFunction} tileLoadFunction Tile load function.
|
|
12
12
|
* @param {import("./Tile.js").Options} [options] Tile options.
|
|
13
13
|
*/
|
|
14
|
-
constructor(tileCoord: import("./tilecoord.js").TileCoord, state: any, src: string, format: import("./format/Feature.js").default<
|
|
14
|
+
constructor(tileCoord: import("./tilecoord.js").TileCoord, state: any, src: string, format: import("./format/Feature.js").default<FeatureType>, tileLoadFunction: import("./Tile.js").LoadFunction, options?: import("./Tile.js").Options | undefined);
|
|
15
15
|
/**
|
|
16
16
|
* Extent of this tile; set by the source.
|
|
17
17
|
* @type {import("./extent.js").Extent}
|
|
@@ -19,7 +19,7 @@ declare class VectorTile<FeatureType extends import("./Feature.js").FeatureLike>
|
|
|
19
19
|
extent: import("./extent.js").Extent;
|
|
20
20
|
/**
|
|
21
21
|
* @private
|
|
22
|
-
* @type {import("./format/Feature.js").default<
|
|
22
|
+
* @type {import("./format/Feature.js").default<FeatureType>}
|
|
23
23
|
*/
|
|
24
24
|
private format_;
|
|
25
25
|
/**
|
|
@@ -54,10 +54,10 @@ declare class VectorTile<FeatureType extends import("./Feature.js").FeatureLike>
|
|
|
54
54
|
private url_;
|
|
55
55
|
/**
|
|
56
56
|
* Get the feature format assigned for reading this tile's features.
|
|
57
|
-
* @return {import("./format/Feature.js").default<
|
|
57
|
+
* @return {import("./format/Feature.js").default<FeatureType>} Feature format.
|
|
58
58
|
* @api
|
|
59
59
|
*/
|
|
60
|
-
getFormat(): import("./format/Feature.js").default<
|
|
60
|
+
getFormat(): import("./format/Feature.js").default<FeatureType>;
|
|
61
61
|
/**
|
|
62
62
|
* Get the features for this tile. Geometries will be in the view projection.
|
|
63
63
|
* @return {Array<FeatureType>} Features.
|
package/VectorTile.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorTile.d.ts","sourceRoot":"","sources":["VectorTile.js"],"names":[],"mappings":";AAMA;;GAEG;AACH;IACE;;;;;;;OAOG;IACH,uBAPW,OAAO,gBAAgB,EAAE,SAAS,mBAElC,MAAM,UACN,OAAO,qBAAqB,EAAE,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"VectorTile.d.ts","sourceRoot":"","sources":["VectorTile.js"],"names":[],"mappings":";AAMA;;GAEG;AACH;IACE;;;;;;;OAOG;IACH,uBAPW,OAAO,gBAAgB,EAAE,SAAS,mBAElC,MAAM,UACN,OAAO,qBAAqB,EAAE,OAAO,CAAC,WAAW,CAAC,oBAClD,OAAO,WAAW,EAAE,YAAY,qDAuD1C;IAjDC;;;OAGG;IACH,QAFU,OAAO,aAAa,EAAE,MAAM,CAEpB;IAElB;;;OAGG;IACH,gBAAqB;IAErB;;;OAGG;IACH,kBAAqB;IAErB;;;OAGG;IACH,gBAAY;IAEZ;;;OAGG;IACH,YAFU,OAAO,sBAAsB,EAAE,OAAO,CAE1B;IAEtB;;;OAGG;IACH,YAFU,MAAM,CAED;IAEf;;;OAGG;IACH,0BAAyC;IAEzC;;;OAGG;IACH,aAAe;IAKjB;;;;OAIG;IACH,aAHY,OAAO,qBAAqB,EAAE,OAAO,CAAC,WAAW,CAAC,CAK7D;IAED;;;;OAIG;IACH,eAHY,MAAM,WAAW,CAAC,CAK7B;IAeD;;;;OAIG;IACH,iBAHW,MAAM,WAAW,CAAC,kBAClB,OAAO,sBAAsB,EAAE,OAAO,QAIhD;IAED;;OAEG;IACH,gBAEC;IAED;;;;;OAKG;IACH,sBAHW,MAAM,WAAW,CAAC,QAM5B;IAED;;;;OAIG;IACH,kBAHW,OAAO,oBAAoB,EAAE,aAAa,CAAC,WAAW,CAAC,QAKjE;CACF;iBAvIgB,WAAW"}
|
package/VectorTile.js
CHANGED
|
@@ -12,7 +12,7 @@ class VectorTile extends Tile {
|
|
|
12
12
|
* @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate.
|
|
13
13
|
* @param {import("./TileState.js").default} state State.
|
|
14
14
|
* @param {string} src Data source url.
|
|
15
|
-
* @param {import("./format/Feature.js").default<
|
|
15
|
+
* @param {import("./format/Feature.js").default<FeatureType>} format Feature format.
|
|
16
16
|
* @param {import("./Tile.js").LoadFunction} tileLoadFunction Tile load function.
|
|
17
17
|
* @param {import("./Tile.js").Options} [options] Tile options.
|
|
18
18
|
*/
|
|
@@ -27,7 +27,7 @@ class VectorTile extends Tile {
|
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* @private
|
|
30
|
-
* @type {import("./format/Feature.js").default<
|
|
30
|
+
* @type {import("./format/Feature.js").default<FeatureType>}
|
|
31
31
|
*/
|
|
32
32
|
this.format_ = format;
|
|
33
33
|
|
|
@@ -72,7 +72,7 @@ class VectorTile extends Tile {
|
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
74
|
* Get the feature format assigned for reading this tile's features.
|
|
75
|
-
* @return {import("./format/Feature.js").default<
|
|
75
|
+
* @return {import("./format/Feature.js").default<FeatureType>} Feature format.
|
|
76
76
|
* @api
|
|
77
77
|
*/
|
|
78
78
|
getFormat() {
|
package/dist/ol.d.ts
CHANGED
|
@@ -781,6 +781,7 @@ declare namespace ol {
|
|
|
781
781
|
export { $ol$source$ImageCanvas as ImageCanvas };
|
|
782
782
|
export { $ol$source$ImageMapGuide as ImageMapGuide };
|
|
783
783
|
export { $ol$source$ImageStatic as ImageStatic };
|
|
784
|
+
export { $ol$source$ImageTile as ImageTile };
|
|
784
785
|
export { $ol$source$ImageWMS as ImageWMS };
|
|
785
786
|
export { $ol$source$OGCMapTile as OGCMapTile };
|
|
786
787
|
export { $ol$source$OGCVectorTile as OGCVectorTile };
|
|
@@ -872,6 +873,7 @@ declare namespace ol {
|
|
|
872
873
|
export { _ol_tilecoord$getKey as getKey };
|
|
873
874
|
export { _ol_tilecoord$getKeyZXY as getKeyZXY };
|
|
874
875
|
export { _ol_tilecoord$hash as hash };
|
|
876
|
+
export { _ol_tilecoord$hashZXY as hashZXY };
|
|
875
877
|
export { _ol_tilecoord$withinExtentAndZ as withinExtentAndZ };
|
|
876
878
|
}
|
|
877
879
|
export namespace tilegrid {
|
|
@@ -892,7 +894,6 @@ declare namespace ol {
|
|
|
892
894
|
export { _ol_tileurlfunction$createFromTemplate as createFromTemplate };
|
|
893
895
|
export { _ol_tileurlfunction$createFromTemplates as createFromTemplates };
|
|
894
896
|
export { _ol_tileurlfunction$createFromTileUrlFunctions as createFromTileUrlFunctions };
|
|
895
|
-
export { _ol_tileurlfunction$expandUrl as expandUrl };
|
|
896
897
|
export { _ol_tileurlfunction$nullTileUrlFunction as nullTileUrlFunction };
|
|
897
898
|
}
|
|
898
899
|
export namespace transform {
|
|
@@ -915,6 +916,9 @@ declare namespace ol {
|
|
|
915
916
|
}
|
|
916
917
|
export namespace uri {
|
|
917
918
|
export { _ol_uri$appendParams as appendParams };
|
|
919
|
+
export { _ol_uri$expandUrl as expandUrl };
|
|
920
|
+
export { _ol_uri$pickUrl as pickUrl };
|
|
921
|
+
export { _ol_uri$renderXYZTemplate as renderXYZTemplate };
|
|
918
922
|
}
|
|
919
923
|
export namespace util {
|
|
920
924
|
export { _ol_util$VERSION as VERSION };
|
|
@@ -1605,6 +1609,7 @@ import $ol$source$ImageArcGISRest from '../../ol/source/ImageArcGISRest.js';
|
|
|
1605
1609
|
import $ol$source$ImageCanvas from '../../ol/source/ImageCanvas.js';
|
|
1606
1610
|
import $ol$source$ImageMapGuide from '../../ol/source/ImageMapGuide.js';
|
|
1607
1611
|
import $ol$source$ImageStatic from '../../ol/source/ImageStatic.js';
|
|
1612
|
+
import $ol$source$ImageTile from '../../ol/source/ImageTile.js';
|
|
1608
1613
|
import $ol$source$ImageWMS from '../../ol/source/ImageWMS.js';
|
|
1609
1614
|
import $ol$source$OGCMapTile from '../../ol/source/OGCMapTile.js';
|
|
1610
1615
|
import $ol$source$OGCVectorTile from '../../ol/source/OGCVectorTile.js';
|
|
@@ -1671,6 +1676,7 @@ import { getCacheKeyForTileKey as _ol_tilecoord$getCacheKeyForTileKey } from '..
|
|
|
1671
1676
|
import { getKey as _ol_tilecoord$getKey } from '../../ol/tilecoord.js';
|
|
1672
1677
|
import { getKeyZXY as _ol_tilecoord$getKeyZXY } from '../../ol/tilecoord.js';
|
|
1673
1678
|
import { hash as _ol_tilecoord$hash } from '../../ol/tilecoord.js';
|
|
1679
|
+
import { hashZXY as _ol_tilecoord$hashZXY } from '../../ol/tilecoord.js';
|
|
1674
1680
|
import { withinExtentAndZ as _ol_tilecoord$withinExtentAndZ } from '../../ol/tilecoord.js';
|
|
1675
1681
|
import $ol$tilegrid$TileGrid from '../../ol/tilegrid/TileGrid.js';
|
|
1676
1682
|
import $ol$tilegrid$WMTS from '../../ol/tilegrid/WMTS.js';
|
|
@@ -1685,7 +1691,6 @@ import { wrapX as _ol_tilegrid$wrapX } from '../../ol/tilegrid.js';
|
|
|
1685
1691
|
import { createFromTemplate as _ol_tileurlfunction$createFromTemplate } from '../../ol/tileurlfunction.js';
|
|
1686
1692
|
import { createFromTemplates as _ol_tileurlfunction$createFromTemplates } from '../../ol/tileurlfunction.js';
|
|
1687
1693
|
import { createFromTileUrlFunctions as _ol_tileurlfunction$createFromTileUrlFunctions } from '../../ol/tileurlfunction.js';
|
|
1688
|
-
import { expandUrl as _ol_tileurlfunction$expandUrl } from '../../ol/tileurlfunction.js';
|
|
1689
1694
|
import { nullTileUrlFunction as _ol_tileurlfunction$nullTileUrlFunction } from '../../ol/tileurlfunction.js';
|
|
1690
1695
|
import { apply as _ol_transform$apply } from '../../ol/transform.js';
|
|
1691
1696
|
import { compose as _ol_transform$compose } from '../../ol/transform.js';
|
|
@@ -1704,6 +1709,9 @@ import { setFromArray as _ol_transform$setFromArray } from '../../ol/transform.j
|
|
|
1704
1709
|
import { toString as _ol_transform$toString } from '../../ol/transform.js';
|
|
1705
1710
|
import { translate as _ol_transform$translate } from '../../ol/transform.js';
|
|
1706
1711
|
import { appendParams as _ol_uri$appendParams } from '../../ol/uri.js';
|
|
1712
|
+
import { expandUrl as _ol_uri$expandUrl } from '../../ol/uri.js';
|
|
1713
|
+
import { pickUrl as _ol_uri$pickUrl } from '../../ol/uri.js';
|
|
1714
|
+
import { renderXYZTemplate as _ol_uri$renderXYZTemplate } from '../../ol/uri.js';
|
|
1707
1715
|
import { VERSION as _ol_util$VERSION } from '../../ol/util.js';
|
|
1708
1716
|
import { abstract as _ol_util$abstract } from '../../ol/util.js';
|
|
1709
1717
|
import { getUid as _ol_util$getUid } from '../../ol/util.js';
|