ol-stac 1.0.0-beta.7 → 1.0.0-beta.9

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.
Files changed (121) hide show
  1. package/events/ErrorEvent.d.ts +20 -0
  2. package/events/ErrorEvent.d.ts.map +1 -0
  3. package/{src/ol/events → events}/ErrorEvent.js +10 -12
  4. package/events/ErrorEvent.js.map +1 -0
  5. package/layer/STAC.d.ts +421 -0
  6. package/layer/STAC.d.ts.map +1 -0
  7. package/layer/STAC.js +776 -0
  8. package/layer/STAC.js.map +1 -0
  9. package/package.json +7 -78
  10. package/source/type.d.ts +110 -0
  11. package/source/type.d.ts.map +1 -0
  12. package/source/type.js +104 -0
  13. package/source/type.js.map +1 -0
  14. package/util.d.ts +58 -0
  15. package/util.d.ts.map +1 -0
  16. package/util.js +166 -0
  17. package/util.js.map +1 -0
  18. package/.eslintignore +0 -2
  19. package/.github/workflows/deploy.yml +0 -67
  20. package/.github/workflows/publish.yml +0 -32
  21. package/.github/workflows/release.yml +0 -21
  22. package/.github/workflows/test.yml +0 -82
  23. package/CHANGELOG.md +0 -57
  24. package/DEVELOPING.md +0 -104
  25. package/config/jsdoc/api/conf.json +0 -37
  26. package/config/jsdoc/api/index.md +0 -3
  27. package/config/jsdoc/api/readme.md +0 -61
  28. package/config/jsdoc/api/template/README.md +0 -3
  29. package/config/jsdoc/api/template/publish.js +0 -743
  30. package/config/jsdoc/api/template/static/scripts/linenumber.js +0 -11
  31. package/config/jsdoc/api/template/static/scripts/main.js +0 -305
  32. package/config/jsdoc/api/template/static/scripts/prettify/Apache-License-2.0.txt +0 -202
  33. package/config/jsdoc/api/template/static/scripts/prettify/lang-css.js +0 -2
  34. package/config/jsdoc/api/template/static/scripts/prettify/prettify.js +0 -28
  35. package/config/jsdoc/api/template/static/styles/carbon.css +0 -65
  36. package/config/jsdoc/api/template/static/styles/jaguar.css +0 -512
  37. package/config/jsdoc/api/template/static/styles/prettify-jsdoc.css +0 -111
  38. package/config/jsdoc/api/template/static/styles/prettify-tomorrow.css +0 -132
  39. package/config/jsdoc/api/template/static/theme +0 -1
  40. package/config/jsdoc/api/template/tmpl/container.tmpl +0 -197
  41. package/config/jsdoc/api/template/tmpl/details.tmpl +0 -84
  42. package/config/jsdoc/api/template/tmpl/example.tmpl +0 -2
  43. package/config/jsdoc/api/template/tmpl/examples.tmpl +0 -16
  44. package/config/jsdoc/api/template/tmpl/exceptions.tmpl +0 -30
  45. package/config/jsdoc/api/template/tmpl/layout.tmpl +0 -93
  46. package/config/jsdoc/api/template/tmpl/mainpage.tmpl +0 -14
  47. package/config/jsdoc/api/template/tmpl/members.tmpl +0 -38
  48. package/config/jsdoc/api/template/tmpl/method.tmpl +0 -132
  49. package/config/jsdoc/api/template/tmpl/navigation.tmpl +0 -59
  50. package/config/jsdoc/api/template/tmpl/observables.tmpl +0 -39
  51. package/config/jsdoc/api/template/tmpl/params.tmpl +0 -109
  52. package/config/jsdoc/api/template/tmpl/properties.tmpl +0 -85
  53. package/config/jsdoc/api/template/tmpl/returns.tmpl +0 -72
  54. package/config/jsdoc/api/template/tmpl/source.tmpl +0 -8
  55. package/config/jsdoc/api/template/tmpl/stability.tmpl +0 -7
  56. package/config/jsdoc/api/template/tmpl/tutorial.tmpl +0 -19
  57. package/config/jsdoc/api/template/tmpl/type.tmpl +0 -7
  58. package/config/jsdoc/info/conf.json +0 -22
  59. package/config/jsdoc/info/publish.js +0 -175
  60. package/config/jsdoc/package.json +0 -4
  61. package/config/jsdoc/plugins/api.cjs +0 -163
  62. package/config/jsdoc/plugins/default-export.cjs +0 -35
  63. package/config/jsdoc/plugins/define-plugin.cjs +0 -33
  64. package/config/jsdoc/plugins/events.cjs +0 -39
  65. package/config/jsdoc/plugins/inline-options.cjs +0 -102
  66. package/config/jsdoc/plugins/markdown.cjs +0 -119
  67. package/config/jsdoc/plugins/virtual-plugin.cjs +0 -16
  68. package/config/tsconfig-build.json +0 -25
  69. package/examples/.eslintrc +0 -29
  70. package/examples/index.html +0 -100
  71. package/examples/index.js +0 -109
  72. package/examples/planetary-computer.html +0 -14
  73. package/examples/planetary-computer.js +0 -56
  74. package/examples/resources/Jugl.js +0 -15
  75. package/examples/resources/common.js +0 -111
  76. package/examples/stac-collection-pmtiles-raster.html +0 -9
  77. package/examples/stac-collection-pmtiles-raster.js +0 -55
  78. package/examples/stac-collection-pmtiles-vector.html +0 -9
  79. package/examples/stac-collection-pmtiles-vector.js +0 -58
  80. package/examples/stac-collection-wms.html +0 -9
  81. package/examples/stac-collection-wms.js +0 -56
  82. package/examples/stac-item-from-object.html +0 -9
  83. package/examples/stac-item-from-object.js +0 -102
  84. package/examples/stac-item-tileserver.html +0 -9
  85. package/examples/stac-item-tileserver.js +0 -34
  86. package/examples/stac-item.html +0 -9
  87. package/examples/stac-item.js +0 -45
  88. package/examples/stac-itemcollection.html +0 -11
  89. package/examples/stac-itemcollection.js +0 -39
  90. package/examples/templates/example.html +0 -206
  91. package/examples/templates/readme.md +0 -3
  92. package/examples/webpack/config.mjs +0 -69
  93. package/examples/webpack/example-builder.js +0 -411
  94. package/site/build.js +0 -26
  95. package/site/layouts/default.hbs +0 -82
  96. package/site/src/doc/faq.md +0 -40
  97. package/site/src/doc/index.md +0 -16
  98. package/site/src/doc/quickstart.md +0 -45
  99. package/site/src/doc/tutorials/index.md +0 -8
  100. package/site/src/download/index.hbs +0 -47
  101. package/site/src/favicon.ico +0 -0
  102. package/site/src/index.hbs +0 -94
  103. package/site/src/theme/index.css +0 -26
  104. package/site/src/theme/site.css +0 -531
  105. package/src/ol/layer/STAC.js +0 -860
  106. package/src/ol/source/GeoTIFF2.js +0 -45
  107. package/src/ol/source/type.js +0 -108
  108. package/src/ol/util.js +0 -183
  109. package/tasks/.eslintrc +0 -5
  110. package/tasks/build-website.sh +0 -90
  111. package/tasks/create-release.js +0 -107
  112. package/tasks/get-latest-release.js +0 -36
  113. package/tasks/newest-tag.js +0 -47
  114. package/tasks/prepare-package.js +0 -41
  115. package/tasks/publish.sh +0 -90
  116. package/test/README.md +0 -56
  117. package/test/browser/.eslintrc +0 -14
  118. package/test/browser/karma.config.cjs +0 -94
  119. package/test/browser/spec/ol/layer/STAC.test.js +0 -18
  120. package/test/browser/test-extensions.js +0 -419
  121. package/tsconfig.json +0 -17
