@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,490 @@
|
|
|
1
|
+
(self["webpackChunk_vaadin_bundles"] = self["webpackChunk_vaadin_bundles"] || []).push([["vendors-node_modules_ol_control_js"],{
|
|
2
|
+
|
|
3
|
+
/***/ "./node_modules/ol/control.js":
|
|
4
|
+
/*!************************************!*\
|
|
5
|
+
!*** ./node_modules/ol/control.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 */ "Attribution": () => (/* reexport safe */ _control_Attribution_js__WEBPACK_IMPORTED_MODULE_0__["default"]),
|
|
12
|
+
/* harmony export */ "Control": () => (/* reexport safe */ _control_Control_js__WEBPACK_IMPORTED_MODULE_1__["default"]),
|
|
13
|
+
/* harmony export */ "FullScreen": () => (/* reexport safe */ _control_FullScreen_js__WEBPACK_IMPORTED_MODULE_2__["default"]),
|
|
14
|
+
/* harmony export */ "MousePosition": () => (/* reexport safe */ _control_MousePosition_js__WEBPACK_IMPORTED_MODULE_3__["default"]),
|
|
15
|
+
/* harmony export */ "OverviewMap": () => (/* reexport safe */ _control_OverviewMap_js__WEBPACK_IMPORTED_MODULE_4__["default"]),
|
|
16
|
+
/* harmony export */ "Rotate": () => (/* reexport safe */ _control_Rotate_js__WEBPACK_IMPORTED_MODULE_5__["default"]),
|
|
17
|
+
/* harmony export */ "ScaleLine": () => (/* reexport safe */ _control_ScaleLine_js__WEBPACK_IMPORTED_MODULE_6__["default"]),
|
|
18
|
+
/* harmony export */ "Zoom": () => (/* reexport safe */ _control_Zoom_js__WEBPACK_IMPORTED_MODULE_7__["default"]),
|
|
19
|
+
/* harmony export */ "ZoomSlider": () => (/* reexport safe */ _control_ZoomSlider_js__WEBPACK_IMPORTED_MODULE_8__["default"]),
|
|
20
|
+
/* harmony export */ "ZoomToExtent": () => (/* reexport safe */ _control_ZoomToExtent_js__WEBPACK_IMPORTED_MODULE_9__["default"]),
|
|
21
|
+
/* harmony export */ "defaults": () => (/* reexport safe */ _control_defaults_js__WEBPACK_IMPORTED_MODULE_10__.defaults)
|
|
22
|
+
/* harmony export */ });
|
|
23
|
+
/* harmony import */ var _control_Attribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./control/Attribution.js */ "./node_modules/ol/control/Attribution.js");
|
|
24
|
+
/* harmony import */ var _control_Control_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./control/Control.js */ "./node_modules/ol/control/Control.js");
|
|
25
|
+
/* harmony import */ var _control_FullScreen_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./control/FullScreen.js */ "./node_modules/ol/control/FullScreen.js");
|
|
26
|
+
/* harmony import */ var _control_MousePosition_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./control/MousePosition.js */ "./node_modules/ol/control/MousePosition.js");
|
|
27
|
+
/* harmony import */ var _control_OverviewMap_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./control/OverviewMap.js */ "./node_modules/ol/control/OverviewMap.js");
|
|
28
|
+
/* harmony import */ var _control_Rotate_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./control/Rotate.js */ "./node_modules/ol/control/Rotate.js");
|
|
29
|
+
/* harmony import */ var _control_ScaleLine_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./control/ScaleLine.js */ "./node_modules/ol/control/ScaleLine.js");
|
|
30
|
+
/* harmony import */ var _control_Zoom_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./control/Zoom.js */ "./node_modules/ol/control/Zoom.js");
|
|
31
|
+
/* harmony import */ var _control_ZoomSlider_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./control/ZoomSlider.js */ "./node_modules/ol/control/ZoomSlider.js");
|
|
32
|
+
/* harmony import */ var _control_ZoomToExtent_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./control/ZoomToExtent.js */ "./node_modules/ol/control/ZoomToExtent.js");
|
|
33
|
+
/* harmony import */ var _control_defaults_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./control/defaults.js */ "./node_modules/ol/control/defaults.js");
|
|
34
|
+
/**
|
|
35
|
+
* @module ol/control
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
/***/ }),
|
|
51
|
+
|
|
52
|
+
/***/ "./node_modules/ol/control/MousePosition.js":
|
|
53
|
+
/*!**************************************************!*\
|
|
54
|
+
!*** ./node_modules/ol/control/MousePosition.js ***!
|
|
55
|
+
\**************************************************/
|
|
56
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
57
|
+
|
|
58
|
+
__webpack_require__.r(__webpack_exports__);
|
|
59
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
60
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
61
|
+
/* harmony export */ });
|
|
62
|
+
/* harmony import */ var _coordinate_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../coordinate.js */ "./node_modules/ol/coordinate.js");
|
|
63
|
+
/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../events.js */ "./node_modules/ol/events.js");
|
|
64
|
+
/* harmony import */ var _pointer_EventType_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../pointer/EventType.js */ "./node_modules/ol/pointer/EventType.js");
|
|
65
|
+
/* harmony import */ var _proj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../proj.js */ "./node_modules/ol/proj.js");
|
|
66
|
+
/* harmony import */ var _Control_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Control.js */ "./node_modules/ol/control/Control.js");
|
|
67
|
+
/**
|
|
68
|
+
* @module ol/control/MousePosition
|
|
69
|
+
*/
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @type {string}
|
|
79
|
+
*/
|
|
80
|
+
const PROJECTION = 'projection';
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @type {string}
|
|
84
|
+
*/
|
|
85
|
+
const COORDINATE_FORMAT = 'coordinateFormat';
|
|
86
|
+
|
|
87
|
+
/***
|
|
88
|
+
* @template Return
|
|
89
|
+
* @typedef {import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default, Return> &
|
|
90
|
+
* import("../Observable").OnSignature<import("../ObjectEventType").Types|
|
|
91
|
+
* 'change:coordinateFormat'|'change:projection', import("../Object").ObjectEvent, Return> &
|
|
92
|
+
* import("../Observable").CombinedOnSignature<import("../Observable").EventTypes|import("../ObjectEventType").Types|
|
|
93
|
+
* 'change:coordinateFormat'|'change:projection', Return>} MousePositionOnSignature
|
|
94
|
+
*/
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* @typedef {Object} Options
|
|
98
|
+
* @property {string} [className='ol-mouse-position'] CSS class name.
|
|
99
|
+
* @property {import("../coordinate.js").CoordinateFormat} [coordinateFormat] Coordinate format.
|
|
100
|
+
* @property {import("../proj.js").ProjectionLike} [projection] Projection. Default is the view projection.
|
|
101
|
+
* @property {function(import("../MapEvent.js").default):void} [render] Function called when the
|
|
102
|
+
* control should be re-rendered. This is called in a `requestAnimationFrame`
|
|
103
|
+
* callback.
|
|
104
|
+
* @property {HTMLElement|string} [target] Specify a target if you want the
|
|
105
|
+
* control to be rendered outside of the map's viewport.
|
|
106
|
+
* @property {string} [placeholder] Markup to show when the mouse position is not
|
|
107
|
+
* available (e.g. when the pointer leaves the map viewport). By default, a non-breaking space is rendered
|
|
108
|
+
* initially and the last position is retained when the mouse leaves the viewport.
|
|
109
|
+
* When a string is provided (e.g. `'no position'` or `''` for an empty string) it is used as a
|
|
110
|
+
* placeholder.
|
|
111
|
+
* @property {boolean} [wrapX=true] Wrap the world horizontally on the projection's antimeridian, if it
|
|
112
|
+
* is a global projection.
|
|
113
|
+
*/
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* @classdesc
|
|
117
|
+
* A control to show the 2D coordinates of the mouse cursor. By default, these
|
|
118
|
+
* are in the view projection, but can be in any supported projection.
|
|
119
|
+
* By default the control is shown in the top right corner of the map, but this
|
|
120
|
+
* can be changed by using the css selector `.ol-mouse-position`.
|
|
121
|
+
*
|
|
122
|
+
* On touch devices, which usually do not have a mouse cursor, the coordinates
|
|
123
|
+
* of the currently touched position are shown.
|
|
124
|
+
*
|
|
125
|
+
* @api
|
|
126
|
+
*/
|
|
127
|
+
class MousePosition extends _Control_js__WEBPACK_IMPORTED_MODULE_1__["default"] {
|
|
128
|
+
/**
|
|
129
|
+
* @param {Options} [options] Mouse position options.
|
|
130
|
+
*/
|
|
131
|
+
constructor(options) {
|
|
132
|
+
options = options ? options : {};
|
|
133
|
+
|
|
134
|
+
const element = document.createElement('div');
|
|
135
|
+
element.className =
|
|
136
|
+
options.className !== undefined ? options.className : 'ol-mouse-position';
|
|
137
|
+
|
|
138
|
+
super({
|
|
139
|
+
element: element,
|
|
140
|
+
render: options.render,
|
|
141
|
+
target: options.target,
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
/***
|
|
145
|
+
* @type {MousePositionOnSignature<import("../events").EventsKey>}
|
|
146
|
+
*/
|
|
147
|
+
this.on;
|
|
148
|
+
|
|
149
|
+
/***
|
|
150
|
+
* @type {MousePositionOnSignature<import("../events").EventsKey>}
|
|
151
|
+
*/
|
|
152
|
+
this.once;
|
|
153
|
+
|
|
154
|
+
/***
|
|
155
|
+
* @type {MousePositionOnSignature<void>}
|
|
156
|
+
*/
|
|
157
|
+
this.un;
|
|
158
|
+
|
|
159
|
+
this.addChangeListener(PROJECTION, this.handleProjectionChanged_);
|
|
160
|
+
|
|
161
|
+
if (options.coordinateFormat) {
|
|
162
|
+
this.setCoordinateFormat(options.coordinateFormat);
|
|
163
|
+
}
|
|
164
|
+
if (options.projection) {
|
|
165
|
+
this.setProjection(options.projection);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* @private
|
|
170
|
+
* @type {boolean}
|
|
171
|
+
*/
|
|
172
|
+
this.renderOnMouseOut_ = options.placeholder !== undefined;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* @private
|
|
176
|
+
* @type {string}
|
|
177
|
+
*/
|
|
178
|
+
this.placeholder_ = this.renderOnMouseOut_ ? options.placeholder : ' ';
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* @private
|
|
182
|
+
* @type {string}
|
|
183
|
+
*/
|
|
184
|
+
this.renderedHTML_ = element.innerHTML;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* @private
|
|
188
|
+
* @type {?import("../proj/Projection.js").default}
|
|
189
|
+
*/
|
|
190
|
+
this.mapProjection_ = null;
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* @private
|
|
194
|
+
* @type {?import("../proj.js").TransformFunction}
|
|
195
|
+
*/
|
|
196
|
+
this.transform_ = null;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* @private
|
|
200
|
+
* @type {boolean}
|
|
201
|
+
*/
|
|
202
|
+
this.wrapX_ = options.wrapX === false ? false : true;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* @private
|
|
207
|
+
*/
|
|
208
|
+
handleProjectionChanged_() {
|
|
209
|
+
this.transform_ = null;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Return the coordinate format type used to render the current position or
|
|
214
|
+
* undefined.
|
|
215
|
+
* @return {import("../coordinate.js").CoordinateFormat|undefined} The format to render the current
|
|
216
|
+
* position in.
|
|
217
|
+
* @observable
|
|
218
|
+
* @api
|
|
219
|
+
*/
|
|
220
|
+
getCoordinateFormat() {
|
|
221
|
+
return /** @type {import("../coordinate.js").CoordinateFormat|undefined} */ (
|
|
222
|
+
this.get(COORDINATE_FORMAT)
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Return the projection that is used to report the mouse position.
|
|
228
|
+
* @return {import("../proj/Projection.js").default|undefined} The projection to report mouse
|
|
229
|
+
* position in.
|
|
230
|
+
* @observable
|
|
231
|
+
* @api
|
|
232
|
+
*/
|
|
233
|
+
getProjection() {
|
|
234
|
+
return /** @type {import("../proj/Projection.js").default|undefined} */ (
|
|
235
|
+
this.get(PROJECTION)
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* @param {MouseEvent} event Browser event.
|
|
241
|
+
* @protected
|
|
242
|
+
*/
|
|
243
|
+
handleMouseMove(event) {
|
|
244
|
+
const map = this.getMap();
|
|
245
|
+
this.updateHTML_(map.getEventPixel(event));
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* @param {Event} event Browser event.
|
|
250
|
+
* @protected
|
|
251
|
+
*/
|
|
252
|
+
handleMouseOut(event) {
|
|
253
|
+
this.updateHTML_(null);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Remove the control from its current map and attach it to the new map.
|
|
258
|
+
* Pass `null` to just remove the control from the current map.
|
|
259
|
+
* Subclasses may set up event handlers to get notified about changes to
|
|
260
|
+
* the map here.
|
|
261
|
+
* @param {import("../Map.js").default|null} map Map.
|
|
262
|
+
* @api
|
|
263
|
+
* @override
|
|
264
|
+
*/
|
|
265
|
+
setMap(map) {
|
|
266
|
+
super.setMap(map);
|
|
267
|
+
if (map) {
|
|
268
|
+
const viewport = map.getViewport();
|
|
269
|
+
this.listenerKeys.push(
|
|
270
|
+
(0,_events_js__WEBPACK_IMPORTED_MODULE_2__.listen)(viewport, _pointer_EventType_js__WEBPACK_IMPORTED_MODULE_3__["default"].POINTERMOVE, this.handleMouseMove, this),
|
|
271
|
+
);
|
|
272
|
+
if (this.renderOnMouseOut_) {
|
|
273
|
+
this.listenerKeys.push(
|
|
274
|
+
(0,_events_js__WEBPACK_IMPORTED_MODULE_2__.listen)(viewport, _pointer_EventType_js__WEBPACK_IMPORTED_MODULE_3__["default"].POINTEROUT, this.handleMouseOut, this),
|
|
275
|
+
);
|
|
276
|
+
}
|
|
277
|
+
this.updateHTML_(null);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Set the coordinate format type used to render the current position.
|
|
283
|
+
* @param {import("../coordinate.js").CoordinateFormat} format The format to render the current
|
|
284
|
+
* position in.
|
|
285
|
+
* @observable
|
|
286
|
+
* @api
|
|
287
|
+
*/
|
|
288
|
+
setCoordinateFormat(format) {
|
|
289
|
+
this.set(COORDINATE_FORMAT, format);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Set the projection that is used to report the mouse position.
|
|
294
|
+
* @param {import("../proj.js").ProjectionLike} projection The projection to report mouse
|
|
295
|
+
* position in.
|
|
296
|
+
* @observable
|
|
297
|
+
* @api
|
|
298
|
+
*/
|
|
299
|
+
setProjection(projection) {
|
|
300
|
+
this.set(PROJECTION, (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.get)(projection));
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* @param {?import("../pixel.js").Pixel} pixel Pixel.
|
|
305
|
+
* @private
|
|
306
|
+
*/
|
|
307
|
+
updateHTML_(pixel) {
|
|
308
|
+
let html = this.placeholder_;
|
|
309
|
+
if (pixel && this.mapProjection_) {
|
|
310
|
+
if (!this.transform_) {
|
|
311
|
+
const projection = this.getProjection();
|
|
312
|
+
if (projection) {
|
|
313
|
+
this.transform_ = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.getTransformFromProjections)(
|
|
314
|
+
this.mapProjection_,
|
|
315
|
+
projection,
|
|
316
|
+
);
|
|
317
|
+
} else {
|
|
318
|
+
this.transform_ = _proj_js__WEBPACK_IMPORTED_MODULE_0__.identityTransform;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
const map = this.getMap();
|
|
322
|
+
const coordinate = map.getCoordinateFromPixelInternal(pixel);
|
|
323
|
+
if (coordinate) {
|
|
324
|
+
const userProjection = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.getUserProjection)();
|
|
325
|
+
if (userProjection) {
|
|
326
|
+
this.transform_ = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.getTransformFromProjections)(
|
|
327
|
+
this.mapProjection_,
|
|
328
|
+
userProjection,
|
|
329
|
+
);
|
|
330
|
+
}
|
|
331
|
+
this.transform_(coordinate, coordinate);
|
|
332
|
+
if (this.wrapX_) {
|
|
333
|
+
const projection =
|
|
334
|
+
userProjection || this.getProjection() || this.mapProjection_;
|
|
335
|
+
(0,_coordinate_js__WEBPACK_IMPORTED_MODULE_4__.wrapX)(coordinate, projection);
|
|
336
|
+
}
|
|
337
|
+
const coordinateFormat = this.getCoordinateFormat();
|
|
338
|
+
if (coordinateFormat) {
|
|
339
|
+
html = coordinateFormat(coordinate);
|
|
340
|
+
} else {
|
|
341
|
+
html = coordinate.toString();
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
if (!this.renderedHTML_ || html !== this.renderedHTML_) {
|
|
346
|
+
this.element.innerHTML = html;
|
|
347
|
+
this.renderedHTML_ = html;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Update the projection. Rendering of the coordinates is done in
|
|
353
|
+
* `handleMouseMove` and `handleMouseUp`.
|
|
354
|
+
* @param {import("../MapEvent.js").default} mapEvent Map event.
|
|
355
|
+
* @override
|
|
356
|
+
*/
|
|
357
|
+
render(mapEvent) {
|
|
358
|
+
const frameState = mapEvent.frameState;
|
|
359
|
+
if (!frameState) {
|
|
360
|
+
this.mapProjection_ = null;
|
|
361
|
+
} else {
|
|
362
|
+
if (this.mapProjection_ != frameState.viewState.projection) {
|
|
363
|
+
this.mapProjection_ = frameState.viewState.projection;
|
|
364
|
+
this.transform_ = null;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MousePosition);
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
/***/ }),
|
|
374
|
+
|
|
375
|
+
/***/ "./node_modules/ol/control/ZoomToExtent.js":
|
|
376
|
+
/*!*************************************************!*\
|
|
377
|
+
!*** ./node_modules/ol/control/ZoomToExtent.js ***!
|
|
378
|
+
\*************************************************/
|
|
379
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
380
|
+
|
|
381
|
+
__webpack_require__.r(__webpack_exports__);
|
|
382
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
383
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
384
|
+
/* harmony export */ });
|
|
385
|
+
/* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../css.js */ "./node_modules/ol/css.js");
|
|
386
|
+
/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../events/EventType.js */ "./node_modules/ol/events/EventType.js");
|
|
387
|
+
/* harmony import */ var _geom_Polygon_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../geom/Polygon.js */ "./node_modules/ol/geom/Polygon.js");
|
|
388
|
+
/* harmony import */ var _proj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../proj.js */ "./node_modules/ol/proj.js");
|
|
389
|
+
/* harmony import */ var _Control_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Control.js */ "./node_modules/ol/control/Control.js");
|
|
390
|
+
/**
|
|
391
|
+
* @module ol/control/ZoomToExtent
|
|
392
|
+
*/
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* @typedef {Object} Options
|
|
401
|
+
* @property {string} [className='ol-zoom-extent'] Class name.
|
|
402
|
+
* @property {HTMLElement|string} [target] Specify a target if you want the control
|
|
403
|
+
* to be rendered outside of the map's viewport.
|
|
404
|
+
* @property {string|HTMLElement} [label='E'] Text label to use for the button.
|
|
405
|
+
* Instead of text, also an element (e.g. a `span` element) can be used.
|
|
406
|
+
* @property {string} [tipLabel='Fit to extent'] Text label to use for the button tip.
|
|
407
|
+
* @property {import("../extent.js").Extent} [extent] The extent to zoom to. If undefined the validity
|
|
408
|
+
* extent of the view projection is used.
|
|
409
|
+
*/
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* @classdesc
|
|
413
|
+
* A button control which, when pressed, changes the map view to a specific
|
|
414
|
+
* extent. To style this control use the css selector `.ol-zoom-extent`.
|
|
415
|
+
*
|
|
416
|
+
* @api
|
|
417
|
+
*/
|
|
418
|
+
class ZoomToExtent extends _Control_js__WEBPACK_IMPORTED_MODULE_1__["default"] {
|
|
419
|
+
/**
|
|
420
|
+
* @param {Options} [options] Options.
|
|
421
|
+
*/
|
|
422
|
+
constructor(options) {
|
|
423
|
+
options = options ? options : {};
|
|
424
|
+
|
|
425
|
+
super({
|
|
426
|
+
element: document.createElement('div'),
|
|
427
|
+
target: options.target,
|
|
428
|
+
});
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* @type {?import("../extent.js").Extent|null}
|
|
432
|
+
* @protected
|
|
433
|
+
*/
|
|
434
|
+
this.extent = options.extent ? options.extent : null;
|
|
435
|
+
|
|
436
|
+
const className =
|
|
437
|
+
options.className !== undefined ? options.className : 'ol-zoom-extent';
|
|
438
|
+
|
|
439
|
+
const label = options.label !== undefined ? options.label : 'E';
|
|
440
|
+
const tipLabel =
|
|
441
|
+
options.tipLabel !== undefined ? options.tipLabel : 'Fit to extent';
|
|
442
|
+
const button = document.createElement('button');
|
|
443
|
+
button.setAttribute('type', 'button');
|
|
444
|
+
button.title = tipLabel;
|
|
445
|
+
button.appendChild(
|
|
446
|
+
typeof label === 'string' ? document.createTextNode(label) : label,
|
|
447
|
+
);
|
|
448
|
+
|
|
449
|
+
button.addEventListener(
|
|
450
|
+
_events_EventType_js__WEBPACK_IMPORTED_MODULE_2__["default"].CLICK,
|
|
451
|
+
this.handleClick_.bind(this),
|
|
452
|
+
false,
|
|
453
|
+
);
|
|
454
|
+
|
|
455
|
+
const cssClasses =
|
|
456
|
+
className + ' ' + _css_js__WEBPACK_IMPORTED_MODULE_3__.CLASS_UNSELECTABLE + ' ' + _css_js__WEBPACK_IMPORTED_MODULE_3__.CLASS_CONTROL;
|
|
457
|
+
const element = this.element;
|
|
458
|
+
element.className = cssClasses;
|
|
459
|
+
element.appendChild(button);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* @param {MouseEvent} event The event to handle
|
|
464
|
+
* @private
|
|
465
|
+
*/
|
|
466
|
+
handleClick_(event) {
|
|
467
|
+
event.preventDefault();
|
|
468
|
+
this.handleZoomToExtent();
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* @protected
|
|
473
|
+
*/
|
|
474
|
+
handleZoomToExtent() {
|
|
475
|
+
const map = this.getMap();
|
|
476
|
+
const view = map.getView();
|
|
477
|
+
const extent = !this.extent
|
|
478
|
+
? view.getProjection().getExtent()
|
|
479
|
+
: (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserExtent)(this.extent, view.getProjection());
|
|
480
|
+
view.fitInternal((0,_geom_Polygon_js__WEBPACK_IMPORTED_MODULE_4__.fromExtent)(extent));
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ZoomToExtent);
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
/***/ })
|
|
488
|
+
|
|
489
|
+
}])
|
|
490
|
+
//# sourceMappingURL=vendors-node_modules_ol_control_js.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vendors-node_modules_ol_control_js.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACgE;AACR;AACM;AACM;AACJ;AACV;AACM;AACV;AACY;AACI;AACnB;;;;;;;;;;;;;;;;;;;;ACb/C;AACA;AACA;;AAEuC;AACH;AACY;AAM5B;AACe;;AAEnC;AACA,UAAU;AACV;AACA;;AAEA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,+DAA+D;AAC/D;;AAEA;AACA,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB,cAAc,6CAA6C;AAC3D,cAAc,qCAAqC;AACnD,cAAc,iDAAiD;AAC/D;AACA;AACA,cAAc,oBAAoB;AAClC;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,mDAAO;AACnC;AACA,aAAa,SAAS;AACtB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,8EAA8E;;AAE9E;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,uDAAuD;AACrE;AACA;AACA;AACA;AACA;AACA,sBAAsB,uDAAuD;AAC7E;AACA;AACA;;AAEA;AACA;AACA,cAAc,mDAAmD;AACjE;AACA;AACA;AACA;AACA;AACA,sBAAsB,mDAAmD;AACzE;AACA;AACA;;AAEA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,kCAAkC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,kDAAM,WAAW,yEAAqB;AAC9C;AACA;AACA;AACA,UAAU,kDAAM,WAAW,wEAAoB;AAC/C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,6CAA6C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,qCAAqC;AAClD;AACA;AACA;AACA;AACA;AACA,yBAAyB,6CAAa;AACtC;;AAEA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qEAA2B;AACvD;AACA;AACA;AACA,UAAU;AACV,4BAA4B,uDAAiB;AAC7C;AACA;AACA;AACA;AACA;AACA,+BAA+B,2DAAiB;AAChD;AACA,4BAA4B,qEAA2B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,qDAAK;AACf;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,kCAAkC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,aAAa,EAAC;;;;;;;;;;;;;;;;;;;;ACpT7B;AACA;AACA;AAC4D;AACb;AACoB;AACzB;AACP;;AAEnC;AACA,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB,cAAc,oBAAoB;AAClC;AACA,cAAc,oBAAoB;AAClC;AACA,cAAc,QAAQ;AACtB,cAAc,+BAA+B;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,mDAAO;AAClC;AACA,aAAa,SAAS;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM,kEAAe;AACrB;AACA;AACA;;AAEA;AACA,wBAAwB,uDAAkB,SAAS,kDAAa;AAChE;AACA;AACA;AACA;;AAEA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,wDAAc;AACtB,qBAAqB,4DAAiB;AACtC;AACA;;AAEA,iEAAe,YAAY,EAAC","sources":["webpack://@vaadin/bundles/./node_modules/ol/control.js","webpack://@vaadin/bundles/./node_modules/ol/control/MousePosition.js","webpack://@vaadin/bundles/./node_modules/ol/control/ZoomToExtent.js"],"sourcesContent":["/**\n * @module ol/control\n */\nexport {default as Attribution} from './control/Attribution.js';\nexport {default as Control} from './control/Control.js';\nexport {default as FullScreen} from './control/FullScreen.js';\nexport {default as MousePosition} from './control/MousePosition.js';\nexport {default as OverviewMap} from './control/OverviewMap.js';\nexport {default as Rotate} from './control/Rotate.js';\nexport {default as ScaleLine} from './control/ScaleLine.js';\nexport {default as Zoom} from './control/Zoom.js';\nexport {default as ZoomSlider} from './control/ZoomSlider.js';\nexport {default as ZoomToExtent} from './control/ZoomToExtent.js';\nexport {defaults} from './control/defaults.js';\n","/**\n * @module ol/control/MousePosition\n */\n\nimport {wrapX} from '../coordinate.js';\nimport {listen} from '../events.js';\nimport EventType from '../pointer/EventType.js';\nimport {\n get as getProjection,\n getTransformFromProjections,\n getUserProjection,\n identityTransform,\n} from '../proj.js';\nimport Control from './Control.js';\n\n/**\n * @type {string}\n */\nconst PROJECTION = 'projection';\n\n/**\n * @type {string}\n */\nconst COORDINATE_FORMAT = 'coordinateFormat';\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature<import(\"../Observable\").EventTypes, import(\"../events/Event.js\").default, Return> &\n * import(\"../Observable\").OnSignature<import(\"../ObjectEventType\").Types|\n * 'change:coordinateFormat'|'change:projection', import(\"../Object\").ObjectEvent, Return> &\n * import(\"../Observable\").CombinedOnSignature<import(\"../Observable\").EventTypes|import(\"../ObjectEventType\").Types|\n * 'change:coordinateFormat'|'change:projection', Return>} MousePositionOnSignature\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-mouse-position'] CSS class name.\n * @property {import(\"../coordinate.js\").CoordinateFormat} [coordinateFormat] Coordinate format.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the\n * control should be re-rendered. This is called in a `requestAnimationFrame`\n * callback.\n * @property {HTMLElement|string} [target] Specify a target if you want the\n * control to be rendered outside of the map's viewport.\n * @property {string} [placeholder] Markup to show when the mouse position is not\n * available (e.g. when the pointer leaves the map viewport). By default, a non-breaking space is rendered\n * initially and the last position is retained when the mouse leaves the viewport.\n * When a string is provided (e.g. `'no position'` or `''` for an empty string) it is used as a\n * placeholder.\n * @property {boolean} [wrapX=true] Wrap the world horizontally on the projection's antimeridian, if it\n * is a global projection.\n */\n\n/**\n * @classdesc\n * A control to show the 2D coordinates of the mouse cursor. By default, these\n * are in the view projection, but can be in any supported projection.\n * By default the control is shown in the top right corner of the map, but this\n * can be changed by using the css selector `.ol-mouse-position`.\n *\n * On touch devices, which usually do not have a mouse cursor, the coordinates\n * of the currently touched position are shown.\n *\n * @api\n */\nclass MousePosition extends Control {\n /**\n * @param {Options} [options] Mouse position options.\n */\n constructor(options) {\n options = options ? options : {};\n\n const element = document.createElement('div');\n element.className =\n options.className !== undefined ? options.className : 'ol-mouse-position';\n\n super({\n element: element,\n render: options.render,\n target: options.target,\n });\n\n /***\n * @type {MousePositionOnSignature<import(\"../events\").EventsKey>}\n */\n this.on;\n\n /***\n * @type {MousePositionOnSignature<import(\"../events\").EventsKey>}\n */\n this.once;\n\n /***\n * @type {MousePositionOnSignature<void>}\n */\n this.un;\n\n this.addChangeListener(PROJECTION, this.handleProjectionChanged_);\n\n if (options.coordinateFormat) {\n this.setCoordinateFormat(options.coordinateFormat);\n }\n if (options.projection) {\n this.setProjection(options.projection);\n }\n\n /**\n * @private\n * @type {boolean}\n */\n this.renderOnMouseOut_ = options.placeholder !== undefined;\n\n /**\n * @private\n * @type {string}\n */\n this.placeholder_ = this.renderOnMouseOut_ ? options.placeholder : ' ';\n\n /**\n * @private\n * @type {string}\n */\n this.renderedHTML_ = element.innerHTML;\n\n /**\n * @private\n * @type {?import(\"../proj/Projection.js\").default}\n */\n this.mapProjection_ = null;\n\n /**\n * @private\n * @type {?import(\"../proj.js\").TransformFunction}\n */\n this.transform_ = null;\n\n /**\n * @private\n * @type {boolean}\n */\n this.wrapX_ = options.wrapX === false ? false : true;\n }\n\n /**\n * @private\n */\n handleProjectionChanged_() {\n this.transform_ = null;\n }\n\n /**\n * Return the coordinate format type used to render the current position or\n * undefined.\n * @return {import(\"../coordinate.js\").CoordinateFormat|undefined} The format to render the current\n * position in.\n * @observable\n * @api\n */\n getCoordinateFormat() {\n return /** @type {import(\"../coordinate.js\").CoordinateFormat|undefined} */ (\n this.get(COORDINATE_FORMAT)\n );\n }\n\n /**\n * Return the projection that is used to report the mouse position.\n * @return {import(\"../proj/Projection.js\").default|undefined} The projection to report mouse\n * position in.\n * @observable\n * @api\n */\n getProjection() {\n return /** @type {import(\"../proj/Projection.js\").default|undefined} */ (\n this.get(PROJECTION)\n );\n }\n\n /**\n * @param {MouseEvent} event Browser event.\n * @protected\n */\n handleMouseMove(event) {\n const map = this.getMap();\n this.updateHTML_(map.getEventPixel(event));\n }\n\n /**\n * @param {Event} event Browser event.\n * @protected\n */\n handleMouseOut(event) {\n this.updateHTML_(null);\n }\n\n /**\n * Remove the control from its current map and attach it to the new map.\n * Pass `null` to just remove the control from the current map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../Map.js\").default|null} map Map.\n * @api\n * @override\n */\n setMap(map) {\n super.setMap(map);\n if (map) {\n const viewport = map.getViewport();\n this.listenerKeys.push(\n listen(viewport, EventType.POINTERMOVE, this.handleMouseMove, this),\n );\n if (this.renderOnMouseOut_) {\n this.listenerKeys.push(\n listen(viewport, EventType.POINTEROUT, this.handleMouseOut, this),\n );\n }\n this.updateHTML_(null);\n }\n }\n\n /**\n * Set the coordinate format type used to render the current position.\n * @param {import(\"../coordinate.js\").CoordinateFormat} format The format to render the current\n * position in.\n * @observable\n * @api\n */\n setCoordinateFormat(format) {\n this.set(COORDINATE_FORMAT, format);\n }\n\n /**\n * Set the projection that is used to report the mouse position.\n * @param {import(\"../proj.js\").ProjectionLike} projection The projection to report mouse\n * position in.\n * @observable\n * @api\n */\n setProjection(projection) {\n this.set(PROJECTION, getProjection(projection));\n }\n\n /**\n * @param {?import(\"../pixel.js\").Pixel} pixel Pixel.\n * @private\n */\n updateHTML_(pixel) {\n let html = this.placeholder_;\n if (pixel && this.mapProjection_) {\n if (!this.transform_) {\n const projection = this.getProjection();\n if (projection) {\n this.transform_ = getTransformFromProjections(\n this.mapProjection_,\n projection,\n );\n } else {\n this.transform_ = identityTransform;\n }\n }\n const map = this.getMap();\n const coordinate = map.getCoordinateFromPixelInternal(pixel);\n if (coordinate) {\n const userProjection = getUserProjection();\n if (userProjection) {\n this.transform_ = getTransformFromProjections(\n this.mapProjection_,\n userProjection,\n );\n }\n this.transform_(coordinate, coordinate);\n if (this.wrapX_) {\n const projection =\n userProjection || this.getProjection() || this.mapProjection_;\n wrapX(coordinate, projection);\n }\n const coordinateFormat = this.getCoordinateFormat();\n if (coordinateFormat) {\n html = coordinateFormat(coordinate);\n } else {\n html = coordinate.toString();\n }\n }\n }\n if (!this.renderedHTML_ || html !== this.renderedHTML_) {\n this.element.innerHTML = html;\n this.renderedHTML_ = html;\n }\n }\n\n /**\n * Update the projection. Rendering of the coordinates is done in\n * `handleMouseMove` and `handleMouseUp`.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n render(mapEvent) {\n const frameState = mapEvent.frameState;\n if (!frameState) {\n this.mapProjection_ = null;\n } else {\n if (this.mapProjection_ != frameState.viewState.projection) {\n this.mapProjection_ = frameState.viewState.projection;\n this.transform_ = null;\n }\n }\n }\n}\n\nexport default MousePosition;\n","/**\n * @module ol/control/ZoomToExtent\n */\nimport {CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js';\nimport EventType from '../events/EventType.js';\nimport {fromExtent as polygonFromExtent} from '../geom/Polygon.js';\nimport {fromUserExtent} from '../proj.js';\nimport Control from './Control.js';\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-zoom-extent'] Class name.\n * @property {HTMLElement|string} [target] Specify a target if you want the control\n * to be rendered outside of the map's viewport.\n * @property {string|HTMLElement} [label='E'] Text label to use for the button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [tipLabel='Fit to extent'] Text label to use for the button tip.\n * @property {import(\"../extent.js\").Extent} [extent] The extent to zoom to. If undefined the validity\n * extent of the view projection is used.\n */\n\n/**\n * @classdesc\n * A button control which, when pressed, changes the map view to a specific\n * extent. To style this control use the css selector `.ol-zoom-extent`.\n *\n * @api\n */\nclass ZoomToExtent extends Control {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super({\n element: document.createElement('div'),\n target: options.target,\n });\n\n /**\n * @type {?import(\"../extent.js\").Extent|null}\n * @protected\n */\n this.extent = options.extent ? options.extent : null;\n\n const className =\n options.className !== undefined ? options.className : 'ol-zoom-extent';\n\n const label = options.label !== undefined ? options.label : 'E';\n const tipLabel =\n options.tipLabel !== undefined ? options.tipLabel : 'Fit to extent';\n const button = document.createElement('button');\n button.setAttribute('type', 'button');\n button.title = tipLabel;\n button.appendChild(\n typeof label === 'string' ? document.createTextNode(label) : label,\n );\n\n button.addEventListener(\n EventType.CLICK,\n this.handleClick_.bind(this),\n false,\n );\n\n const cssClasses =\n className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n const element = this.element;\n element.className = cssClasses;\n element.appendChild(button);\n }\n\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n handleClick_(event) {\n event.preventDefault();\n this.handleZoomToExtent();\n }\n\n /**\n * @protected\n */\n handleZoomToExtent() {\n const map = this.getMap();\n const view = map.getView();\n const extent = !this.extent\n ? view.getProjection().getExtent()\n : fromUserExtent(this.extent, view.getProjection());\n view.fitInternal(polygonFromExtent(extent));\n }\n}\n\nexport default ZoomToExtent;\n"],"names":[],"sourceRoot":""}
|