@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
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
(self["webpackChunk_vaadin_bundles"] = self["webpackChunk_vaadin_bundles"] || []).push([["node_modules_ol_source_Source_js"],{
|
|
2
|
+
|
|
3
|
+
/***/ "./node_modules/ol/source/Source.js":
|
|
4
|
+
/*!******************************************!*\
|
|
5
|
+
!*** ./node_modules/ol/source/Source.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 _Object_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Object.js */ "./node_modules/ol/Object.js");
|
|
14
|
+
/* harmony import */ var _proj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../proj.js */ "./node_modules/ol/proj.js");
|
|
15
|
+
/**
|
|
16
|
+
* @module ol/source/Source
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @typedef {'undefined' | 'loading' | 'ready' | 'error'} State
|
|
23
|
+
* State of the source, one of 'undefined', 'loading', 'ready' or 'error'.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* A function that takes a {@link import("../View.js").ViewStateLayerStateExtent} and returns a string or
|
|
28
|
+
* an array of strings representing source attributions.
|
|
29
|
+
*
|
|
30
|
+
* @typedef {function(import("../View.js").ViewStateLayerStateExtent): (string|Array<string>)} Attribution
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* A type that can be used to provide attribution information for data sources.
|
|
35
|
+
*
|
|
36
|
+
* It represents either
|
|
37
|
+
* a simple string (e.g. `'© Acme Inc.'`)
|
|
38
|
+
* an array of simple strings (e.g. `['© Acme Inc.', '© Bacme Inc.']`)
|
|
39
|
+
* a function that returns a string or array of strings ({@link module:ol/source/Source~Attribution})
|
|
40
|
+
*
|
|
41
|
+
* @typedef {string|Array<string>|Attribution} AttributionLike
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @typedef {Object} Options
|
|
46
|
+
* @property {AttributionLike} [attributions] Attributions.
|
|
47
|
+
* @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.
|
|
48
|
+
* @property {import("../proj.js").ProjectionLike} [projection] Projection. Default is the view projection.
|
|
49
|
+
* @property {import("./Source.js").State} [state='ready'] State.
|
|
50
|
+
* @property {boolean} [wrapX=false] WrapX.
|
|
51
|
+
* @property {boolean} [interpolate=false] Use interpolated values when resampling. By default,
|
|
52
|
+
* the nearest neighbor is used when resampling.
|
|
53
|
+
*/
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @classdesc
|
|
57
|
+
* Abstract base class; normally only used for creating subclasses and not
|
|
58
|
+
* instantiated in apps.
|
|
59
|
+
* Base class for {@link module:ol/layer/Layer~Layer} sources.
|
|
60
|
+
*
|
|
61
|
+
* A generic `change` event is triggered when the state of the source changes.
|
|
62
|
+
* @abstract
|
|
63
|
+
* @api
|
|
64
|
+
*/
|
|
65
|
+
class Source extends _Object_js__WEBPACK_IMPORTED_MODULE_1__["default"] {
|
|
66
|
+
/**
|
|
67
|
+
* @param {Options} options Source options.
|
|
68
|
+
*/
|
|
69
|
+
constructor(options) {
|
|
70
|
+
super();
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @protected
|
|
74
|
+
* @type {import("../proj/Projection.js").default|null}
|
|
75
|
+
*/
|
|
76
|
+
this.projection = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.get)(options.projection);
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* @private
|
|
80
|
+
* @type {?Attribution}
|
|
81
|
+
*/
|
|
82
|
+
this.attributions_ = adaptAttributions(options.attributions);
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @private
|
|
86
|
+
* @type {boolean}
|
|
87
|
+
*/
|
|
88
|
+
this.attributionsCollapsible_ = options.attributionsCollapsible ?? true;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* This source is currently loading data. Sources that defer loading to the
|
|
92
|
+
* map's tile queue never set this to `true`.
|
|
93
|
+
* @type {boolean}
|
|
94
|
+
*/
|
|
95
|
+
this.loading = false;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* @private
|
|
99
|
+
* @type {import("./Source.js").State}
|
|
100
|
+
*/
|
|
101
|
+
this.state_ = options.state !== undefined ? options.state : 'ready';
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* @private
|
|
105
|
+
* @type {boolean}
|
|
106
|
+
*/
|
|
107
|
+
this.wrapX_ = options.wrapX !== undefined ? options.wrapX : false;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* @private
|
|
111
|
+
* @type {boolean}
|
|
112
|
+
*/
|
|
113
|
+
this.interpolate_ = !!options.interpolate;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* @protected
|
|
117
|
+
* @type {function(import("../View.js").ViewOptions):void}
|
|
118
|
+
*/
|
|
119
|
+
this.viewResolver = null;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @protected
|
|
123
|
+
* @type {function(Error):void}
|
|
124
|
+
*/
|
|
125
|
+
this.viewRejector = null;
|
|
126
|
+
|
|
127
|
+
const self = this;
|
|
128
|
+
/**
|
|
129
|
+
* @private
|
|
130
|
+
* @type {Promise<import("../View.js").ViewOptions>}
|
|
131
|
+
*/
|
|
132
|
+
this.viewPromise_ = new Promise(function (resolve, reject) {
|
|
133
|
+
self.viewResolver = resolve;
|
|
134
|
+
self.viewRejector = reject;
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Get the attribution function for the source.
|
|
140
|
+
* @return {?Attribution} Attribution function.
|
|
141
|
+
* @api
|
|
142
|
+
*/
|
|
143
|
+
getAttributions() {
|
|
144
|
+
return this.attributions_;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* @return {boolean} Attributions are collapsible.
|
|
149
|
+
* @api
|
|
150
|
+
*/
|
|
151
|
+
getAttributionsCollapsible() {
|
|
152
|
+
return this.attributionsCollapsible_;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Get the projection of the source.
|
|
157
|
+
* @return {import("../proj/Projection.js").default|null} Projection.
|
|
158
|
+
* @api
|
|
159
|
+
*/
|
|
160
|
+
getProjection() {
|
|
161
|
+
return this.projection;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* @param {import("../proj/Projection").default} [projection] Projection.
|
|
166
|
+
* @return {Array<number>|null} Resolutions.
|
|
167
|
+
*/
|
|
168
|
+
getResolutions(projection) {
|
|
169
|
+
return null;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* @return {Promise<import("../View.js").ViewOptions>} A promise for view-related properties.
|
|
174
|
+
*/
|
|
175
|
+
getView() {
|
|
176
|
+
return this.viewPromise_;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Get the state of the source, see {@link import("./Source.js").State} for possible states.
|
|
181
|
+
* @return {import("./Source.js").State} State.
|
|
182
|
+
* @api
|
|
183
|
+
*/
|
|
184
|
+
getState() {
|
|
185
|
+
return this.state_;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* @return {boolean|undefined} Wrap X.
|
|
190
|
+
*/
|
|
191
|
+
getWrapX() {
|
|
192
|
+
return this.wrapX_;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* @return {boolean} Use linear interpolation when resampling.
|
|
197
|
+
*/
|
|
198
|
+
getInterpolate() {
|
|
199
|
+
return this.interpolate_;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Refreshes the source. The source will be cleared, and data from the server will be reloaded.
|
|
204
|
+
* @api
|
|
205
|
+
*/
|
|
206
|
+
refresh() {
|
|
207
|
+
this.changed();
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Set the attributions of the source.
|
|
212
|
+
* @param {AttributionLike|undefined} attributions Attributions.
|
|
213
|
+
* Can be passed as `string`, `Array<string>`, {@link module:ol/source/Source~Attribution},
|
|
214
|
+
* or `undefined`.
|
|
215
|
+
* @api
|
|
216
|
+
*/
|
|
217
|
+
setAttributions(attributions) {
|
|
218
|
+
this.attributions_ = adaptAttributions(attributions);
|
|
219
|
+
this.changed();
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Set the state of the source.
|
|
224
|
+
* @param {import("./Source.js").State} state State.
|
|
225
|
+
*/
|
|
226
|
+
setState(state) {
|
|
227
|
+
this.state_ = state;
|
|
228
|
+
this.changed();
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Turns the attributions option into an attributions function.
|
|
234
|
+
* @param {AttributionLike|undefined} attributionLike The attribution option.
|
|
235
|
+
* @return {Attribution|null} An attribution function (or null).
|
|
236
|
+
*/
|
|
237
|
+
function adaptAttributions(attributionLike) {
|
|
238
|
+
if (!attributionLike) {
|
|
239
|
+
return null;
|
|
240
|
+
}
|
|
241
|
+
if (typeof attributionLike === 'function') {
|
|
242
|
+
return attributionLike;
|
|
243
|
+
}
|
|
244
|
+
if (!Array.isArray(attributionLike)) {
|
|
245
|
+
attributionLike = [attributionLike];
|
|
246
|
+
}
|
|
247
|
+
return (frameState) => attributionLike;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Source);
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
/***/ })
|
|
254
|
+
|
|
255
|
+
}])
|
|
256
|
+
//# sourceMappingURL=node_modules_ol_source_Source_js.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node_modules_ol_source_Source_js.js","mappings":";;;;;;;;;;;;;;AAAA;AACA;AACA;AACsC;AACU;;AAEhD;AACA,aAAa,6CAA6C;AAC1D;AACA;;AAEA;AACA,4BAA4B,sDAAsD;AAClF;AACA;AACA,aAAa,kFAAkF;AAC/F;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,0CAA0C;AACpG;AACA,aAAa,kCAAkC;AAC/C;;AAEA;AACA,aAAa,QAAQ;AACrB,cAAc,iBAAiB;AAC/B,cAAc,SAAS;AACvB,cAAc,qCAAqC;AACnD,cAAc,6BAA6B;AAC3C,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;;AAEA;AACA;AACA,wBAAwB;AACxB;AACA,mBAAmB,mCAAmC;AACtD;AACA;AACA;AACA;AACA;AACA,qBAAqB,kDAAU;AAC/B;AACA,aAAa,SAAS;AACtB;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,sBAAsB,6CAAa;;AAEnC;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,8CAA8C;AAC5D;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,sCAAsC;AACnD,cAAc,oBAAoB;AAClC;AACA;AACA;AACA;;AAEA;AACA,cAAc,2CAA2C;AACzD;AACA;AACA;AACA;;AAEA;AACA,uCAAuC,mCAAmC;AAC1E,cAAc,6BAA6B;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,mBAAmB;AACjC;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,2BAA2B;AACxC,sDAAsD,0CAA0C;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,6BAA6B;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,2BAA2B;AACtC,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,MAAM,EAAC","sources":["webpack://@vaadin/bundles/./node_modules/ol/source/Source.js"],"sourcesContent":["/**\n * @module ol/source/Source\n */\nimport BaseObject from '../Object.js';\nimport {get as getProjection} from '../proj.js';\n\n/**\n * @typedef {'undefined' | 'loading' | 'ready' | 'error'} State\n * State of the source, one of 'undefined', 'loading', 'ready' or 'error'.\n */\n\n/**\n * A function that takes a {@link import(\"../View.js\").ViewStateLayerStateExtent} and returns a string or\n * an array of strings representing source attributions.\n *\n * @typedef {function(import(\"../View.js\").ViewStateLayerStateExtent): (string|Array<string>)} Attribution\n */\n\n/**\n * A type that can be used to provide attribution information for data sources.\n *\n * It represents either\n * a simple string (e.g. `'© Acme Inc.'`)\n * an array of simple strings (e.g. `['© Acme Inc.', '© Bacme Inc.']`)\n * a function that returns a string or array of strings ({@link module:ol/source/Source~Attribution})\n *\n * @typedef {string|Array<string>|Attribution} AttributionLike\n */\n\n/**\n * @typedef {Object} Options\n * @property {AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {import(\"./Source.js\").State} [state='ready'] State.\n * @property {boolean} [wrapX=false] WrapX.\n * @property {boolean} [interpolate=false] Use interpolated values when resampling. By default,\n * the nearest neighbor is used when resampling.\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for {@link module:ol/layer/Layer~Layer} sources.\n *\n * A generic `change` event is triggered when the state of the source changes.\n * @abstract\n * @api\n */\nclass Source extends BaseObject {\n /**\n * @param {Options} options Source options.\n */\n constructor(options) {\n super();\n\n /**\n * @protected\n * @type {import(\"../proj/Projection.js\").default|null}\n */\n this.projection = getProjection(options.projection);\n\n /**\n * @private\n * @type {?Attribution}\n */\n this.attributions_ = adaptAttributions(options.attributions);\n\n /**\n * @private\n * @type {boolean}\n */\n this.attributionsCollapsible_ = options.attributionsCollapsible ?? true;\n\n /**\n * This source is currently loading data. Sources that defer loading to the\n * map's tile queue never set this to `true`.\n * @type {boolean}\n */\n this.loading = false;\n\n /**\n * @private\n * @type {import(\"./Source.js\").State}\n */\n this.state_ = options.state !== undefined ? options.state : 'ready';\n\n /**\n * @private\n * @type {boolean}\n */\n this.wrapX_ = options.wrapX !== undefined ? options.wrapX : false;\n\n /**\n * @private\n * @type {boolean}\n */\n this.interpolate_ = !!options.interpolate;\n\n /**\n * @protected\n * @type {function(import(\"../View.js\").ViewOptions):void}\n */\n this.viewResolver = null;\n\n /**\n * @protected\n * @type {function(Error):void}\n */\n this.viewRejector = null;\n\n const self = this;\n /**\n * @private\n * @type {Promise<import(\"../View.js\").ViewOptions>}\n */\n this.viewPromise_ = new Promise(function (resolve, reject) {\n self.viewResolver = resolve;\n self.viewRejector = reject;\n });\n }\n\n /**\n * Get the attribution function for the source.\n * @return {?Attribution} Attribution function.\n * @api\n */\n getAttributions() {\n return this.attributions_;\n }\n\n /**\n * @return {boolean} Attributions are collapsible.\n * @api\n */\n getAttributionsCollapsible() {\n return this.attributionsCollapsible_;\n }\n\n /**\n * Get the projection of the source.\n * @return {import(\"../proj/Projection.js\").default|null} Projection.\n * @api\n */\n getProjection() {\n return this.projection;\n }\n\n /**\n * @param {import(\"../proj/Projection\").default} [projection] Projection.\n * @return {Array<number>|null} Resolutions.\n */\n getResolutions(projection) {\n return null;\n }\n\n /**\n * @return {Promise<import(\"../View.js\").ViewOptions>} A promise for view-related properties.\n */\n getView() {\n return this.viewPromise_;\n }\n\n /**\n * Get the state of the source, see {@link import(\"./Source.js\").State} for possible states.\n * @return {import(\"./Source.js\").State} State.\n * @api\n */\n getState() {\n return this.state_;\n }\n\n /**\n * @return {boolean|undefined} Wrap X.\n */\n getWrapX() {\n return this.wrapX_;\n }\n\n /**\n * @return {boolean} Use linear interpolation when resampling.\n */\n getInterpolate() {\n return this.interpolate_;\n }\n\n /**\n * Refreshes the source. The source will be cleared, and data from the server will be reloaded.\n * @api\n */\n refresh() {\n this.changed();\n }\n\n /**\n * Set the attributions of the source.\n * @param {AttributionLike|undefined} attributions Attributions.\n * Can be passed as `string`, `Array<string>`, {@link module:ol/source/Source~Attribution},\n * or `undefined`.\n * @api\n */\n setAttributions(attributions) {\n this.attributions_ = adaptAttributions(attributions);\n this.changed();\n }\n\n /**\n * Set the state of the source.\n * @param {import(\"./Source.js\").State} state State.\n */\n setState(state) {\n this.state_ = state;\n this.changed();\n }\n}\n\n/**\n * Turns the attributions option into an attributions function.\n * @param {AttributionLike|undefined} attributionLike The attribution option.\n * @return {Attribution|null} An attribution function (or null).\n */\nfunction adaptAttributions(attributionLike) {\n if (!attributionLike) {\n return null;\n }\n if (typeof attributionLike === 'function') {\n return attributionLike;\n }\n if (!Array.isArray(attributionLike)) {\n attributionLike = [attributionLike];\n }\n return (frameState) => attributionLike;\n}\n\nexport default Source;\n"],"names":[],"sourceRoot":""}
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
(self["webpackChunk_vaadin_bundles"] = self["webpackChunk_vaadin_bundles"] || []).push([["node_modules_ol_source_VectorEventType_js-node_modules_ol_structs_RBush_js"],{
|
|
2
|
+
|
|
3
|
+
/***/ "./node_modules/ol/source/VectorEventType.js":
|
|
4
|
+
/*!***************************************************!*\
|
|
5
|
+
!*** ./node_modules/ol/source/VectorEventType.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
|
+
/**
|
|
14
|
+
* @module ol/source/VectorEventType
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @enum {string}
|
|
19
|
+
*/
|
|
20
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
21
|
+
/**
|
|
22
|
+
* Triggered when a feature is added to the source.
|
|
23
|
+
* @event module:ol/source/Vector.VectorSourceEvent#addfeature
|
|
24
|
+
* @api
|
|
25
|
+
*/
|
|
26
|
+
ADDFEATURE: 'addfeature',
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Triggered when a feature is updated.
|
|
30
|
+
* @event module:ol/source/Vector.VectorSourceEvent#changefeature
|
|
31
|
+
* @api
|
|
32
|
+
*/
|
|
33
|
+
CHANGEFEATURE: 'changefeature',
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Triggered when the clear method is called on the source.
|
|
37
|
+
* @event module:ol/source/Vector.VectorSourceEvent#clear
|
|
38
|
+
* @api
|
|
39
|
+
*/
|
|
40
|
+
CLEAR: 'clear',
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Triggered when a feature is removed from the source.
|
|
44
|
+
* See {@link module:ol/source/Vector~VectorSource#clear source.clear()} for exceptions.
|
|
45
|
+
* @event module:ol/source/Vector.VectorSourceEvent#removefeature
|
|
46
|
+
* @api
|
|
47
|
+
*/
|
|
48
|
+
REMOVEFEATURE: 'removefeature',
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Triggered when features starts loading.
|
|
52
|
+
* @event module:ol/source/Vector.VectorSourceEvent#featuresloadstart
|
|
53
|
+
* @api
|
|
54
|
+
*/
|
|
55
|
+
FEATURESLOADSTART: 'featuresloadstart',
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Triggered when features finishes loading.
|
|
59
|
+
* @event module:ol/source/Vector.VectorSourceEvent#featuresloadend
|
|
60
|
+
* @api
|
|
61
|
+
*/
|
|
62
|
+
FEATURESLOADEND: 'featuresloadend',
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Triggered if feature loading results in an error.
|
|
66
|
+
* @event module:ol/source/Vector.VectorSourceEvent#featuresloaderror
|
|
67
|
+
* @api
|
|
68
|
+
*/
|
|
69
|
+
FEATURESLOADERROR: 'featuresloaderror',
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @typedef {'addfeature'|'changefeature'|'clear'|'removefeature'|'featuresloadstart'|'featuresloadend'|'featuresloaderror'} VectorSourceEventTypes
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
/***/ }),
|
|
78
|
+
|
|
79
|
+
/***/ "./node_modules/ol/structs/RBush.js":
|
|
80
|
+
/*!******************************************!*\
|
|
81
|
+
!*** ./node_modules/ol/structs/RBush.js ***!
|
|
82
|
+
\******************************************/
|
|
83
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
84
|
+
|
|
85
|
+
__webpack_require__.r(__webpack_exports__);
|
|
86
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
87
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
88
|
+
/* harmony export */ });
|
|
89
|
+
/* harmony import */ var rbush__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rbush */ "./node_modules/rbush/index.js");
|
|
90
|
+
/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../extent.js */ "./node_modules/ol/extent.js");
|
|
91
|
+
/* harmony import */ var _obj_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../obj.js */ "./node_modules/ol/obj.js");
|
|
92
|
+
/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util.js */ "./node_modules/ol/util.js");
|
|
93
|
+
/**
|
|
94
|
+
* @module ol/structs/RBush
|
|
95
|
+
*/
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* @typedef {import("rbush").BBox & {value: T}} Entry
|
|
103
|
+
* @template T
|
|
104
|
+
*/
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* @classdesc
|
|
108
|
+
* Wrapper around the RBush by Vladimir Agafonkin.
|
|
109
|
+
* See https://github.com/mourner/rbush.
|
|
110
|
+
*
|
|
111
|
+
* @template {Object} T
|
|
112
|
+
*/
|
|
113
|
+
class RBush {
|
|
114
|
+
/**
|
|
115
|
+
* @param {number} [maxEntries] Max entries.
|
|
116
|
+
*/
|
|
117
|
+
constructor(maxEntries) {
|
|
118
|
+
/**
|
|
119
|
+
* @private
|
|
120
|
+
* @type {RBush_<Entry<T>>}
|
|
121
|
+
*/
|
|
122
|
+
this.rbush_ = new rbush__WEBPACK_IMPORTED_MODULE_0__["default"](maxEntries);
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* A mapping between the objects added to this rbush wrapper
|
|
126
|
+
* and the objects that are actually added to the internal rbush.
|
|
127
|
+
* @private
|
|
128
|
+
* @type {Object<string, Entry<T>>}
|
|
129
|
+
*/
|
|
130
|
+
this.items_ = {};
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Insert a value into the RBush.
|
|
135
|
+
* @param {import("../extent.js").Extent} extent Extent.
|
|
136
|
+
* @param {T} value Value.
|
|
137
|
+
*/
|
|
138
|
+
insert(extent, value) {
|
|
139
|
+
/** @type {Entry<T>} */
|
|
140
|
+
const item = {
|
|
141
|
+
minX: extent[0],
|
|
142
|
+
minY: extent[1],
|
|
143
|
+
maxX: extent[2],
|
|
144
|
+
maxY: extent[3],
|
|
145
|
+
value: value,
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
this.rbush_.insert(item);
|
|
149
|
+
this.items_[(0,_util_js__WEBPACK_IMPORTED_MODULE_1__.getUid)(value)] = item;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Bulk-insert values into the RBush.
|
|
154
|
+
* @param {Array<import("../extent.js").Extent>} extents Extents.
|
|
155
|
+
* @param {Array<T>} values Values.
|
|
156
|
+
*/
|
|
157
|
+
load(extents, values) {
|
|
158
|
+
const items = new Array(values.length);
|
|
159
|
+
for (let i = 0, l = values.length; i < l; i++) {
|
|
160
|
+
const extent = extents[i];
|
|
161
|
+
const value = values[i];
|
|
162
|
+
|
|
163
|
+
/** @type {Entry<T>} */
|
|
164
|
+
const item = {
|
|
165
|
+
minX: extent[0],
|
|
166
|
+
minY: extent[1],
|
|
167
|
+
maxX: extent[2],
|
|
168
|
+
maxY: extent[3],
|
|
169
|
+
value: value,
|
|
170
|
+
};
|
|
171
|
+
items[i] = item;
|
|
172
|
+
this.items_[(0,_util_js__WEBPACK_IMPORTED_MODULE_1__.getUid)(value)] = item;
|
|
173
|
+
}
|
|
174
|
+
this.rbush_.load(items);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Remove a value from the RBush.
|
|
179
|
+
* @param {T} value Value.
|
|
180
|
+
* @return {boolean} Removed.
|
|
181
|
+
*/
|
|
182
|
+
remove(value) {
|
|
183
|
+
const uid = (0,_util_js__WEBPACK_IMPORTED_MODULE_1__.getUid)(value);
|
|
184
|
+
|
|
185
|
+
// get the object in which the value was wrapped when adding to the
|
|
186
|
+
// internal rbush. then use that object to do the removal.
|
|
187
|
+
const item = this.items_[uid];
|
|
188
|
+
delete this.items_[uid];
|
|
189
|
+
return this.rbush_.remove(item) !== null;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Update the extent of a value in the RBush.
|
|
194
|
+
* @param {import("../extent.js").Extent} extent Extent.
|
|
195
|
+
* @param {T} value Value.
|
|
196
|
+
*/
|
|
197
|
+
update(extent, value) {
|
|
198
|
+
const item = this.items_[(0,_util_js__WEBPACK_IMPORTED_MODULE_1__.getUid)(value)];
|
|
199
|
+
const bbox = [item.minX, item.minY, item.maxX, item.maxY];
|
|
200
|
+
if (!(0,_extent_js__WEBPACK_IMPORTED_MODULE_2__.equals)(bbox, extent)) {
|
|
201
|
+
this.remove(value);
|
|
202
|
+
this.insert(extent, value);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Return all values in the RBush.
|
|
208
|
+
* @return {Array<T>} All.
|
|
209
|
+
*/
|
|
210
|
+
getAll() {
|
|
211
|
+
const items = this.rbush_.all();
|
|
212
|
+
return items.map(function (item) {
|
|
213
|
+
return item.value;
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Return all values in the given extent.
|
|
219
|
+
* @param {import("../extent.js").Extent} extent Extent.
|
|
220
|
+
* @return {Array<T>} All in extent.
|
|
221
|
+
*/
|
|
222
|
+
getInExtent(extent) {
|
|
223
|
+
/** @type {import("rbush").BBox} */
|
|
224
|
+
const bbox = {
|
|
225
|
+
minX: extent[0],
|
|
226
|
+
minY: extent[1],
|
|
227
|
+
maxX: extent[2],
|
|
228
|
+
maxY: extent[3],
|
|
229
|
+
};
|
|
230
|
+
const items = this.rbush_.search(bbox);
|
|
231
|
+
return items.map(function (item) {
|
|
232
|
+
return item.value;
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Calls a callback function with each value in the tree.
|
|
238
|
+
* If the callback returns a truthy value, this value is returned without
|
|
239
|
+
* checking the rest of the tree.
|
|
240
|
+
* @param {function(T): R} callback Callback.
|
|
241
|
+
* @return {R|undefined} Callback return value.
|
|
242
|
+
* @template R
|
|
243
|
+
*/
|
|
244
|
+
forEach(callback) {
|
|
245
|
+
return this.forEach_(this.getAll(), callback);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Calls a callback function with each value in the provided extent.
|
|
250
|
+
* @param {import("../extent.js").Extent} extent Extent.
|
|
251
|
+
* @param {function(T): R} callback Callback.
|
|
252
|
+
* @return {R|undefined} Callback return value.
|
|
253
|
+
* @template R
|
|
254
|
+
*/
|
|
255
|
+
forEachInExtent(extent, callback) {
|
|
256
|
+
return this.forEach_(this.getInExtent(extent), callback);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* @param {Array<T>} values Values.
|
|
261
|
+
* @param {function(T): R} callback Callback.
|
|
262
|
+
* @return {R|undefined} Callback return value.
|
|
263
|
+
* @template R
|
|
264
|
+
* @private
|
|
265
|
+
*/
|
|
266
|
+
forEach_(values, callback) {
|
|
267
|
+
let result;
|
|
268
|
+
for (let i = 0, l = values.length; i < l; i++) {
|
|
269
|
+
result = callback(values[i]);
|
|
270
|
+
if (result) {
|
|
271
|
+
return result;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
return result;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* @return {boolean} Is empty.
|
|
279
|
+
*/
|
|
280
|
+
isEmpty() {
|
|
281
|
+
return (0,_obj_js__WEBPACK_IMPORTED_MODULE_3__.isEmpty)(this.items_);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Remove all values from the RBush.
|
|
286
|
+
*/
|
|
287
|
+
clear() {
|
|
288
|
+
this.rbush_.clear();
|
|
289
|
+
this.items_ = {};
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* @param {import("../extent.js").Extent} [extent] Extent.
|
|
294
|
+
* @return {import("../extent.js").Extent} Extent.
|
|
295
|
+
*/
|
|
296
|
+
getExtent(extent) {
|
|
297
|
+
const data = this.rbush_.toJSON();
|
|
298
|
+
return (0,_extent_js__WEBPACK_IMPORTED_MODULE_2__.createOrUpdate)(data.minX, data.minY, data.maxX, data.maxY, extent);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* @param {RBush<T>} rbush R-Tree.
|
|
303
|
+
*/
|
|
304
|
+
concat(rbush) {
|
|
305
|
+
this.rbush_.load(rbush.rbush_.all());
|
|
306
|
+
for (const i in rbush.items_) {
|
|
307
|
+
this.items_[i] = rbush.items_[i];
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RBush);
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
/***/ })
|
|
316
|
+
|
|
317
|
+
}])
|
|
318
|
+
//# sourceMappingURL=node_modules_ol_source_VectorEventType_js-node_modules_ol_structs_RBush_js.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node_modules_ol_source_VectorEventType_js-node_modules_ol_structs_RBush_js.js","mappings":";;;;;;;;;;;;AAAA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA,iEAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,iEAAiE;AAC3E;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF;AACA,aAAa,gHAAgH;AAC7H;;;;;;;;;;;;;;;;;;;AC7DA;AACA;AACA;AAC2B;AACyB;AAClB;AACA;;AAElC;AACA,aAAa,wBAAwB,WAAW;AAChD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,sBAAsB,6CAAM;;AAE5B;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,aAAa,+BAA+B;AAC5C,aAAa,GAAG;AAChB;AACA;AACA,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB,gDAAM;AACtB;;AAEA;AACA;AACA,aAAa,sCAAsC;AACnD,aAAa,UAAU;AACvB;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;;AAEA,iBAAiB,UAAU;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gDAAM;AACxB;AACA;AACA;;AAEA;AACA;AACA,aAAa,GAAG;AAChB,cAAc,SAAS;AACvB;AACA;AACA,gBAAgB,gDAAM;;AAEtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,+BAA+B;AAC5C,aAAa,GAAG;AAChB;AACA;AACA,6BAA6B,gDAAM;AACnC;AACA,SAAS,kDAAM;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,aAAa,+BAA+B;AAC5C,cAAc,UAAU;AACxB;AACA;AACA,eAAe,sBAAsB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,aAAa,gBAAgB;AAC7B,cAAc,aAAa;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,+BAA+B;AAC5C,aAAa,gBAAgB;AAC7B,cAAc,aAAa;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,UAAU;AACvB,aAAa,gBAAgB;AAC7B,cAAc,aAAa;AAC3B;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA,WAAW,gDAAO;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,+BAA+B;AAC5C,cAAc,+BAA+B;AAC7C;AACA;AACA;AACA,WAAW,0DAAc;AACzB;;AAEA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,KAAK,EAAC","sources":["webpack://@vaadin/bundles/./node_modules/ol/source/VectorEventType.js","webpack://@vaadin/bundles/./node_modules/ol/structs/RBush.js"],"sourcesContent":["/**\n * @module ol/source/VectorEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n /**\n * Triggered when a feature is added to the source.\n * @event module:ol/source/Vector.VectorSourceEvent#addfeature\n * @api\n */\n ADDFEATURE: 'addfeature',\n\n /**\n * Triggered when a feature is updated.\n * @event module:ol/source/Vector.VectorSourceEvent#changefeature\n * @api\n */\n CHANGEFEATURE: 'changefeature',\n\n /**\n * Triggered when the clear method is called on the source.\n * @event module:ol/source/Vector.VectorSourceEvent#clear\n * @api\n */\n CLEAR: 'clear',\n\n /**\n * Triggered when a feature is removed from the source.\n * See {@link module:ol/source/Vector~VectorSource#clear source.clear()} for exceptions.\n * @event module:ol/source/Vector.VectorSourceEvent#removefeature\n * @api\n */\n REMOVEFEATURE: 'removefeature',\n\n /**\n * Triggered when features starts loading.\n * @event module:ol/source/Vector.VectorSourceEvent#featuresloadstart\n * @api\n */\n FEATURESLOADSTART: 'featuresloadstart',\n\n /**\n * Triggered when features finishes loading.\n * @event module:ol/source/Vector.VectorSourceEvent#featuresloadend\n * @api\n */\n FEATURESLOADEND: 'featuresloadend',\n\n /**\n * Triggered if feature loading results in an error.\n * @event module:ol/source/Vector.VectorSourceEvent#featuresloaderror\n * @api\n */\n FEATURESLOADERROR: 'featuresloaderror',\n};\n\n/**\n * @typedef {'addfeature'|'changefeature'|'clear'|'removefeature'|'featuresloadstart'|'featuresloadend'|'featuresloaderror'} VectorSourceEventTypes\n */\n","/**\n * @module ol/structs/RBush\n */\nimport RBush_ from 'rbush';\nimport {createOrUpdate, equals} from '../extent.js';\nimport {isEmpty} from '../obj.js';\nimport {getUid} from '../util.js';\n\n/**\n * @typedef {import(\"rbush\").BBox & {value: T}} Entry\n * @template T\n */\n\n/**\n * @classdesc\n * Wrapper around the RBush by Vladimir Agafonkin.\n * See https://github.com/mourner/rbush.\n *\n * @template {Object} T\n */\nclass RBush {\n /**\n * @param {number} [maxEntries] Max entries.\n */\n constructor(maxEntries) {\n /**\n * @private\n * @type {RBush_<Entry<T>>}\n */\n this.rbush_ = new RBush_(maxEntries);\n\n /**\n * A mapping between the objects added to this rbush wrapper\n * and the objects that are actually added to the internal rbush.\n * @private\n * @type {Object<string, Entry<T>>}\n */\n this.items_ = {};\n }\n\n /**\n * Insert a value into the RBush.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {T} value Value.\n */\n insert(extent, value) {\n /** @type {Entry<T>} */\n const item = {\n minX: extent[0],\n minY: extent[1],\n maxX: extent[2],\n maxY: extent[3],\n value: value,\n };\n\n this.rbush_.insert(item);\n this.items_[getUid(value)] = item;\n }\n\n /**\n * Bulk-insert values into the RBush.\n * @param {Array<import(\"../extent.js\").Extent>} extents Extents.\n * @param {Array<T>} values Values.\n */\n load(extents, values) {\n const items = new Array(values.length);\n for (let i = 0, l = values.length; i < l; i++) {\n const extent = extents[i];\n const value = values[i];\n\n /** @type {Entry<T>} */\n const item = {\n minX: extent[0],\n minY: extent[1],\n maxX: extent[2],\n maxY: extent[3],\n value: value,\n };\n items[i] = item;\n this.items_[getUid(value)] = item;\n }\n this.rbush_.load(items);\n }\n\n /**\n * Remove a value from the RBush.\n * @param {T} value Value.\n * @return {boolean} Removed.\n */\n remove(value) {\n const uid = getUid(value);\n\n // get the object in which the value was wrapped when adding to the\n // internal rbush. then use that object to do the removal.\n const item = this.items_[uid];\n delete this.items_[uid];\n return this.rbush_.remove(item) !== null;\n }\n\n /**\n * Update the extent of a value in the RBush.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {T} value Value.\n */\n update(extent, value) {\n const item = this.items_[getUid(value)];\n const bbox = [item.minX, item.minY, item.maxX, item.maxY];\n if (!equals(bbox, extent)) {\n this.remove(value);\n this.insert(extent, value);\n }\n }\n\n /**\n * Return all values in the RBush.\n * @return {Array<T>} All.\n */\n getAll() {\n const items = this.rbush_.all();\n return items.map(function (item) {\n return item.value;\n });\n }\n\n /**\n * Return all values in the given extent.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {Array<T>} All in extent.\n */\n getInExtent(extent) {\n /** @type {import(\"rbush\").BBox} */\n const bbox = {\n minX: extent[0],\n minY: extent[1],\n maxX: extent[2],\n maxY: extent[3],\n };\n const items = this.rbush_.search(bbox);\n return items.map(function (item) {\n return item.value;\n });\n }\n\n /**\n * Calls a callback function with each value in the tree.\n * If the callback returns a truthy value, this value is returned without\n * checking the rest of the tree.\n * @param {function(T): R} callback Callback.\n * @return {R|undefined} Callback return value.\n * @template R\n */\n forEach(callback) {\n return this.forEach_(this.getAll(), callback);\n }\n\n /**\n * Calls a callback function with each value in the provided extent.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {function(T): R} callback Callback.\n * @return {R|undefined} Callback return value.\n * @template R\n */\n forEachInExtent(extent, callback) {\n return this.forEach_(this.getInExtent(extent), callback);\n }\n\n /**\n * @param {Array<T>} values Values.\n * @param {function(T): R} callback Callback.\n * @return {R|undefined} Callback return value.\n * @template R\n * @private\n */\n forEach_(values, callback) {\n let result;\n for (let i = 0, l = values.length; i < l; i++) {\n result = callback(values[i]);\n if (result) {\n return result;\n }\n }\n return result;\n }\n\n /**\n * @return {boolean} Is empty.\n */\n isEmpty() {\n return isEmpty(this.items_);\n }\n\n /**\n * Remove all values from the RBush.\n */\n clear() {\n this.rbush_.clear();\n this.items_ = {};\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} [extent] Extent.\n * @return {import(\"../extent.js\").Extent} Extent.\n */\n getExtent(extent) {\n const data = this.rbush_.toJSON();\n return createOrUpdate(data.minX, data.minY, data.maxX, data.maxY, extent);\n }\n\n /**\n * @param {RBush<T>} rbush R-Tree.\n */\n concat(rbush) {\n this.rbush_.load(rbush.rbush_.all());\n for (const i in rbush.items_) {\n this.items_[i] = rbush.items_[i];\n }\n }\n}\n\nexport default RBush;\n"],"names":[],"sourceRoot":""}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
(self["webpackChunk_vaadin_bundles"] = self["webpackChunk_vaadin_bundles"] || []).push([["node_modules_ol_source_VectorEventType_js"],{
|
|
2
|
+
|
|
3
|
+
/***/ "./node_modules/ol/source/VectorEventType.js":
|
|
4
|
+
/*!***************************************************!*\
|
|
5
|
+
!*** ./node_modules/ol/source/VectorEventType.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
|
+
/**
|
|
14
|
+
* @module ol/source/VectorEventType
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @enum {string}
|
|
19
|
+
*/
|
|
20
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
21
|
+
/**
|
|
22
|
+
* Triggered when a feature is added to the source.
|
|
23
|
+
* @event module:ol/source/Vector.VectorSourceEvent#addfeature
|
|
24
|
+
* @api
|
|
25
|
+
*/
|
|
26
|
+
ADDFEATURE: 'addfeature',
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Triggered when a feature is updated.
|
|
30
|
+
* @event module:ol/source/Vector.VectorSourceEvent#changefeature
|
|
31
|
+
* @api
|
|
32
|
+
*/
|
|
33
|
+
CHANGEFEATURE: 'changefeature',
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Triggered when the clear method is called on the source.
|
|
37
|
+
* @event module:ol/source/Vector.VectorSourceEvent#clear
|
|
38
|
+
* @api
|
|
39
|
+
*/
|
|
40
|
+
CLEAR: 'clear',
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Triggered when a feature is removed from the source.
|
|
44
|
+
* See {@link module:ol/source/Vector~VectorSource#clear source.clear()} for exceptions.
|
|
45
|
+
* @event module:ol/source/Vector.VectorSourceEvent#removefeature
|
|
46
|
+
* @api
|
|
47
|
+
*/
|
|
48
|
+
REMOVEFEATURE: 'removefeature',
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Triggered when features starts loading.
|
|
52
|
+
* @event module:ol/source/Vector.VectorSourceEvent#featuresloadstart
|
|
53
|
+
* @api
|
|
54
|
+
*/
|
|
55
|
+
FEATURESLOADSTART: 'featuresloadstart',
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Triggered when features finishes loading.
|
|
59
|
+
* @event module:ol/source/Vector.VectorSourceEvent#featuresloadend
|
|
60
|
+
* @api
|
|
61
|
+
*/
|
|
62
|
+
FEATURESLOADEND: 'featuresloadend',
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Triggered if feature loading results in an error.
|
|
66
|
+
* @event module:ol/source/Vector.VectorSourceEvent#featuresloaderror
|
|
67
|
+
* @api
|
|
68
|
+
*/
|
|
69
|
+
FEATURESLOADERROR: 'featuresloaderror',
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @typedef {'addfeature'|'changefeature'|'clear'|'removefeature'|'featuresloadstart'|'featuresloadend'|'featuresloaderror'} VectorSourceEventTypes
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
/***/ })
|
|
78
|
+
|
|
79
|
+
}])
|
|
80
|
+
//# sourceMappingURL=node_modules_ol_source_VectorEventType_js.js.map
|