@@ -0,0 +1,20 @@
1
+ export default ErrorEvent;
2
+ /**
3
+ * @classdesc
4
+ * Event emitted on configuration or loading error.
5
+ * @api
6
+ */
7
+ declare class ErrorEvent extends BaseEvent {
8
+ /**
9
+ * @param {Error} error error object.
10
+ * @api
11
+ */
12
+ constructor(error: Error);
13
+ /**
14
+ * @type {Error}
15
+ * @api
16
+ */
17
+ error: Error;
18
+ }
19
+ import BaseEvent from 'ol/events/Event.js';
20
+ //# sourceMappingURL=ErrorEvent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorEvent.d.ts","sourceRoot":"","sources":["../../../src/ol/events/ErrorEvent.js"],"names":[],"mappings":";AAMA;;;;GAIG;AACH;IACE;;;OAGG;IACH,mBAHW,KAAK,EAWf;IALC;;;OAGG;IACH,OAHU,KAAK,CAGG;CAErB;sBAtBqB,oBAAoB"}
@@ -3,26 +3,24 @@
3
3
  */
4
4
  import BaseEvent from 'ol/events/Event.js';
5
5
  import EventType from 'ol/events/EventType.js';
6
-
7
6
  /**
8
7
  * @classdesc
9
8
  * Event emitted on configuration or loading error.
10
9
  * @api
11
10
  */
