@vaadin/bundles 25.0.0-alpha3 → 25.0.0-alpha5
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/node_modules_ol_ImageCanvas_js.js +76 -83
- package/node_modules_ol_ImageCanvas_js.js.map +1 -1
- package/node_modules_ol_TileRange_js.js +128 -110
- package/node_modules_ol_TileRange_js.js.map +1 -1
- package/node_modules_ol_Tile_js.js +279 -0
- package/node_modules_ol_Tile_js.js.map +1 -0
- package/node_modules_ol_VectorRenderTile_js.js +428 -143
- package/node_modules_ol_VectorRenderTile_js.js.map +1 -1
- package/node_modules_ol_VectorTile_js.js +405 -119
- package/node_modules_ol_VectorTile_js.js.map +1 -1
- package/node_modules_ol_control_MousePosition_js.js +327 -0
- package/node_modules_ol_control_MousePosition_js.js.map +1 -0
- package/node_modules_ol_control_ZoomToExtent_js.js +118 -0
- package/node_modules_ol_control_ZoomToExtent_js.js.map +1 -0
- package/node_modules_ol_events_SnapEvent_js.js +79 -0
- package/node_modules_ol_events_SnapEvent_js.js.map +1 -0
- package/node_modules_ol_featureloader_js.js +205 -0
- package/node_modules_ol_featureloader_js.js.map +1 -0
- package/node_modules_ol_geom_Circle_js.js +300 -0
- package/node_modules_ol_geom_Circle_js.js.map +1 -0
- package/node_modules_ol_geom_GeometryCollection_js.js +369 -0
- package/node_modules_ol_geom_GeometryCollection_js.js.map +1 -0
- package/node_modules_ol_geom_MultiPoint_js.js +228 -0
- package/node_modules_ol_geom_MultiPoint_js.js.map +1 -0
- package/node_modules_ol_geom_flat_center_js.js +47 -0
- package/node_modules_ol_geom_flat_center_js.js.map +1 -0
- package/node_modules_ol_geom_flat_geodesic_js.js +123 -88
- package/node_modules_ol_geom_flat_geodesic_js.js.map +1 -1
- package/node_modules_ol_geom_flat_interpolate_js.js +230 -0
- package/node_modules_ol_geom_flat_interpolate_js.js.map +1 -0
- package/node_modules_ol_geom_flat_length_js-_375a0.js +58 -0
- package/node_modules_ol_geom_flat_length_js-_375a0.js.map +1 -0
- package/node_modules_ol_geom_flat_length_js-_375a1.js +58 -0
- package/node_modules_ol_geom_flat_length_js-_375a1.js.map +1 -0
- package/node_modules_ol_geom_flat_length_js-_375a2.js +58 -0
- package/node_modules_ol_geom_flat_length_js-_375a2.js.map +1 -0
- package/node_modules_ol_geom_flat_length_js-_375a3.js +58 -0
- package/node_modules_ol_geom_flat_length_js-_375a3.js.map +1 -0
- package/node_modules_ol_geom_flat_length_js-_375a4.js +58 -0
- package/node_modules_ol_geom_flat_length_js-_375a4.js.map +1 -0
- package/node_modules_ol_geom_flat_linechunk_js.js +76 -0
- package/node_modules_ol_geom_flat_linechunk_js.js.map +1 -0
- package/node_modules_ol_geom_flat_straightchunk_js.js +68 -0
- package/node_modules_ol_geom_flat_straightchunk_js.js.map +1 -0
- package/node_modules_ol_geom_flat_textpath_js.js +178 -0
- package/node_modules_ol_geom_flat_textpath_js.js.map +1 -0
- package/node_modules_ol_interaction_DblClickDragZoom_js.js +285 -0
- package/node_modules_ol_interaction_DblClickDragZoom_js.js.map +1 -0
- package/node_modules_ol_interaction_DragAndDrop_js.js +351 -0
- package/node_modules_ol_interaction_DragAndDrop_js.js.map +1 -0
- package/node_modules_ol_interaction_DragRotateAndZoom_js.js +159 -0
- package/node_modules_ol_interaction_DragRotateAndZoom_js.js.map +1 -0
- package/node_modules_ol_layer_Vector_js-_49290.js +110 -0
- package/node_modules_ol_layer_Vector_js-_49290.js.map +1 -0
- package/node_modules_ol_layer_Vector_js-_49291.js +110 -0
- package/node_modules_ol_layer_Vector_js-_49291.js.map +1 -0
- package/node_modules_ol_layer_Vector_js-_49292.js +110 -0
- package/node_modules_ol_layer_Vector_js-_49292.js.map +1 -0
- package/node_modules_ol_layer_Vector_js-_49293.js +110 -0
- package/node_modules_ol_layer_Vector_js-_49293.js.map +1 -0
- package/node_modules_ol_loadingstrategy_js.js +95 -0
- package/node_modules_ol_loadingstrategy_js.js.map +1 -0
- package/node_modules_ol_render_VectorContext_js-_3ad60.js +144 -0
- package/node_modules_ol_render_VectorContext_js-_3ad60.js.map +1 -0
- package/node_modules_ol_render_VectorContext_js-_3ad61.js +144 -0
- package/node_modules_ol_render_VectorContext_js-_3ad61.js.map +1 -0
- package/node_modules_ol_render_VectorContext_js-node_modules_ol_render_canvas_hitdetect_js.js +372 -0
- package/node_modules_ol_render_VectorContext_js-node_modules_ol_render_canvas_hitdetect_js.js.map +1 -0
- package/node_modules_ol_render_canvas_ImageBuilder_js.js +318 -0
- package/node_modules_ol_render_canvas_ImageBuilder_js.js.map +1 -0
- package/node_modules_ol_render_canvas_Instruction_js.js +66 -0
- package/node_modules_ol_render_canvas_Instruction_js.js.map +1 -0
- package/node_modules_ol_render_canvas_LineStringBuilder_js.js +187 -0
- package/node_modules_ol_render_canvas_LineStringBuilder_js.js.map +1 -0
- package/node_modules_ol_render_canvas_PolygonBuilder_js.js +276 -0
- package/node_modules_ol_render_canvas_PolygonBuilder_js.js.map +1 -0
- package/node_modules_ol_render_canvas_ZIndexContext_js-_fab20.js +156 -0
- package/node_modules_ol_render_canvas_ZIndexContext_js-_fab20.js.map +1 -0
- package/node_modules_ol_render_canvas_ZIndexContext_js-_fab21.js +156 -0
- package/node_modules_ol_render_canvas_ZIndexContext_js-_fab21.js.map +1 -0
- package/node_modules_ol_render_js-node_modules_ol_render_VectorContext_js.js +301 -0
- package/node_modules_ol_render_js-node_modules_ol_render_VectorContext_js.js.map +1 -0
- package/node_modules_ol_renderer_Layer_js.js +219 -0
- package/node_modules_ol_renderer_Layer_js.js.map +1 -0
- package/node_modules_ol_source_Source_js.js +256 -0
- package/node_modules_ol_source_Source_js.js.map +1 -0
- package/node_modules_ol_source_VectorEventType_js-node_modules_ol_structs_RBush_js.js +318 -0
- package/node_modules_ol_source_VectorEventType_js-node_modules_ol_structs_RBush_js.js.map +1 -0
- package/node_modules_ol_source_VectorEventType_js.js +80 -0
- package/node_modules_ol_source_VectorEventType_js.js.map +1 -0
- package/node_modules_ol_structs_RBush_js.js +242 -0
- package/node_modules_ol_structs_RBush_js.js.map +1 -0
- package/node_modules_ol_style_js.js +2 -1
- package/node_modules_ol_style_js.js.map +1 -1
- package/node_modules_rbush_rbush_min_js.js +16 -0
- package/node_modules_rbush_rbush_min_js.js.map +1 -0
- package/package.json +142 -146
- package/vaadin-bundle.json +2447 -2352
- package/vaadin.js +52246 -63791
- package/vaadin.js.map +1 -1
- package/vendors-node_modules_dompurify_dist_purify_es_mjs.js +1364 -0
- package/vendors-node_modules_dompurify_dist_purify_es_mjs.js.map +1 -0
- package/vendors-node_modules_dompurify_dist_purify_js.js +26 -21
- package/vendors-node_modules_dompurify_dist_purify_js.js.map +1 -1
- package/vendors-node_modules_marked_lib_marked_esm_js.js +2205 -0
- package/vendors-node_modules_marked_lib_marked_esm_js.js.map +1 -0
- package/vendors-node_modules_marked_lib_marked_umd_js.js +2164 -2556
- package/vendors-node_modules_marked_lib_marked_umd_js.js.map +1 -1
- package/vendors-node_modules_ol_Feature_js.js +360 -0
- package/vendors-node_modules_ol_Feature_js.js.map +1 -0
- package/vendors-node_modules_ol_Geolocation_js.js +352 -293
- package/vendors-node_modules_ol_Geolocation_js.js.map +1 -1
- package/vendors-node_modules_ol_ImageTile_js.js +494 -0
- package/vendors-node_modules_ol_ImageTile_js.js.map +1 -0
- package/vendors-node_modules_ol_Overlay_js.js +606 -0
- package/vendors-node_modules_ol_Overlay_js.js.map +1 -0
- package/vendors-node_modules_ol_control_FullScreen_js.js +417 -0
- package/vendors-node_modules_ol_control_FullScreen_js.js.map +1 -0
- package/vendors-node_modules_ol_control_OverviewMap_js.js +711 -0
- package/vendors-node_modules_ol_control_OverviewMap_js.js.map +1 -0
- package/vendors-node_modules_ol_control_ScaleLine_js.js +509 -0
- package/vendors-node_modules_ol_control_ScaleLine_js.js.map +1 -0
- package/vendors-node_modules_ol_control_ZoomSlider_js.js +418 -0
- package/vendors-node_modules_ol_control_ZoomSlider_js.js.map +1 -0
- package/vendors-node_modules_ol_control_js.js +490 -0
- package/vendors-node_modules_ol_control_js.js.map +1 -0
- package/vendors-node_modules_ol_geom_LineString_js.js +574 -0
- package/vendors-node_modules_ol_geom_LineString_js.js.map +1 -0
- package/vendors-node_modules_ol_geom_MultiLineString_js.js +405 -0
- package/vendors-node_modules_ol_geom_MultiLineString_js.js.map +1 -0
- package/vendors-node_modules_ol_geom_MultiPolygon_js.js +773 -0
- package/vendors-node_modules_ol_geom_MultiPolygon_js.js.map +1 -0
- package/vendors-node_modules_ol_geom_js-node_modules_ol_geom_flat_length_js.js +769 -0
- package/vendors-node_modules_ol_geom_js-node_modules_ol_geom_flat_length_js.js.map +1 -0
- package/vendors-node_modules_ol_index_js.js +526 -675
- package/vendors-node_modules_ol_index_js.js.map +1 -1
- package/vendors-node_modules_ol_interaction_Draw_js.js +2777 -0
- package/vendors-node_modules_ol_interaction_Draw_js.js.map +1 -0
- package/vendors-node_modules_ol_interaction_Extent_js.js +586 -0
- package/vendors-node_modules_ol_interaction_Extent_js.js.map +1 -0
- package/vendors-node_modules_ol_interaction_Link_js.js +489 -0
- package/vendors-node_modules_ol_interaction_Link_js.js.map +1 -0
- package/vendors-node_modules_ol_interaction_Modify_js.js +1841 -0
- package/vendors-node_modules_ol_interaction_Modify_js.js.map +1 -0
- package/vendors-node_modules_ol_interaction_Select_js.js +623 -0
- package/vendors-node_modules_ol_interaction_Select_js.js.map +1 -0
- package/vendors-node_modules_ol_interaction_Snap_js.js +982 -0
- package/vendors-node_modules_ol_interaction_Snap_js.js.map +1 -0
- package/vendors-node_modules_ol_interaction_Translate_js.js +466 -0
- package/vendors-node_modules_ol_interaction_Translate_js.js.map +1 -0
- package/vendors-node_modules_ol_interaction_js.js +872 -0
- package/vendors-node_modules_ol_interaction_js.js.map +1 -0
- package/vendors-node_modules_ol_layer_Graticule_js.js +1374 -989
- package/vendors-node_modules_ol_layer_Graticule_js.js.map +1 -1
- package/vendors-node_modules_ol_render_Feature_js.js +546 -0
- package/vendors-node_modules_ol_render_Feature_js.js.map +1 -0
- package/vendors-node_modules_ol_render_canvas_BuilderGroup_js.js +897 -0
- package/vendors-node_modules_ol_render_canvas_BuilderGroup_js.js.map +1 -0
- package/vendors-node_modules_ol_render_canvas_Builder_js.js +907 -0
- package/vendors-node_modules_ol_render_canvas_Builder_js.js.map +1 -0
- package/vendors-node_modules_ol_render_canvas_ExecutorGroup_js.js +539 -0
- package/vendors-node_modules_ol_render_canvas_ExecutorGroup_js.js.map +1 -0
- package/vendors-node_modules_ol_render_canvas_Executor_js.js +1715 -0
- package/vendors-node_modules_ol_render_canvas_Executor_js.js.map +1 -0
- package/vendors-node_modules_ol_render_canvas_Immediate_js.js +1208 -0
- package/vendors-node_modules_ol_render_canvas_Immediate_js.js.map +1 -0
- package/vendors-node_modules_ol_render_canvas_TextBuilder_js.js +825 -0
- package/vendors-node_modules_ol_render_canvas_TextBuilder_js.js.map +1 -0
- package/vendors-node_modules_ol_renderer_canvas_Layer_js.js +654 -0
- package/vendors-node_modules_ol_renderer_canvas_Layer_js.js.map +1 -0
- package/vendors-node_modules_ol_renderer_canvas_VectorLayer_js.js +1044 -0
- package/vendors-node_modules_ol_renderer_canvas_VectorLayer_js.js.map +1 -0
- package/vendors-node_modules_ol_renderer_vector_js.js +460 -0
- package/vendors-node_modules_ol_renderer_vector_js.js.map +1 -0
- package/vendors-node_modules_ol_source_Vector_js.js +2091 -0
- package/vendors-node_modules_ol_source_Vector_js.js.map +1 -0
- package/node_modules_ol_ImageTile_js.js +0 -177
- package/node_modules_ol_ImageTile_js.js.map +0 -1
- package/node_modules_ol_render_js.js +0 -131
- package/node_modules_ol_render_js.js.map +0 -1
- package/node_modules_ol_structs_LRUCache_js.js +0 -275
- package/node_modules_ol_structs_LRUCache_js.js.map +0 -1
- package/node_modules_ol_tilecoord_js.js +0 -115
- package/node_modules_ol_tilecoord_js.js.map +0 -1
- package/vendors-node_modules_ol_TileCache_js.js +0 -461
- package/vendors-node_modules_ol_TileCache_js.js.map +0 -1
- package/vendors-node_modules_ol_Tile_js.js +0 -330
- package/vendors-node_modules_ol_Tile_js.js.map +0 -1
- package/vendors-node_modules_ol_style_Text_js.js +0 -509
- package/vendors-node_modules_ol_style_Text_js.js.map +0 -1
- package/vendors-node_modules_rbush_index_js.js +0 -531
- package/vendors-node_modules_rbush_index_js.js.map +0 -1
|
@@ -1,5 +1,280 @@
|
|
|
1
1
|
(self["webpackChunk_vaadin_bundles"] = self["webpackChunk_vaadin_bundles"] || []).push([["node_modules_ol_VectorTile_js"],{
|
|
2
2
|
|
|
3
|
+
/***/ "./node_modules/ol/Tile.js":
|
|
4
|
+
/*!*********************************!*\
|
|
5
|
+
!*** ./node_modules/ol/Tile.js ***!
|
|
6
|
+
\*********************************/
|
|
7
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
8
|
+
|
|
9
|
+
__webpack_require__.r(__webpack_exports__);
|
|
10
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
12
|
+
/* harmony export */ });
|
|
13
|
+
/* harmony import */ var _TileState_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TileState.js */ "./node_modules/ol/TileState.js");
|
|
14
|
+
/* harmony import */ var _easing_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./easing.js */ "./node_modules/ol/easing.js");
|
|
15
|
+
/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./events/EventType.js */ "./node_modules/ol/events/EventType.js");
|
|
16
|
+
/* harmony import */ var _events_Target_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./events/Target.js */ "./node_modules/ol/events/Target.js");
|
|
17
|
+
/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util.js */ "./node_modules/ol/util.js");
|
|
18
|
+
/**
|
|
19
|
+
* @module ol/Tile
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* A function that takes a {@link module:ol/Tile~Tile} for the tile and a
|
|
29
|
+
* `{string}` for the url as arguments. The default is
|
|
30
|
+
* ```js
|
|
31
|
+
* source.setTileLoadFunction(function(tile, src) {
|
|
32
|
+
* tile.getImage().src = src;
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
35
|
+
* For more fine grained control, the load function can use fetch or XMLHttpRequest and involve
|
|
36
|
+
* error handling:
|
|
37
|
+
*
|
|
38
|
+
* ```js
|
|
39
|
+
* import TileState from 'ol/TileState.js';
|
|
40
|
+
*
|
|
41
|
+
* source.setTileLoadFunction(function(tile, src) {
|
|
42
|
+
* const xhr = new XMLHttpRequest();
|
|
43
|
+
* xhr.responseType = 'blob';
|
|
44
|
+
* xhr.addEventListener('loadend', function (evt) {
|
|
45
|
+
* const data = this.response;
|
|
46
|
+
* if (data !== undefined) {
|
|
47
|
+
* tile.getImage().src = URL.createObjectURL(data);
|
|
48
|
+
* } else {
|
|
49
|
+
* tile.setState(TileState.ERROR);
|
|
50
|
+
* }
|
|
51
|
+
* });
|
|
52
|
+
* xhr.addEventListener('error', function () {
|
|
53
|
+
* tile.setState(TileState.ERROR);
|
|
54
|
+
* });
|
|
55
|
+
* xhr.open('GET', src);
|
|
56
|
+
* xhr.send();
|
|
57
|
+
* });
|
|
58
|
+
* ```
|
|
59
|
+
*
|
|
60
|
+
* @typedef {function(Tile, string): void} LoadFunction
|
|
61
|
+
* @api
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* {@link module:ol/source/Tile~TileSource} sources use a function of this type to get
|
|
66
|
+
* the url that provides a tile for a given tile coordinate.
|
|
67
|
+
*
|
|
68
|
+
* This function takes a {@link module:ol/tilecoord~TileCoord} for the tile
|
|
69
|
+
* coordinate, a `{number}` representing the pixel ratio and a
|
|
70
|
+
* {@link module:ol/proj/Projection~Projection} for the projection as arguments
|
|
71
|
+
* and returns a `{string}` representing the tile URL, or undefined if no tile
|
|
72
|
+
* should be requested for the passed tile coordinate.
|
|
73
|
+
*
|
|
74
|
+
* @typedef {function(import("./tilecoord.js").TileCoord, number,
|
|
75
|
+
* import("./proj/Projection.js").default): (string|undefined)} UrlFunction
|
|
76
|
+
* @api
|
|
77
|
+
*/
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* @typedef {Object} Options
|
|
81
|
+
* @property {number} [transition=250] A duration for tile opacity
|
|
82
|
+
* transitions in milliseconds. A duration of 0 disables the opacity transition.
|
|
83
|
+
* @property {boolean} [interpolate=false] Use interpolated values when resampling. By default,
|
|
84
|
+
* the nearest neighbor is used when resampling.
|
|
85
|
+
* @api
|
|
86
|
+
*/
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* @classdesc
|
|
90
|
+
* Base class for tiles.
|
|
91
|
+
*
|
|
92
|
+
* @abstract
|
|
93
|
+
*/
|
|
94
|
+
class Tile extends _events_Target_js__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
95
|
+
/**
|
|
96
|
+
* @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate.
|
|
97
|
+
* @param {import("./TileState.js").default} state State.
|
|
98
|
+
* @param {Options} [options] Tile options.
|
|
99
|
+
*/
|
|
100
|
+
constructor(tileCoord, state, options) {
|
|
101
|
+
super();
|
|
102
|
+
|
|
103
|
+
options = options ? options : {};
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* @type {import("./tilecoord.js").TileCoord}
|
|
107
|
+
*/
|
|
108
|
+
this.tileCoord = tileCoord;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* @protected
|
|
112
|
+
* @type {import("./TileState.js").default}
|
|
113
|
+
*/
|
|
114
|
+
this.state = state;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* A key assigned to the tile. This is used in conjunction with a source key
|
|
118
|
+
* to determine if a cached version of this tile may be used by the renderer.
|
|
119
|
+
* @type {string}
|
|
120
|
+
*/
|
|
121
|
+
this.key = '';
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* The duration for the opacity transition.
|
|
125
|
+
* @private
|
|
126
|
+
* @type {number}
|
|
127
|
+
*/
|
|
128
|
+
this.transition_ =
|
|
129
|
+
options.transition === undefined ? 250 : options.transition;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Lookup of start times for rendering transitions. If the start time is
|
|
133
|
+
* equal to -1, the transition is complete.
|
|
134
|
+
* @private
|
|
135
|
+
* @type {Object<string, number>}
|
|
136
|
+
*/
|
|
137
|
+
this.transitionStarts_ = {};
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* @type {boolean}
|
|
141
|
+
*/
|
|
142
|
+
this.interpolate = !!options.interpolate;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* @protected
|
|
147
|
+
*/
|
|
148
|
+
changed() {
|
|
149
|
+
this.dispatchEvent(_events_EventType_js__WEBPACK_IMPORTED_MODULE_1__["default"].CHANGE);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Called by the tile cache when the tile is removed from the cache due to expiry
|
|
154
|
+
*/
|
|
155
|
+
release() {
|
|
156
|
+
// to remove the `change` listener on this tile in `ol/TileQueue#handleTileChange`
|
|
157
|
+
this.setState(_TileState_js__WEBPACK_IMPORTED_MODULE_2__["default"].EMPTY);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* @return {string} Key.
|
|
162
|
+
*/
|
|
163
|
+
getKey() {
|
|
164
|
+
return this.key + '/' + this.tileCoord;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Get the tile coordinate for this tile.
|
|
169
|
+
* @return {import("./tilecoord.js").TileCoord} The tile coordinate.
|
|
170
|
+
* @api
|
|
171
|
+
*/
|
|
172
|
+
getTileCoord() {
|
|
173
|
+
return this.tileCoord;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* @return {import("./TileState.js").default} State.
|
|
178
|
+
*/
|
|
179
|
+
getState() {
|
|
180
|
+
return this.state;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Sets the state of this tile. If you write your own {@link module:ol/Tile~LoadFunction tileLoadFunction} ,
|
|
185
|
+
* it is important to set the state correctly to {@link module:ol/TileState~ERROR}
|
|
186
|
+
* when the tile cannot be loaded. Otherwise the tile cannot be removed from
|
|
187
|
+
* the tile queue and will block other requests.
|
|
188
|
+
* @param {import("./TileState.js").default} state State.
|
|
189
|
+
* @api
|
|
190
|
+
*/
|
|
191
|
+
setState(state) {
|
|
192
|
+
if (this.state === _TileState_js__WEBPACK_IMPORTED_MODULE_2__["default"].EMPTY) {
|
|
193
|
+
// no more state changes
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
if (this.state !== _TileState_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERROR && this.state > state) {
|
|
197
|
+
throw new Error('Tile load sequence violation');
|
|
198
|
+
}
|
|
199
|
+
this.state = state;
|
|
200
|
+
this.changed();
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Load the image or retry if loading previously failed.
|
|
205
|
+
* Loading is taken care of by the tile queue, and calling this method is
|
|
206
|
+
* only needed for preloading or for reloading in case of an error.
|
|
207
|
+
* @abstract
|
|
208
|
+
* @api
|
|
209
|
+
*/
|
|
210
|
+
load() {
|
|
211
|
+
(0,_util_js__WEBPACK_IMPORTED_MODULE_3__.abstract)();
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Get the alpha value for rendering.
|
|
216
|
+
* @param {string} id An id for the renderer.
|
|
217
|
+
* @param {number} time The render frame time.
|
|
218
|
+
* @return {number} A number between 0 and 1.
|
|
219
|
+
*/
|
|
220
|
+
getAlpha(id, time) {
|
|
221
|
+
if (!this.transition_) {
|
|
222
|
+
return 1;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
let start = this.transitionStarts_[id];
|
|
226
|
+
if (!start) {
|
|
227
|
+
start = time;
|
|
228
|
+
this.transitionStarts_[id] = start;
|
|
229
|
+
} else if (start === -1) {
|
|
230
|
+
return 1;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
const delta = time - start + 1000 / 60; // avoid rendering at 0
|
|
234
|
+
if (delta >= this.transition_) {
|
|
235
|
+
return 1;
|
|
236
|
+
}
|
|
237
|
+
return (0,_easing_js__WEBPACK_IMPORTED_MODULE_4__.easeIn)(delta / this.transition_);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Determine if a tile is in an alpha transition. A tile is considered in
|
|
242
|
+
* transition if tile.getAlpha() has not yet been called or has been called
|
|
243
|
+
* and returned 1.
|
|
244
|
+
* @param {string} id An id for the renderer.
|
|
245
|
+
* @return {boolean} The tile is in transition.
|
|
246
|
+
*/
|
|
247
|
+
inTransition(id) {
|
|
248
|
+
if (!this.transition_) {
|
|
249
|
+
return false;
|
|
250
|
+
}
|
|
251
|
+
return this.transitionStarts_[id] !== -1;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Mark a transition as complete.
|
|
256
|
+
* @param {string} id An id for the renderer.
|
|
257
|
+
*/
|
|
258
|
+
endTransition(id) {
|
|
259
|
+
if (this.transition_) {
|
|
260
|
+
this.transitionStarts_[id] = -1;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* @override
|
|
266
|
+
*/
|
|
267
|
+
disposeInternal() {
|
|
268
|
+
this.release();
|
|
269
|
+
super.disposeInternal();
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Tile);
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
/***/ }),
|
|
277
|
+
|
|
3
278
|
/***/ "./node_modules/ol/VectorTile.js":
|
|
4
279
|
/*!***************************************!*\
|
|
5
280
|
!*** ./node_modules/ol/VectorTile.js ***!
|
|
@@ -10,147 +285,158 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10
285
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11
286
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
12
287
|
/* harmony export */ });
|
|
13
|
-
/* harmony import */ var
|
|
14
|
-
/* harmony import */ var
|
|
15
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
16
|
-
var extendStatics = function (d, b) {
|
|
17
|
-
extendStatics = Object.setPrototypeOf ||
|
|
18
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
-
return extendStatics(d, b);
|
|
21
|
-
};
|
|
22
|
-
return function (d, b) {
|
|
23
|
-
if (typeof b !== "function" && b !== null)
|
|
24
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
-
extendStatics(d, b);
|
|
26
|
-
function __() { this.constructor = d; }
|
|
27
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
-
};
|
|
29
|
-
})();
|
|
288
|
+
/* harmony import */ var _Tile_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Tile.js */ "./node_modules/ol/Tile.js");
|
|
289
|
+
/* harmony import */ var _TileState_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./TileState.js */ "./node_modules/ol/TileState.js");
|
|
30
290
|
/**
|
|
31
291
|
* @module ol/VectorTile
|
|
32
292
|
*/
|
|
33
293
|
|
|
34
294
|
|
|
35
|
-
|
|
36
|
-
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* @template {import('./Feature.js').FeatureLike} FeatureType
|
|
298
|
+
*/
|
|
299
|
+
class VectorTile extends _Tile_js__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
300
|
+
/**
|
|
301
|
+
* @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate.
|
|
302
|
+
* @param {import("./TileState.js").default} state State.
|
|
303
|
+
* @param {string} src Data source url.
|
|
304
|
+
* @param {import("./format/Feature.js").default<FeatureType>} format Feature format.
|
|
305
|
+
* @param {import("./Tile.js").LoadFunction} tileLoadFunction Tile load function.
|
|
306
|
+
* @param {import("./Tile.js").Options} [options] Tile options.
|
|
307
|
+
*/
|
|
308
|
+
constructor(tileCoord, state, src, format, tileLoadFunction, options) {
|
|
309
|
+
super(tileCoord, state, options);
|
|
310
|
+
|
|
37
311
|
/**
|
|
38
|
-
*
|
|
39
|
-
* @
|
|
40
|
-
* @param {string} src Data source url.
|
|
41
|
-
* @param {import("./format/Feature.js").default} format Feature format.
|
|
42
|
-
* @param {import("./Tile.js").LoadFunction} tileLoadFunction Tile load function.
|
|
43
|
-
* @param {import("./Tile.js").Options} [opt_options] Tile options.
|
|
312
|
+
* Extent of this tile; set by the source.
|
|
313
|
+
* @type {import("./extent.js").Extent}
|
|
44
314
|
*/
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Extent of this tile; set by the source.
|
|
49
|
-
* @type {import("./extent.js").Extent}
|
|
50
|
-
*/
|
|
51
|
-
_this.extent = null;
|
|
52
|
-
/**
|
|
53
|
-
* @private
|
|
54
|
-
* @type {import("./format/Feature.js").default}
|
|
55
|
-
*/
|
|
56
|
-
_this.format_ = format;
|
|
57
|
-
/**
|
|
58
|
-
* @private
|
|
59
|
-
* @type {Array<import("./Feature.js").default>}
|
|
60
|
-
*/
|
|
61
|
-
_this.features_ = null;
|
|
62
|
-
/**
|
|
63
|
-
* @private
|
|
64
|
-
* @type {import("./featureloader.js").FeatureLoader}
|
|
65
|
-
*/
|
|
66
|
-
_this.loader_;
|
|
67
|
-
/**
|
|
68
|
-
* Feature projection of this tile; set by the source.
|
|
69
|
-
* @type {import("./proj/Projection.js").default}
|
|
70
|
-
*/
|
|
71
|
-
_this.projection = null;
|
|
72
|
-
/**
|
|
73
|
-
* Resolution of this tile; set by the source.
|
|
74
|
-
* @type {number}
|
|
75
|
-
*/
|
|
76
|
-
_this.resolution;
|
|
77
|
-
/**
|
|
78
|
-
* @private
|
|
79
|
-
* @type {import("./Tile.js").LoadFunction}
|
|
80
|
-
*/
|
|
81
|
-
_this.tileLoadFunction_ = tileLoadFunction;
|
|
82
|
-
/**
|
|
83
|
-
* @private
|
|
84
|
-
* @type {string}
|
|
85
|
-
*/
|
|
86
|
-
_this.url_ = src;
|
|
87
|
-
_this.key = src;
|
|
88
|
-
return _this;
|
|
89
|
-
}
|
|
315
|
+
this.extent = null;
|
|
316
|
+
|
|
90
317
|
/**
|
|
91
|
-
*
|
|
92
|
-
* @
|
|
93
|
-
* @api
|
|
318
|
+
* @private
|
|
319
|
+
* @type {import("./format/Feature.js").default<FeatureType>}
|
|
94
320
|
*/
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
};
|
|
321
|
+
this.format_ = format;
|
|
322
|
+
|
|
98
323
|
/**
|
|
99
|
-
*
|
|
100
|
-
* @
|
|
101
|
-
* @api
|
|
324
|
+
* @private
|
|
325
|
+
* @type {Array<FeatureType>}
|
|
102
326
|
*/
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
};
|
|
327
|
+
this.features_ = null;
|
|
328
|
+
|
|
106
329
|
/**
|
|
107
|
-
*
|
|
330
|
+
* @private
|
|
331
|
+
* @type {import("./featureloader.js").FeatureLoader}
|
|
108
332
|
*/
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
this.setState(_TileState_js__WEBPACK_IMPORTED_MODULE_0__["default"].LOADING);
|
|
112
|
-
this.tileLoadFunction_(this, this.url_);
|
|
113
|
-
if (this.loader_) {
|
|
114
|
-
this.loader_(this.extent, this.resolution, this.projection);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
};
|
|
333
|
+
this.loader_;
|
|
334
|
+
|
|
118
335
|
/**
|
|
119
|
-
*
|
|
120
|
-
* @
|
|
121
|
-
* @param {import("./proj/Projection.js").default} dataProjection Data projection.
|
|
336
|
+
* Feature projection of this tile; set by the source.
|
|
337
|
+
* @type {import("./proj/Projection.js").default}
|
|
122
338
|
*/
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
};
|
|
339
|
+
this.projection = null;
|
|
340
|
+
|
|
126
341
|
/**
|
|
127
|
-
*
|
|
342
|
+
* Resolution of this tile; set by the source.
|
|
343
|
+
* @type {number}
|
|
128
344
|
*/
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
};
|
|
345
|
+
this.resolution;
|
|
346
|
+
|
|
132
347
|
/**
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
* @param {Array<import("./Feature.js").default>} features Features.
|
|
136
|
-
* @api
|
|
348
|
+
* @private
|
|
349
|
+
* @type {import("./Tile.js").LoadFunction}
|
|
137
350
|
*/
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
this.setState(_TileState_js__WEBPACK_IMPORTED_MODULE_0__["default"].LOADED);
|
|
141
|
-
};
|
|
351
|
+
this.tileLoadFunction_ = tileLoadFunction;
|
|
352
|
+
|
|
142
353
|
/**
|
|
143
|
-
*
|
|
144
|
-
* @
|
|
145
|
-
* @api
|
|
354
|
+
* @private
|
|
355
|
+
* @type {string}
|
|
146
356
|
*/
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
357
|
+
this.url_ = src;
|
|
358
|
+
|
|
359
|
+
this.key = src;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* @return {string} Tile url.
|
|
364
|
+
*/
|
|
365
|
+
getTileUrl() {
|
|
366
|
+
return this.url_;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Get the feature format assigned for reading this tile's features.
|
|
371
|
+
* @return {import("./format/Feature.js").default<FeatureType>} Feature format.
|
|
372
|
+
* @api
|
|
373
|
+
*/
|
|
374
|
+
getFormat() {
|
|
375
|
+
return this.format_;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Get the features for this tile. Geometries will be in the view projection.
|
|
380
|
+
* @return {Array<FeatureType>} Features.
|
|
381
|
+
* @api
|
|
382
|
+
*/
|
|
383
|
+
getFeatures() {
|
|
384
|
+
return this.features_;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Load not yet loaded URI.
|
|
389
|
+
* @override
|
|
390
|
+
*/
|
|
391
|
+
load() {
|
|
392
|
+
if (this.state == _TileState_js__WEBPACK_IMPORTED_MODULE_1__["default"].IDLE) {
|
|
393
|
+
this.setState(_TileState_js__WEBPACK_IMPORTED_MODULE_1__["default"].LOADING);
|
|
394
|
+
this.tileLoadFunction_(this, this.url_);
|
|
395
|
+
if (this.loader_) {
|
|
396
|
+
this.loader_(this.extent, this.resolution, this.projection);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Handler for successful tile load.
|
|
403
|
+
* @param {Array<FeatureType>} features The loaded features.
|
|
404
|
+
* @param {import("./proj/Projection.js").default} dataProjection Data projection.
|
|
405
|
+
*/
|
|
406
|
+
onLoad(features, dataProjection) {
|
|
407
|
+
this.setFeatures(features);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Handler for tile load errors.
|
|
412
|
+
*/
|
|
413
|
+
onError() {
|
|
414
|
+
this.setState(_TileState_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERROR);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* Function for use in a {@link module:ol/source/VectorTile~VectorTile}'s `tileLoadFunction`.
|
|
419
|
+
* Sets the features for the tile.
|
|
420
|
+
* @param {Array<FeatureType>} features Features.
|
|
421
|
+
* @api
|
|
422
|
+
*/
|
|
423
|
+
setFeatures(features) {
|
|
424
|
+
this.features_ = features;
|
|
425
|
+
this.setState(_TileState_js__WEBPACK_IMPORTED_MODULE_1__["default"].LOADED);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* Set the feature loader for reading this tile's features.
|
|
430
|
+
* @param {import("./featureloader.js").FeatureLoader<FeatureType>} loader Feature loader.
|
|
431
|
+
* @api
|
|
432
|
+
*/
|
|
433
|
+
setLoader(loader) {
|
|
434
|
+
this.loader_ = loader;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
|
|
152
438
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (VectorTile);
|
|
153
|
-
|
|
439
|
+
|
|
154
440
|
|
|
155
441
|
/***/ })
|
|
156
442
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node_modules_ol_VectorTile_js.js","mappings":";;;;;;;;;;;;;;AAAA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA;AAC6B;AACU;AACvC;AACA;AACA;AACA,eAAe,oCAAoC;AACnD,eAAe,kCAAkC;AACjD,eAAe,QAAQ;AACvB,eAAe,uCAAuC;AACtD,eAAe,kCAAkC;AACjD,eAAe,6BAA6B;AAC5C;AACA;AACA;AACA;AACA,gCAAgC;AAChC,kBAAkB;AAClB;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,4CAA4C;AAC5C,kBAAkB;AAClB;AACA;AACA;AACA,oCAAoC;AACpC,kBAAkB;AAClB;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uCAAuC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,2CAA2C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,0DAAc;AACxC,0BAA0B,6DAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,2DAAe;AACrC;AACA;AACA,+BAA+B,6CAA6C;AAC5E;AACA,eAAe,uCAAuC;AACtD;AACA;AACA;AACA;AACA,sBAAsB,4DAAgB;AACtC;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,gDAAI;AACN,iEAAe,UAAU,EAAC;AAC1B","sources":["webpack://@vaadin/bundles/./node_modules/ol/VectorTile.js"],"sourcesContent":["var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/VectorTile\n */\nimport Tile from './Tile.js';\nimport TileState from './TileState.js';\nvar VectorTile = /** @class */ (function (_super) {\n __extends(VectorTile, _super);\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"./TileState.js\").default} state State.\n * @param {string} src Data source url.\n * @param {import(\"./format/Feature.js\").default} format Feature format.\n * @param {import(\"./Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n * @param {import(\"./Tile.js\").Options} [opt_options] Tile options.\n */\n function VectorTile(tileCoord, state, src, format, tileLoadFunction, opt_options) {\n var _this = _super.call(this, tileCoord, state, opt_options) || this;\n /**\n * Extent of this tile; set by the source.\n * @type {import(\"./extent.js\").Extent}\n */\n _this.extent = null;\n /**\n * @private\n * @type {import(\"./format/Feature.js\").default}\n */\n _this.format_ = format;\n /**\n * @private\n * @type {Array<import(\"./Feature.js\").default>}\n */\n _this.features_ = null;\n /**\n * @private\n * @type {import(\"./featureloader.js\").FeatureLoader}\n */\n _this.loader_;\n /**\n * Feature projection of this tile; set by the source.\n * @type {import(\"./proj/Projection.js\").default}\n */\n _this.projection = null;\n /**\n * Resolution of this tile; set by the source.\n * @type {number}\n */\n _this.resolution;\n /**\n * @private\n * @type {import(\"./Tile.js\").LoadFunction}\n */\n _this.tileLoadFunction_ = tileLoadFunction;\n /**\n * @private\n * @type {string}\n */\n _this.url_ = src;\n _this.key = src;\n return _this;\n }\n /**\n * Get the feature format assigned for reading this tile's features.\n * @return {import(\"./format/Feature.js\").default} Feature format.\n * @api\n */\n VectorTile.prototype.getFormat = function () {\n return this.format_;\n };\n /**\n * Get the features for this tile. Geometries will be in the view projection.\n * @return {Array<import(\"./Feature.js\").FeatureLike>} Features.\n * @api\n */\n VectorTile.prototype.getFeatures = function () {\n return this.features_;\n };\n /**\n * Load not yet loaded URI.\n */\n VectorTile.prototype.load = function () {\n if (this.state == TileState.IDLE) {\n this.setState(TileState.LOADING);\n this.tileLoadFunction_(this, this.url_);\n if (this.loader_) {\n this.loader_(this.extent, this.resolution, this.projection);\n }\n }\n };\n /**\n * Handler for successful tile load.\n * @param {Array<import(\"./Feature.js\").default>} features The loaded features.\n * @param {import(\"./proj/Projection.js\").default} dataProjection Data projection.\n */\n VectorTile.prototype.onLoad = function (features, dataProjection) {\n this.setFeatures(features);\n };\n /**\n * Handler for tile load errors.\n */\n VectorTile.prototype.onError = function () {\n this.setState(TileState.ERROR);\n };\n /**\n * Function for use in an {@link module:ol/source/VectorTile~VectorTile}'s `tileLoadFunction`.\n * Sets the features for the tile.\n * @param {Array<import(\"./Feature.js\").default>} features Features.\n * @api\n */\n VectorTile.prototype.setFeatures = function (features) {\n this.features_ = features;\n this.setState(TileState.LOADED);\n };\n /**\n * Set the feature loader for reading this tile's features.\n * @param {import(\"./featureloader.js\").FeatureLoader} loader Feature loader.\n * @api\n */\n VectorTile.prototype.setLoader = function (loader) {\n this.loader_ = loader;\n };\n return VectorTile;\n}(Tile));\nexport default VectorTile;\n//# sourceMappingURL=VectorTile.js.map"],"names":[],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"node_modules_ol_VectorTile_js.js","mappings":";;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACuC;AACJ;AACW;AACD;AACV;;AAEnC;AACA,4BAA4B,2BAA2B;AACvD,KAAK,OAAO;AACZ;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;;AAEA;AACA,IAAI,wCAAwC;AAC5C;AACA;AACA,0BAA0B,qCAAqC;AAC/D,mBAAmB,OAAO;AAC1B,IAAI,4CAA4C;AAChD,mBAAmB,OAAO;AAC1B;AACA;AACA,aAAa;AACb,0EAA0E;AAC1E;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB;AACA,cAAc,SAAS;AACvB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yDAAW;AAC9B;AACA,aAAa,oCAAoC;AACjD,aAAa,kCAAkC;AAC/C,aAAa,SAAS;AACtB;AACA;AACA;;AAEA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAuB,mEAAgB;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,2DAAe;AACjC;;AAEA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,oCAAoC;AAClD;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,kCAAkC;AAChD;AACA;AACA;AACA;;AAEA;AACA,yDAAyD,oDAAoD;AAC7G,oDAAoD;AACpD;AACA;AACA,aAAa,kCAAkC;AAC/C;AACA;AACA;AACA,uBAAuB,2DAAe;AACtC;AACA;AACA;AACA,uBAAuB,2DAAe;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,kDAAQ;AACZ;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,4CAA4C;AAC5C;AACA;AACA;AACA,WAAW,kDAAM;AACjB;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,IAAI,EAAC;;;;;;;;;;;;;;;;;AC/PpB;AACA;AACA;AAC6B;AACU;;AAEvC;AACA,cAAc,oCAAoC;AAClD;AACA,yBAAyB,gDAAI;AAC7B;AACA,aAAa,oCAAoC;AACjD,aAAa,kCAAkC;AAC/C,aAAa,QAAQ;AACrB,aAAa,oDAAoD;AACjE,aAAa,kCAAkC;AAC/C,aAAa,6BAA6B;AAC1C;AACA;AACA;;AAEA;AACA,4BAA4B;AAC5B,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,wCAAwC;AACxC,cAAc;AACd;AACA;;AAEA;AACA,gCAAgC;AAChC,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;;AAEA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,oDAAoD;AAClE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,oBAAoB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,sBAAsB,0DAAc;AACpC,oBAAoB,6DAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,oBAAoB;AACjC,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,2DAAe;AACjC;;AAEA;AACA,4BAA4B,6CAA6C;AACzE;AACA,aAAa,oBAAoB;AACjC;AACA;AACA;AACA;AACA,kBAAkB,4DAAgB;AAClC;;AAEA;AACA;AACA,aAAa,yDAAyD;AACtE;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,UAAU,EAAC","sources":["webpack://@vaadin/bundles/./node_modules/ol/Tile.js","webpack://@vaadin/bundles/./node_modules/ol/VectorTile.js"],"sourcesContent":["/**\n * @module ol/Tile\n */\nimport TileState from './TileState.js';\nimport {easeIn} from './easing.js';\nimport EventType from './events/EventType.js';\nimport EventTarget from './events/Target.js';\nimport {abstract} from './util.js';\n\n/**\n * A function that takes a {@link module:ol/Tile~Tile} for the tile and a\n * `{string}` for the url as arguments. The default is\n * ```js\n * source.setTileLoadFunction(function(tile, src) {\n * tile.getImage().src = src;\n * });\n * ```\n * For more fine grained control, the load function can use fetch or XMLHttpRequest and involve\n * error handling:\n *\n * ```js\n * import TileState from 'ol/TileState.js';\n *\n * source.setTileLoadFunction(function(tile, src) {\n * const xhr = new XMLHttpRequest();\n * xhr.responseType = 'blob';\n * xhr.addEventListener('loadend', function (evt) {\n * const data = this.response;\n * if (data !== undefined) {\n * tile.getImage().src = URL.createObjectURL(data);\n * } else {\n * tile.setState(TileState.ERROR);\n * }\n * });\n * xhr.addEventListener('error', function () {\n * tile.setState(TileState.ERROR);\n * });\n * xhr.open('GET', src);\n * xhr.send();\n * });\n * ```\n *\n * @typedef {function(Tile, string): void} LoadFunction\n * @api\n */\n\n/**\n * {@link module:ol/source/Tile~TileSource} sources use a function of this type to get\n * the url that provides a tile for a given tile coordinate.\n *\n * This function takes a {@link module:ol/tilecoord~TileCoord} for the tile\n * coordinate, a `{number}` representing the pixel ratio and a\n * {@link module:ol/proj/Projection~Projection} for the projection as arguments\n * and returns a `{string}` representing the tile URL, or undefined if no tile\n * should be requested for the passed tile coordinate.\n *\n * @typedef {function(import(\"./tilecoord.js\").TileCoord, number,\n * import(\"./proj/Projection.js\").default): (string|undefined)} UrlFunction\n * @api\n */\n\n/**\n * @typedef {Object} Options\n * @property {number} [transition=250] A duration for tile opacity\n * transitions in milliseconds. A duration of 0 disables the opacity transition.\n * @property {boolean} [interpolate=false] Use interpolated values when resampling. By default,\n * the nearest neighbor is used when resampling.\n * @api\n */\n\n/**\n * @classdesc\n * Base class for tiles.\n *\n * @abstract\n */\nclass Tile extends EventTarget {\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"./TileState.js\").default} state State.\n * @param {Options} [options] Tile options.\n */\n constructor(tileCoord, state, options) {\n super();\n\n options = options ? options : {};\n\n /**\n * @type {import(\"./tilecoord.js\").TileCoord}\n */\n this.tileCoord = tileCoord;\n\n /**\n * @protected\n * @type {import(\"./TileState.js\").default}\n */\n this.state = state;\n\n /**\n * A key assigned to the tile. This is used in conjunction with a source key\n * to determine if a cached version of this tile may be used by the renderer.\n * @type {string}\n */\n this.key = '';\n\n /**\n * The duration for the opacity transition.\n * @private\n * @type {number}\n */\n this.transition_ =\n options.transition === undefined ? 250 : options.transition;\n\n /**\n * Lookup of start times for rendering transitions. If the start time is\n * equal to -1, the transition is complete.\n * @private\n * @type {Object<string, number>}\n */\n this.transitionStarts_ = {};\n\n /**\n * @type {boolean}\n */\n this.interpolate = !!options.interpolate;\n }\n\n /**\n * @protected\n */\n changed() {\n this.dispatchEvent(EventType.CHANGE);\n }\n\n /**\n * Called by the tile cache when the tile is removed from the cache due to expiry\n */\n release() {\n // to remove the `change` listener on this tile in `ol/TileQueue#handleTileChange`\n this.setState(TileState.EMPTY);\n }\n\n /**\n * @return {string} Key.\n */\n getKey() {\n return this.key + '/' + this.tileCoord;\n }\n\n /**\n * Get the tile coordinate for this tile.\n * @return {import(\"./tilecoord.js\").TileCoord} The tile coordinate.\n * @api\n */\n getTileCoord() {\n return this.tileCoord;\n }\n\n /**\n * @return {import(\"./TileState.js\").default} State.\n */\n getState() {\n return this.state;\n }\n\n /**\n * Sets the state of this tile. If you write your own {@link module:ol/Tile~LoadFunction tileLoadFunction} ,\n * it is important to set the state correctly to {@link module:ol/TileState~ERROR}\n * when the tile cannot be loaded. Otherwise the tile cannot be removed from\n * the tile queue and will block other requests.\n * @param {import(\"./TileState.js\").default} state State.\n * @api\n */\n setState(state) {\n if (this.state === TileState.EMPTY) {\n // no more state changes\n return;\n }\n if (this.state !== TileState.ERROR && this.state > state) {\n throw new Error('Tile load sequence violation');\n }\n this.state = state;\n this.changed();\n }\n\n /**\n * Load the image or retry if loading previously failed.\n * Loading is taken care of by the tile queue, and calling this method is\n * only needed for preloading or for reloading in case of an error.\n * @abstract\n * @api\n */\n load() {\n abstract();\n }\n\n /**\n * Get the alpha value for rendering.\n * @param {string} id An id for the renderer.\n * @param {number} time The render frame time.\n * @return {number} A number between 0 and 1.\n */\n getAlpha(id, time) {\n if (!this.transition_) {\n return 1;\n }\n\n let start = this.transitionStarts_[id];\n if (!start) {\n start = time;\n this.transitionStarts_[id] = start;\n } else if (start === -1) {\n return 1;\n }\n\n const delta = time - start + 1000 / 60; // avoid rendering at 0\n if (delta >= this.transition_) {\n return 1;\n }\n return easeIn(delta / this.transition_);\n }\n\n /**\n * Determine if a tile is in an alpha transition. A tile is considered in\n * transition if tile.getAlpha() has not yet been called or has been called\n * and returned 1.\n * @param {string} id An id for the renderer.\n * @return {boolean} The tile is in transition.\n */\n inTransition(id) {\n if (!this.transition_) {\n return false;\n }\n return this.transitionStarts_[id] !== -1;\n }\n\n /**\n * Mark a transition as complete.\n * @param {string} id An id for the renderer.\n */\n endTransition(id) {\n if (this.transition_) {\n this.transitionStarts_[id] = -1;\n }\n }\n\n /**\n * @override\n */\n disposeInternal() {\n this.release();\n super.disposeInternal();\n }\n}\n\nexport default Tile;\n","/**\n * @module ol/VectorTile\n */\nimport Tile from './Tile.js';\nimport TileState from './TileState.js';\n\n/**\n * @template {import('./Feature.js').FeatureLike} FeatureType\n */\nclass VectorTile extends Tile {\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"./TileState.js\").default} state State.\n * @param {string} src Data source url.\n * @param {import(\"./format/Feature.js\").default<FeatureType>} format Feature format.\n * @param {import(\"./Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n * @param {import(\"./Tile.js\").Options} [options] Tile options.\n */\n constructor(tileCoord, state, src, format, tileLoadFunction, options) {\n super(tileCoord, state, options);\n\n /**\n * Extent of this tile; set by the source.\n * @type {import(\"./extent.js\").Extent}\n */\n this.extent = null;\n\n /**\n * @private\n * @type {import(\"./format/Feature.js\").default<FeatureType>}\n */\n this.format_ = format;\n\n /**\n * @private\n * @type {Array<FeatureType>}\n */\n this.features_ = null;\n\n /**\n * @private\n * @type {import(\"./featureloader.js\").FeatureLoader}\n */\n this.loader_;\n\n /**\n * Feature projection of this tile; set by the source.\n * @type {import(\"./proj/Projection.js\").default}\n */\n this.projection = null;\n\n /**\n * Resolution of this tile; set by the source.\n * @type {number}\n */\n this.resolution;\n\n /**\n * @private\n * @type {import(\"./Tile.js\").LoadFunction}\n */\n this.tileLoadFunction_ = tileLoadFunction;\n\n /**\n * @private\n * @type {string}\n */\n this.url_ = src;\n\n this.key = src;\n }\n\n /**\n * @return {string} Tile url.\n */\n getTileUrl() {\n return this.url_;\n }\n\n /**\n * Get the feature format assigned for reading this tile's features.\n * @return {import(\"./format/Feature.js\").default<FeatureType>} Feature format.\n * @api\n */\n getFormat() {\n return this.format_;\n }\n\n /**\n * Get the features for this tile. Geometries will be in the view projection.\n * @return {Array<FeatureType>} Features.\n * @api\n */\n getFeatures() {\n return this.features_;\n }\n\n /**\n * Load not yet loaded URI.\n * @override\n */\n load() {\n if (this.state == TileState.IDLE) {\n this.setState(TileState.LOADING);\n this.tileLoadFunction_(this, this.url_);\n if (this.loader_) {\n this.loader_(this.extent, this.resolution, this.projection);\n }\n }\n }\n\n /**\n * Handler for successful tile load.\n * @param {Array<FeatureType>} features The loaded features.\n * @param {import(\"./proj/Projection.js\").default} dataProjection Data projection.\n */\n onLoad(features, dataProjection) {\n this.setFeatures(features);\n }\n\n /**\n * Handler for tile load errors.\n */\n onError() {\n this.setState(TileState.ERROR);\n }\n\n /**\n * Function for use in a {@link module:ol/source/VectorTile~VectorTile}'s `tileLoadFunction`.\n * Sets the features for the tile.\n * @param {Array<FeatureType>} features Features.\n * @api\n */\n setFeatures(features) {\n this.features_ = features;\n this.setState(TileState.LOADED);\n }\n\n /**\n * Set the feature loader for reading this tile's features.\n * @param {import(\"./featureloader.js\").FeatureLoader<FeatureType>} loader Feature loader.\n * @api\n */\n setLoader(loader) {\n this.loader_ = loader;\n }\n}\n\nexport default VectorTile;\n"],"names":[],"sourceRoot":""}
|