12
11
  class ErrorEvent extends BaseEvent {
13
- /**
14
- * @param {Error} error error object.
15
- * @api
16
- */
17
- constructor(error) {
18
- super(EventType.ERROR);
19
-
20
12
  /**
21
- * @type {Error}
13
+ * @param {Error} error error object.
22
14
  * @api
23
15
  */
24
- this.error = error;
25
- }
16
+ constructor(error) {
17
+ super(EventType.ERROR);
18
+ /**
19
+ * @type {Error}
20
+ * @api
21
+ */
22
+ this.error = error;
23
+ }
26
24
  }
27
-
28
25
  export default ErrorEvent;
26
+ //# sourceMappingURL=ErrorEvent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorEvent.js","sourceRoot":"","sources":["../../../src/ol/events/ErrorEvent.js"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAE/C;;;;GAIG;AACH,MAAM,UAAW,SAAQ,SAAS;IAChC;;;OAGG;IACH,YAAY,KAAK;QACf,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAEvB;;;WAGG;QACH,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF;AAED,eAAe,UAAU,CAAC"}
@@ -0,0 +1,421 @@
1
+ export default STACLayer;
2
+ export type Extent = import("ol/extent.js").Extent;
3
+ export type Layer = import("ol/layer.js").Layer;
4
+ export type Link = any;
5
+ export type Style = import('ol/style.js').Style;
6
+ export type SourceOptions = import('../source/type.js').SourceOptions;
7
+ export type Options = {
8
+ /**
9
+ * The STAC URL. Any of `url` and `data` must be provided.
10
+ * Can also be used as url for data, if it is absolute and doesn't contain a self link.
11
+ */
12
+ url?: string | undefined;
13
+ /**
14
+ * The STAC metadata. Any of `url` and `data` must be provided.
15
+ * `data` take precedence over `url`.
16
+ */
17
+ data?: STAC | Asset | any;
18
+ /**
19
+ * The selector for the assets to be rendered,
20
+ * only for STAC Items and Collections.
21
+ * This can be an array of strings corresponding to asset keys or Asset objects.
22
+ * null shows the default asset, an empty array shows no asset.
23
+ */
24
+ assets?: any[] | null | undefined;
25
+ /**
26
+ * The (one-based) bands to show.
27
+ */
28
+ bands?: number[] | undefined;
29
+ /**
30
+ * Optional function that can be used to configure the underlying sources. The function can do any additional work
31
+ * and return the completed options or a promise for the same. The function will be called with the current source options
32
+ * and the STAC Asset or Link.
33
+ * This can be useful for adding auth information such as an API token, either via query parameter or HTTP headers.
34
+ * Please be aware that sending HTTP headers may not be supported by all sources.
35
+ */
36
+ getSourceOptions?: ((arg0: SourceType, arg1: SourceOptions, arg2: (Asset | Link)) => (SourceOptions | Promise<SourceOptions>)) | undefined;
37
+ /**
38
+ * Allows to hide the footprints (bounding box/geometry) of the STAC object
39
+ * by default.
40
+ */
41
+ displayFootprint?: boolean | undefined;
42
+ /**
43
+ * Allow to choose non-cloud-optimized GeoTiffs as default image to show,
44
+ * which might not work well for larger files or larger amounts of files.
45
+ */
46
+ displayGeoTiffByDefault?: boolean | undefined;
47
+ /**
48
+ * Allow to display images that a browser can display (e.g. PNG, JPEG),
49
+ * usually assets with role `thumbnail` or the link with relation type `preview`.
50
+ * The previews are usually not covering the full extents and as such may be placed incorrectly on the map.
51
+ * For performance reasons, it is recommended to enable this option if you pass in STAC API Items.
52
+ */
53
+ displayPreview?: boolean | undefined;
54
+ /**
55
+ * Allow to display COGs and, if `displayGeoTiffByDefault` is enabled, GeoTiffs,
56
+ * usually the assets with role `overview` or `visual`.
57
+ */
58
+ displayOverview?: boolean | undefined;
59
+ /**
60
+ * Allow to display a layer
61
+ * based on the information provided through the web map links extension.
62
+ * If an array of links or link ids (property `id` in a Link Object) is provided, all corresponding layers will be shown.
63
+ * If set to true or to a specific type of web map link (`pmtiles`, `tilejson`, `wms`, `wmts`, `xyz`),
64
+ * it lets this library choose a web map link to show, but only if no other data is shown.
65
+ * To disable the functionality set this to `false`.
66
+ */
67
+ displayWebMapLink?: string | boolean | any[] | undefined;
68
+ /**
69
+ * The style for the overall bounds / footprint.
70
+ */
71
+ boundsStyle?: import("ol/style/Style.js").default | undefined;
72
+ /**
73
+ * The style for individual items in a list of STAC Items or Collections.
74
+ */
75
+ collectionStyle?: import("ol/style/Style.js").default | undefined;
76
+ /**
77
+ * For thumbnails: The `crossOrigin` attribute for loaded images / tiles.
78
+ * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
79
+ */
80
+ crossOrigin?: string | null | undefined;
81
+ /**
82
+ * A function that generates a URL template for a tile server (XYZ),
83
+ * which will be used instead of the client-side GeoTIFF rendering (except if `useTileLayerAsFallback` is `true`).
84
+ */
85
+ buildTileUrlTemplate?: ((arg0: Asset) => string | null) | undefined;
86
+ /**
87
+ * Uses the given URL template only when the client-side GeoTIFF rendering fails.
88
+ */
89
+ useTileLayerAsFallback?: boolean | undefined;
90
+ /**
91
+ * Opacity (0, 1).
92
+ */
93
+ opacity?: number | undefined;
94
+ /**
95
+ * Visibility.
96
+ */
97
+ visible?: boolean | undefined;
98
+ /**
99
+ * The bounding extent for layer rendering. The layer will not be
100
+ * rendered outside of this extent.
101
+ */
102
+ extent?: import("ol/extent.js").Extent | undefined;
103
+ /**
104
+ * The z-index for layer rendering. At rendering time, the layers
105
+ * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
106
+ * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
107
+ * method was used.
108
+ */
109
+ zIndex?: number | undefined;
110
+ /**
111
+ * The minimum resolution (inclusive) at which this layer will be
112
+ * visible.
113
+ */
114
+ minResolution?: number | undefined;
115
+ /**
116
+ * The maximum resolution (exclusive) below which this layer will
117
+ * be visible.
118
+ */
119
+ maxResolution?: number | undefined;
120
+ /**
121
+ * The minimum view zoom level (exclusive) above which this layer will be
122
+ * visible.
123
+ */
124
+ minZoom?: number | undefined;
125
+ /**
126
+ * The maximum view zoom level (inclusive) at which this layer will
127
+ * be visible.
128
+ */
129
+ maxZoom?: number | undefined;
130
+ /**
131
+ * Arbitrary observable properties. Can be accessed with `#get()` and `#set()`. `stac` and `bounds` are reserved and may be overridden.
132
+ */
133
+ properties?: {
134
+ [x: string]: any;
135
+ } | undefined;
136
+ };
137
+ /**
138
+ * @typedef {import("ol/extent.js").Extent} Extent
139
+ */
140
+ /**
141
+ * @typedef {import("ol/layer.js").Layer} Layer
142
+ */
143
+ /**
144
+ * @typedef {import("stac-js").Link} Link
145
+ */
146
+ /**
147
+ * @typedef {import('ol/style.js').Style} Style
148
+ */
149
+ /**
150
+ * @typedef {import('../source/type.js').SourceOptions} SourceOptions
151
+ */
152
+ /**
153
+ * @typedef {Object} Options
154
+ * @property {string} [url] The STAC URL. Any of `url` and `data` must be provided.
155
+ * Can also be used as url for data, if it is absolute and doesn't contain a self link.
156
+ * @property {STAC|Asset|Object} [data] The STAC metadata. Any of `url` and `data` must be provided.
157
+ * `data` take precedence over `url`.
158
+ * @property {Array<string|Asset>|null} [assets=null] The selector for the assets to be rendered,
159
+ * only for STAC Items and Collections.
160
+ * This can be an array of strings corresponding to asset keys or Asset objects.
161
+ * null shows the default asset, an empty array shows no asset.
162
+ * @property {Array<number>} [bands] The (one-based) bands to show.
163
+ * @property {function(SourceType, SourceOptions, (Asset|Link)):(SourceOptions|Promise<SourceOptions>)} [getSourceOptions]
164
+ * Optional function that can be used to configure the underlying sources. The function can do any additional work
165
+ * and return the completed options or a promise for the same. The function will be called with the current source options
166
+ * and the STAC Asset or Link.
167
+ * This can be useful for adding auth information such as an API token, either via query parameter or HTTP headers.
168
+ * Please be aware that sending HTTP headers may not be supported by all sources.
169
+ * @property {boolean} [displayFootprint=true] Allows to hide the footprints (bounding box/geometry) of the STAC object
170
+ * by default.
171
+ * @property {boolean} [displayGeoTiffByDefault=false] Allow to choose non-cloud-optimized GeoTiffs as default image to show,
172
+ * which might not work well for larger files or larger amounts of files.
173
+ * @property {boolean} [displayPreview=false] Allow to display images that a browser can display (e.g. PNG, JPEG),
174
+ * usually assets with role `thumbnail` or the link with relation type `preview`.
175
+ * The previews are usually not covering the full extents and as such may be placed incorrectly on the map.
176
+ * For performance reasons, it is recommended to enable this option if you pass in STAC API Items.
177
+ * @property {boolean} [displayOverview=true] Allow to display COGs and, if `displayGeoTiffByDefault` is enabled, GeoTiffs,
178
+ * usually the assets with role `overview` or `visual`.
179
+ * @property {string|boolean|Array<Link|string>} [displayWebMapLink=false] Allow to display a layer
180
+ * based on the information provided through the web map links extension.
181
+ * If an array of links or link ids (property `id` in a Link Object) is provided, all corresponding layers will be shown.
182
+ * If set to true or to a specific type of web map link (`pmtiles`, `tilejson`, `wms`, `wmts`, `xyz`),
183
+ * it lets this library choose a web map link to show, but only if no other data is shown.
184
+ * To disable the functionality set this to `false`.
185
+ * @property {Style} [boundsStyle] The style for the overall bounds / footprint.
186
+ * @property {Style} [collectionStyle] The style for individual items in a list of STAC Items or Collections.
187
+ * @property {null|string} [crossOrigin] For thumbnails: The `crossOrigin` attribute for loaded images / tiles.
188
+ * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
189
+ * @property {function(Asset):string|null} [buildTileUrlTemplate=null] A function that generates a URL template for a tile server (XYZ),
190
+ * which will be used instead of the client-side GeoTIFF rendering (except if `useTileLayerAsFallback` is `true`).
191
+ * @property {boolean} [useTileLayerAsFallback=false] Uses the given URL template only when the client-side GeoTIFF rendering fails.
192
+ * @property {number} [opacity=1] Opacity (0, 1).
193
+ * @property {boolean} [visible=true] Visibility.
194
+ * @property {Extent} [extent] The bounding extent for layer rendering. The layer will not be
195
+ * rendered outside of this extent.
196
+ * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers
197
+ * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
198
+ * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
199
+ * method was used.
200
+ * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be
201
+ * visible.
202
+ * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
203
+ * be visible.
204
+ * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be
205
+ * visible.
206
+ * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
207
+ * be visible.
208
+ * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`. `stac` and `bounds` are reserved and may be overridden.
209
+ */
210
+ /**
211
+ * @classdesc
212
+ * Renders STAC entities such as STAC Items, Collectons or lists of them as returned by APIs.
213
+ * The layers created by this LayerGroup all have a 'stac' value that can be retrieved using `layer.get('stac')`.
214
+ *
215
+ * @extends LayerGroup
216
+ * @fires sourceready
217
+ * @fires assetsready
218
+ * @fires ErorEvent#event:error
219
+ * @api
220
+ */
221
+ declare class STACLayer extends LayerGroup {
222
+ /**
223
+ * @param {Options} options Layer options.
224
+ * @api
225
+ */
226
+ constructor(options: Options);
227
+ /**
228
+ * @type {function(SourceType, SourceOptions, (Asset|Link)):(SourceOptions|Promise<SourceOptions>)}
229
+ * @private
230
+ */
231
+ private getSourceOptions_;
232
+ /**
233
+ * @type {STAC|Asset}
234
+ * @private
235
+ */
236
+ private data_;
237
+ /**
238
+ * @type {Array<Asset> | null}
239
+ * @private
240
+ */
241
+ private assets_;
242
+ /**
243
+ * @type {Array<number>}
244
+ * @private
245
+ */
246
+ private bands_;
247
+ /**
248
+ * @type {string | null}
249
+ * @private
250
+ */
251
+ private crossOrigin_;
252
+ /**
253
+ * @type {boolean}
254
+ * @private
255
+ */
256
+ private displayFootprint_;
257
+ /**
258
+ * @type {boolean}
259
+ * @private
260
+ */
261
+ private displayGeoTiffByDefault_;
262
+ /**
263
+ * @type {boolean}
264
+ * @private
265
+ */
266
+ private displayPreview_;
267
+ /**
268
+ * @type {boolean}
269
+ * @private
270
+ */
271
+ private displayOverview_;
272
+ /**
273
+ * @type {string|boolean|Array<Link|string>}
274
+ */
275
+ displayWebMapLink_: string | boolean | Array<Link | string>;
276
+ /**
277
+ * @type {function(Asset):string|null}
278
+ * @private
279
+ */
280
+ private buildTileUrlTemplate_;
281
+ /**
282
+ * @type {boolean}
283
+ * @private
284
+ */
285
+ private useTileLayerAsFallback_;
286
+ /**
287
+ * @type {Style}
288
+ * @private
289
+ */
290
+ private boundsStyle_;
291
+ /**
292
+ * @type {Style}
293
+ * @private
294
+ */
295
+ private collectionStyle_;
296
+ /**
297
+ * @type {VectorLayer|null}
298
+ * @private
299
+ */
300
+ private boundsLayer_;
301
+ /**
302
+ * Returns the vector layer that visualizes the bounds / footprint.
303
+ * @return {VectorLayer|null} The vector layer for the bounds
304
+ * @api
305
+ */
306
+ getBoundsLayer(): VectorLayer<any> | null;
307
+ /**
308
+ * @private
309
+ * @param {Error} error The error.
310
+ */
311
+ private handleError_;
312
+ /**
313
+ * @private
314
+ * @param {STAC|Asset|Object} data The STAC data.
315
+ * @param {string} url The url to the data.
316
+ * @param {Array<Asset|string> | null} assets The assets to show.
317
+ * @param {Array<number>} bands The (one-based) bands to show.
318
+ */
319
+ private configure_;
320
+ /**
321
+ * @private
322
+ * @return {Promise} Resolves when complete.
323
+ */
324
+ private addApiCollection_;
325
+ /**
326
+ * @private
327
+ * @return {Promise} Resolves when complete.
328
+ */
329
+ private addStacAssets_;
330
+ /**
331
+ * @private
332
+ * @param {Asset|Link} [ref] A STAC Link or Asset
333
+ * @return {Promise<Layer|undefined>} Resolves with a Layer or undefined when complete.
334
+ */
335
+ private addImagery_;
336
+ /**
337
+ * @private
338
+ * @param {Asset|Link} [thumbnail] A STAC Link or Asset
339
+ * @return {Promise<ImageLayer|undefined>} Resolves with am ImageLayer or udnefined when complete.
340
+ */
341
+ private addThumbnail_;
342
+ /**
343
+ * Adds a layer for the web map links available in the STAC links.
344
+ * @return {Promise<Array<Layer>|undefined>} Resolves with a Layer or undefined when complete.
345
+ */
346
+ addWebMapLinks_(): Promise<Array<Layer> | undefined>;
347
+ /**
348
+ * Adds a layer for a link that implements the web-map-links extension.
349
+ * Supports: PMTiles, TileJSON, WMS, WMTS, XYZ
350
+ * @see https://github.com/stac-extensions/web-map-links
351
+ * @param {Link} link A web map link
352
+ * @return {Promise<Array<Layer>|undefined>} Resolves with a list of layers or undefined when complete.
353
+ * @api
354
+ */
355
+ addLayerForLink(link: any): Promise<Array<Layer> | undefined>;
356
+ /**
357
+ * @private
358
+ * @param {Asset} [asset] A STAC Asset
359
+ * @return {Promise<Layer|undefined>} Resolves with a Layer or undefined when complete.
360
+ */
361
+ private addGeoTiff_;
362
+ /**
363
+ * @private
364
+ * @param {Asset|Link} [data] A STAC Asset or Link
365
+ * @return {Promise<TileLayer>} Resolves with a TileLayer when complete.
366
+ */
367
+ private addTileLayerForImagery_;
368
+ /**
369
+ * @param {Layer|LayerGroup} [layer] A Layer to add to the LayerGroup
370
+ * @param {import("stac-js").STACObject} [data] The STAC object, can be any class exposed by stac-js
371
+ * @param {number} [zIndex=0] The z-index for the layer
372
+ * @private
373
+ */
374
+ private addLayer_;
375
+ /**
376
+ * @private
377
+ * @return {VectorLayer|null} The vector layer showing the geometry/bbox.
378
+ */
379
+ private addFootprint_;
380
+ /**
381
+ * @private
382
+ */
383
+ private updateLayers_;
384
+ /**
385
+ * Indicates whether the LayerGroup shows only the bounds layer (i.e. no imagery/tile layers).
386
+ * @return {boolean} `true` if only the bounds layer is shown, `false` otherwise.
387
+ * @api
388
+ */
389
+ hasOnlyBounds(): boolean;
390
+ /**
391
+ * Returns all potential web map links based on the given value for `displayWebMapLink`.
392
+ * @return {Array<Link>} An array of links.
393
+ * @api
394
+ */
395
+ getWebMapLinks(): Array<Link>;
396
+ /**
397
+ * Update the assets to be rendered.
398
+ * @param {Array<string|Asset>|null} assets The assets to show.
399
+ * @return {Promise} Resolves when all assets are rendered.
400
+ * @api
401
+ */
402
+ setAssets(assets: Array<string | Asset> | null): Promise<any>;
403
+ /**
404
+ * Get the STAC object.
405
+ *
406
+ * @return {STAC|Asset} The STAC object.
407
+ * @api
408
+ */
409
+ getData(): STAC | Asset;
410
+ /**
411
+ * Get the STAC assets shown.
412
+ *
413
+ * @return {Array<Asset>} The STAC assets.
414
+ * @api
415
+ */
416
+ getAssets(): Array<Asset>;
417
+ }
418
+ import SourceType from '../source/type.js';
419
+ import LayerGroup from 'ol/layer/Group.js';
420
+ import VectorLayer from 'ol/layer/Vector.js';
421
+ //# sourceMappingURL=STAC.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"STAC.d.ts","sourceRoot":"","sources":["../../../src/ol/layer/STAC.js"],"names":[],"mappings":";qBAoCa,OAAO,cAAc,EAAE,MAAM;oBAG7B,OAAO,aAAa,EAAE,KAAK;;oBAM3B,OAAO,aAAa,EAA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