@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,769 @@
|
|
|
1
|
+
(self["webpackChunk_vaadin_bundles"] = self["webpackChunk_vaadin_bundles"] || []).push([["vendors-node_modules_ol_geom_js-node_modules_ol_geom_flat_length_js"],{
|
|
2
|
+
|
|
3
|
+
/***/ "./node_modules/ol/geom.js":
|
|
4
|
+
/*!*********************************!*\
|
|
5
|
+
!*** ./node_modules/ol/geom.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 */ "Circle": () => (/* reexport safe */ _geom_Circle_js__WEBPACK_IMPORTED_MODULE_0__["default"]),
|
|
12
|
+
/* harmony export */ "Geometry": () => (/* reexport safe */ _geom_Geometry_js__WEBPACK_IMPORTED_MODULE_1__["default"]),
|
|
13
|
+
/* harmony export */ "GeometryCollection": () => (/* reexport safe */ _geom_GeometryCollection_js__WEBPACK_IMPORTED_MODULE_2__["default"]),
|
|
14
|
+
/* harmony export */ "LineString": () => (/* reexport safe */ _geom_LineString_js__WEBPACK_IMPORTED_MODULE_4__["default"]),
|
|
15
|
+
/* harmony export */ "LinearRing": () => (/* reexport safe */ _geom_LinearRing_js__WEBPACK_IMPORTED_MODULE_3__["default"]),
|
|
16
|
+
/* harmony export */ "MultiLineString": () => (/* reexport safe */ _geom_MultiLineString_js__WEBPACK_IMPORTED_MODULE_5__["default"]),
|
|
17
|
+
/* harmony export */ "MultiPoint": () => (/* reexport safe */ _geom_MultiPoint_js__WEBPACK_IMPORTED_MODULE_6__["default"]),
|
|
18
|
+
/* harmony export */ "MultiPolygon": () => (/* reexport safe */ _geom_MultiPolygon_js__WEBPACK_IMPORTED_MODULE_7__["default"]),
|
|
19
|
+
/* harmony export */ "Point": () => (/* reexport safe */ _geom_Point_js__WEBPACK_IMPORTED_MODULE_8__["default"]),
|
|
20
|
+
/* harmony export */ "Polygon": () => (/* reexport safe */ _geom_Polygon_js__WEBPACK_IMPORTED_MODULE_9__["default"]),
|
|
21
|
+
/* harmony export */ "SimpleGeometry": () => (/* reexport safe */ _geom_SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_10__["default"])
|
|
22
|
+
/* harmony export */ });
|
|
23
|
+
/* harmony import */ var _geom_Circle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./geom/Circle.js */ "./node_modules/ol/geom/Circle.js");
|
|
24
|
+
/* harmony import */ var _geom_Geometry_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./geom/Geometry.js */ "./node_modules/ol/geom/Geometry.js");
|
|
25
|
+
/* harmony import */ var _geom_GeometryCollection_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./geom/GeometryCollection.js */ "./node_modules/ol/geom/GeometryCollection.js");
|
|
26
|
+
/* harmony import */ var _geom_LinearRing_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./geom/LinearRing.js */ "./node_modules/ol/geom/LinearRing.js");
|
|
27
|
+
/* harmony import */ var _geom_LineString_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./geom/LineString.js */ "./node_modules/ol/geom/LineString.js");
|
|
28
|
+
/* harmony import */ var _geom_MultiLineString_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./geom/MultiLineString.js */ "./node_modules/ol/geom/MultiLineString.js");
|
|
29
|
+
/* harmony import */ var _geom_MultiPoint_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./geom/MultiPoint.js */ "./node_modules/ol/geom/MultiPoint.js");
|
|
30
|
+
/* harmony import */ var _geom_MultiPolygon_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./geom/MultiPolygon.js */ "./node_modules/ol/geom/MultiPolygon.js");
|
|
31
|
+
/* harmony import */ var _geom_Point_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./geom/Point.js */ "./node_modules/ol/geom/Point.js");
|
|
32
|
+
/* harmony import */ var _geom_Polygon_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./geom/Polygon.js */ "./node_modules/ol/geom/Polygon.js");
|
|
33
|
+
/* harmony import */ var _geom_SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./geom/SimpleGeometry.js */ "./node_modules/ol/geom/SimpleGeometry.js");
|
|
34
|
+
/**
|
|
35
|
+
* @module ol/geom
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
/***/ }),
|
|
52
|
+
|
|
53
|
+
/***/ "./node_modules/ol/geom/Circle.js":
|
|
54
|
+
/*!****************************************!*\
|
|
55
|
+
!*** ./node_modules/ol/geom/Circle.js ***!
|
|
56
|
+
\****************************************/
|
|
57
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
58
|
+
|
|
59
|
+
__webpack_require__.r(__webpack_exports__);
|
|
60
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
61
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
62
|
+
/* harmony export */ });
|
|
63
|
+
/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../extent.js */ "./node_modules/ol/extent.js");
|
|
64
|
+
/* harmony import */ var _SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SimpleGeometry.js */ "./node_modules/ol/geom/SimpleGeometry.js");
|
|
65
|
+
/* harmony import */ var _flat_deflate_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./flat/deflate.js */ "./node_modules/ol/geom/flat/deflate.js");
|
|
66
|
+
/* harmony import */ var _flat_transform_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./flat/transform.js */ "./node_modules/ol/geom/flat/transform.js");
|
|
67
|
+
/**
|
|
68
|
+
* @module ol/geom/Circle
|
|
69
|
+
*/
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @classdesc
|
|
77
|
+
* Circle geometry.
|
|
78
|
+
*
|
|
79
|
+
* @api
|
|
80
|
+
*/
|
|
81
|
+
class Circle extends _SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
82
|
+
/**
|
|
83
|
+
* @param {!import("../coordinate.js").Coordinate} center Center.
|
|
84
|
+
* For internal use, flat coordinates in combination with `layout` and no
|
|
85
|
+
* `radius` are also accepted.
|
|
86
|
+
* @param {number} [radius] Radius in units of the projection.
|
|
87
|
+
* @param {import("./Geometry.js").GeometryLayout} [layout] Layout.
|
|
88
|
+
*/
|
|
89
|
+
constructor(center, radius, layout) {
|
|
90
|
+
super();
|
|
91
|
+
if (layout !== undefined && radius === undefined) {
|
|
92
|
+
this.setFlatCoordinates(layout, center);
|
|
93
|
+
} else {
|
|
94
|
+
radius = radius ? radius : 0;
|
|
95
|
+
this.setCenterAndRadius(center, radius, layout);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Make a complete copy of the geometry.
|
|
101
|
+
* @return {!Circle} Clone.
|
|
102
|
+
* @api
|
|
103
|
+
* @override
|
|
104
|
+
*/
|
|
105
|
+
clone() {
|
|
106
|
+
const circle = new Circle(
|
|
107
|
+
this.flatCoordinates.slice(),
|
|
108
|
+
undefined,
|
|
109
|
+
this.layout,
|
|
110
|
+
);
|
|
111
|
+
circle.applyProperties(this);
|
|
112
|
+
return circle;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* @param {number} x X.
|
|
117
|
+
* @param {number} y Y.
|
|
118
|
+
* @param {import("../coordinate.js").Coordinate} closestPoint Closest point.
|
|
119
|
+
* @param {number} minSquaredDistance Minimum squared distance.
|
|
120
|
+
* @return {number} Minimum squared distance.
|
|
121
|
+
* @override
|
|
122
|
+
*/
|
|
123
|
+
closestPointXY(x, y, closestPoint, minSquaredDistance) {
|
|
124
|
+
const flatCoordinates = this.flatCoordinates;
|
|
125
|
+
const dx = x - flatCoordinates[0];
|
|
126
|
+
const dy = y - flatCoordinates[1];
|
|
127
|
+
const squaredDistance = dx * dx + dy * dy;
|
|
128
|
+
if (squaredDistance < minSquaredDistance) {
|
|
129
|
+
if (squaredDistance === 0) {
|
|
130
|
+
for (let i = 0; i < this.stride; ++i) {
|
|
131
|
+
closestPoint[i] = flatCoordinates[i];
|
|
132
|
+
}
|
|
133
|
+
} else {
|
|
134
|
+
const delta = this.getRadius() / Math.sqrt(squaredDistance);
|
|
135
|
+
closestPoint[0] = flatCoordinates[0] + delta * dx;
|
|
136
|
+
closestPoint[1] = flatCoordinates[1] + delta * dy;
|
|
137
|
+
for (let i = 2; i < this.stride; ++i) {
|
|
138
|
+
closestPoint[i] = flatCoordinates[i];
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
closestPoint.length = this.stride;
|
|
142
|
+
return squaredDistance;
|
|
143
|
+
}
|
|
144
|
+
return minSquaredDistance;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* @param {number} x X.
|
|
149
|
+
* @param {number} y Y.
|
|
150
|
+
* @return {boolean} Contains (x, y).
|
|
151
|
+
* @override
|
|
152
|
+
*/
|
|
153
|
+
containsXY(x, y) {
|
|
154
|
+
const flatCoordinates = this.flatCoordinates;
|
|
155
|
+
const dx = x - flatCoordinates[0];
|
|
156
|
+
const dy = y - flatCoordinates[1];
|
|
157
|
+
return dx * dx + dy * dy <= this.getRadiusSquared_();
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Return the center of the circle as {@link module:ol/coordinate~Coordinate coordinate}.
|
|
162
|
+
* @return {import("../coordinate.js").Coordinate} Center.
|
|
163
|
+
* @api
|
|
164
|
+
*/
|
|
165
|
+
getCenter() {
|
|
166
|
+
return this.flatCoordinates.slice(0, this.stride);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* @param {import("../extent.js").Extent} extent Extent.
|
|
171
|
+
* @protected
|
|
172
|
+
* @return {import("../extent.js").Extent} extent Extent.
|
|
173
|
+
* @override
|
|
174
|
+
*/
|
|
175
|
+
computeExtent(extent) {
|
|
176
|
+
const flatCoordinates = this.flatCoordinates;
|
|
177
|
+
const radius = flatCoordinates[this.stride] - flatCoordinates[0];
|
|
178
|
+
return (0,_extent_js__WEBPACK_IMPORTED_MODULE_1__.createOrUpdate)(
|
|
179
|
+
flatCoordinates[0] - radius,
|
|
180
|
+
flatCoordinates[1] - radius,
|
|
181
|
+
flatCoordinates[0] + radius,
|
|
182
|
+
flatCoordinates[1] + radius,
|
|
183
|
+
extent,
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Return the radius of the circle.
|
|
189
|
+
* @return {number} Radius.
|
|
190
|
+
* @api
|
|
191
|
+
*/
|
|
192
|
+
getRadius() {
|
|
193
|
+
return Math.sqrt(this.getRadiusSquared_());
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* @private
|
|
198
|
+
* @return {number} Radius squared.
|
|
199
|
+
*/
|
|
200
|
+
getRadiusSquared_() {
|
|
201
|
+
const dx = this.flatCoordinates[this.stride] - this.flatCoordinates[0];
|
|
202
|
+
const dy = this.flatCoordinates[this.stride + 1] - this.flatCoordinates[1];
|
|
203
|
+
return dx * dx + dy * dy;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Get the type of this geometry.
|
|
208
|
+
* @return {import("./Geometry.js").Type} Geometry type.
|
|
209
|
+
* @api
|
|
210
|
+
* @override
|
|
211
|
+
*/
|
|
212
|
+
getType() {
|
|
213
|
+
return 'Circle';
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Test if the geometry and the passed extent intersect.
|
|
218
|
+
* @param {import("../extent.js").Extent} extent Extent.
|
|
219
|
+
* @return {boolean} `true` if the geometry and the extent intersect.
|
|
220
|
+
* @api
|
|
221
|
+
* @override
|
|
222
|
+
*/
|
|
223
|
+
intersectsExtent(extent) {
|
|
224
|
+
const circleExtent = this.getExtent();
|
|
225
|
+
if ((0,_extent_js__WEBPACK_IMPORTED_MODULE_1__.intersects)(extent, circleExtent)) {
|
|
226
|
+
const center = this.getCenter();
|
|
227
|
+
|
|
228
|
+
if (extent[0] <= center[0] && extent[2] >= center[0]) {
|
|
229
|
+
return true;
|
|
230
|
+
}
|
|
231
|
+
if (extent[1] <= center[1] && extent[3] >= center[1]) {
|
|
232
|
+
return true;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
return (0,_extent_js__WEBPACK_IMPORTED_MODULE_1__.forEachCorner)(extent, this.intersectsCoordinate.bind(this));
|
|
236
|
+
}
|
|
237
|
+
return false;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Set the center of the circle as {@link module:ol/coordinate~Coordinate coordinate}.
|
|
242
|
+
* @param {import("../coordinate.js").Coordinate} center Center.
|
|
243
|
+
* @api
|
|
244
|
+
*/
|
|
245
|
+
setCenter(center) {
|
|
246
|
+
const stride = this.stride;
|
|
247
|
+
const radius = this.flatCoordinates[stride] - this.flatCoordinates[0];
|
|
248
|
+
const flatCoordinates = center.slice();
|
|
249
|
+
flatCoordinates[stride] = flatCoordinates[0] + radius;
|
|
250
|
+
for (let i = 1; i < stride; ++i) {
|
|
251
|
+
flatCoordinates[stride + i] = center[i];
|
|
252
|
+
}
|
|
253
|
+
this.setFlatCoordinates(this.layout, flatCoordinates);
|
|
254
|
+
this.changed();
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Set the center (as {@link module:ol/coordinate~Coordinate coordinate}) and the radius (as
|
|
259
|
+
* number) of the circle.
|
|
260
|
+
* @param {!import("../coordinate.js").Coordinate} center Center.
|
|
261
|
+
* @param {number} radius Radius.
|
|
262
|
+
* @param {import("./Geometry.js").GeometryLayout} [layout] Layout.
|
|
263
|
+
* @api
|
|
264
|
+
*/
|
|
265
|
+
setCenterAndRadius(center, radius, layout) {
|
|
266
|
+
this.setLayout(layout, center, 0);
|
|
267
|
+
if (!this.flatCoordinates) {
|
|
268
|
+
this.flatCoordinates = [];
|
|
269
|
+
}
|
|
270
|
+
/** @type {Array<number>} */
|
|
271
|
+
const flatCoordinates = this.flatCoordinates;
|
|
272
|
+
let offset = (0,_flat_deflate_js__WEBPACK_IMPORTED_MODULE_2__.deflateCoordinate)(flatCoordinates, 0, center, this.stride);
|
|
273
|
+
flatCoordinates[offset++] = flatCoordinates[0] + radius;
|
|
274
|
+
for (let i = 1, ii = this.stride; i < ii; ++i) {
|
|
275
|
+
flatCoordinates[offset++] = flatCoordinates[i];
|
|
276
|
+
}
|
|
277
|
+
flatCoordinates.length = offset;
|
|
278
|
+
this.changed();
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* @override
|
|
283
|
+
*/
|
|
284
|
+
getCoordinates() {
|
|
285
|
+
return null;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* @override
|
|
290
|
+
*/
|
|
291
|
+
setCoordinates(coordinates, layout) {}
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Set the radius of the circle. The radius is in the units of the projection.
|
|
295
|
+
* @param {number} radius Radius.
|
|
296
|
+
* @api
|
|
297
|
+
*/
|
|
298
|
+
setRadius(radius) {
|
|
299
|
+
this.flatCoordinates[this.stride] = this.flatCoordinates[0] + radius;
|
|
300
|
+
this.changed();
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Rotate the geometry around a given coordinate. This modifies the geometry
|
|
305
|
+
* coordinates in place.
|
|
306
|
+
* @param {number} angle Rotation angle in counter-clockwise radians.
|
|
307
|
+
* @param {import("../coordinate.js").Coordinate} anchor The rotation center.
|
|
308
|
+
* @api
|
|
309
|
+
* @override
|
|
310
|
+
*/
|
|
311
|
+
rotate(angle, anchor) {
|
|
312
|
+
const center = this.getCenter();
|
|
313
|
+
const stride = this.getStride();
|
|
314
|
+
this.setCenter(
|
|
315
|
+
(0,_flat_transform_js__WEBPACK_IMPORTED_MODULE_3__.rotate)(center, 0, center.length, stride, angle, anchor, center),
|
|
316
|
+
);
|
|
317
|
+
this.changed();
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Transform each coordinate of the circle from one coordinate reference system
|
|
323
|
+
* to another. The geometry is modified in place.
|
|
324
|
+
* If you do not want the geometry modified in place, first clone() it and
|
|
325
|
+
* then use this function on the clone.
|
|
326
|
+
*
|
|
327
|
+
* Internally a circle is currently represented by two points: the center of
|
|
328
|
+
* the circle `[cx, cy]`, and the point to the right of the circle
|
|
329
|
+
* `[cx + r, cy]`. This `transform` function just transforms these two points.
|
|
330
|
+
* So the resulting geometry is also a circle, and that circle does not
|
|
331
|
+
* correspond to the shape that would be obtained by transforming every point
|
|
332
|
+
* of the original circle.
|
|
333
|
+
*
|
|
334
|
+
* @param {import("../proj.js").ProjectionLike} source The current projection. Can be a
|
|
335
|
+
* string identifier or a {@link module:ol/proj/Projection~Projection} object.
|
|
336
|
+
* @param {import("../proj.js").ProjectionLike} destination The desired projection. Can be a
|
|
337
|
+
* string identifier or a {@link module:ol/proj/Projection~Projection} object.
|
|
338
|
+
* @return {Circle} This geometry. Note that original geometry is
|
|
339
|
+
* modified in place.
|
|
340
|
+
* @function
|
|
341
|
+
* @api
|
|
342
|
+
*/
|
|
343
|
+
Circle.prototype.transform;
|
|
344
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Circle);
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
/***/ }),
|
|
348
|
+
|
|
349
|
+
/***/ "./node_modules/ol/geom/GeometryCollection.js":
|
|
350
|
+
/*!****************************************************!*\
|
|
351
|
+
!*** ./node_modules/ol/geom/GeometryCollection.js ***!
|
|
352
|
+
\****************************************************/
|
|
353
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
354
|
+
|
|
355
|
+
__webpack_require__.r(__webpack_exports__);
|
|
356
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
357
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
358
|
+
/* harmony export */ });
|
|
359
|
+
/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../events/EventType.js */ "./node_modules/ol/events/EventType.js");
|
|
360
|
+
/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../events.js */ "./node_modules/ol/events.js");
|
|
361
|
+
/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../extent.js */ "./node_modules/ol/extent.js");
|
|
362
|
+
/* harmony import */ var _Geometry_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Geometry.js */ "./node_modules/ol/geom/Geometry.js");
|
|
363
|
+
/**
|
|
364
|
+
* @module ol/geom/GeometryCollection
|
|
365
|
+
*/
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* @classdesc
|
|
373
|
+
* An array of {@link module:ol/geom/Geometry~Geometry} objects.
|
|
374
|
+
*
|
|
375
|
+
* @api
|
|
376
|
+
*/
|
|
377
|
+
class GeometryCollection extends _Geometry_js__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
378
|
+
/**
|
|
379
|
+
* @param {Array<Geometry>} geometries Geometries.
|
|
380
|
+
*/
|
|
381
|
+
constructor(geometries) {
|
|
382
|
+
super();
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* @private
|
|
386
|
+
* @type {Array<Geometry>}
|
|
387
|
+
*/
|
|
388
|
+
this.geometries_ = geometries;
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* @private
|
|
392
|
+
* @type {Array<import("../events.js").EventsKey>}
|
|
393
|
+
*/
|
|
394
|
+
this.changeEventsKeys_ = [];
|
|
395
|
+
|
|
396
|
+
this.listenGeometriesChange_();
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* @private
|
|
401
|
+
*/
|
|
402
|
+
unlistenGeometriesChange_() {
|
|
403
|
+
this.changeEventsKeys_.forEach(_events_js__WEBPACK_IMPORTED_MODULE_1__.unlistenByKey);
|
|
404
|
+
this.changeEventsKeys_.length = 0;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* @private
|
|
409
|
+
*/
|
|
410
|
+
listenGeometriesChange_() {
|
|
411
|
+
const geometries = this.geometries_;
|
|
412
|
+
for (let i = 0, ii = geometries.length; i < ii; ++i) {
|
|
413
|
+
this.changeEventsKeys_.push(
|
|
414
|
+
(0,_events_js__WEBPACK_IMPORTED_MODULE_1__.listen)(geometries[i], _events_EventType_js__WEBPACK_IMPORTED_MODULE_2__["default"].CHANGE, this.changed, this),
|
|
415
|
+
);
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* Make a complete copy of the geometry.
|
|
421
|
+
* @return {!GeometryCollection} Clone.
|
|
422
|
+
* @api
|
|
423
|
+
* @override
|
|
424
|
+
*/
|
|
425
|
+
clone() {
|
|
426
|
+
const geometryCollection = new GeometryCollection(
|
|
427
|
+
cloneGeometries(this.geometries_),
|
|
428
|
+
);
|
|
429
|
+
geometryCollection.applyProperties(this);
|
|
430
|
+
return geometryCollection;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* @param {number} x X.
|
|
435
|
+
* @param {number} y Y.
|
|
436
|
+
* @param {import("../coordinate.js").Coordinate} closestPoint Closest point.
|
|
437
|
+
* @param {number} minSquaredDistance Minimum squared distance.
|
|
438
|
+
* @return {number} Minimum squared distance.
|
|
439
|
+
* @override
|
|
440
|
+
*/
|
|
441
|
+
closestPointXY(x, y, closestPoint, minSquaredDistance) {
|
|
442
|
+
if (minSquaredDistance < (0,_extent_js__WEBPACK_IMPORTED_MODULE_3__.closestSquaredDistanceXY)(this.getExtent(), x, y)) {
|
|
443
|
+
return minSquaredDistance;
|
|
444
|
+
}
|
|
445
|
+
const geometries = this.geometries_;
|
|
446
|
+
for (let i = 0, ii = geometries.length; i < ii; ++i) {
|
|
447
|
+
minSquaredDistance = geometries[i].closestPointXY(
|
|
448
|
+
x,
|
|
449
|
+
y,
|
|
450
|
+
closestPoint,
|
|
451
|
+
minSquaredDistance,
|
|
452
|
+
);
|
|
453
|
+
}
|
|
454
|
+
return minSquaredDistance;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* @param {number} x X.
|
|
459
|
+
* @param {number} y Y.
|
|
460
|
+
* @return {boolean} Contains (x, y).
|
|
461
|
+
* @override
|
|
462
|
+
*/
|
|
463
|
+
containsXY(x, y) {
|
|
464
|
+
const geometries = this.geometries_;
|
|
465
|
+
for (let i = 0, ii = geometries.length; i < ii; ++i) {
|
|
466
|
+
if (geometries[i].containsXY(x, y)) {
|
|
467
|
+
return true;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
return false;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* @param {import("../extent.js").Extent} extent Extent.
|
|
475
|
+
* @protected
|
|
476
|
+
* @return {import("../extent.js").Extent} extent Extent.
|
|
477
|
+
* @override
|
|
478
|
+
*/
|
|
479
|
+
computeExtent(extent) {
|
|
480
|
+
(0,_extent_js__WEBPACK_IMPORTED_MODULE_3__.createOrUpdateEmpty)(extent);
|
|
481
|
+
const geometries = this.geometries_;
|
|
482
|
+
for (let i = 0, ii = geometries.length; i < ii; ++i) {
|
|
483
|
+
(0,_extent_js__WEBPACK_IMPORTED_MODULE_3__.extend)(extent, geometries[i].getExtent());
|
|
484
|
+
}
|
|
485
|
+
return extent;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Return the geometries that make up this geometry collection.
|
|
490
|
+
* @return {Array<Geometry>} Geometries.
|
|
491
|
+
* @api
|
|
492
|
+
*/
|
|
493
|
+
getGeometries() {
|
|
494
|
+
return cloneGeometries(this.geometries_);
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* @return {Array<Geometry>} Geometries.
|
|
499
|
+
*/
|
|
500
|
+
getGeometriesArray() {
|
|
501
|
+
return this.geometries_;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* @return {Array<Geometry>} Geometries.
|
|
506
|
+
*/
|
|
507
|
+
getGeometriesArrayRecursive() {
|
|
508
|
+
/** @type {Array<Geometry>} */
|
|
509
|
+
let geometriesArray = [];
|
|
510
|
+
const geometries = this.geometries_;
|
|
511
|
+
for (let i = 0, ii = geometries.length; i < ii; ++i) {
|
|
512
|
+
if (geometries[i].getType() === this.getType()) {
|
|
513
|
+
geometriesArray = geometriesArray.concat(
|
|
514
|
+
/** @type {GeometryCollection} */ (
|
|
515
|
+
geometries[i]
|
|
516
|
+
).getGeometriesArrayRecursive(),
|
|
517
|
+
);
|
|
518
|
+
} else {
|
|
519
|
+
geometriesArray.push(geometries[i]);
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
return geometriesArray;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* Create a simplified version of this geometry using the Douglas Peucker algorithm.
|
|
527
|
+
* @param {number} squaredTolerance Squared tolerance.
|
|
528
|
+
* @return {GeometryCollection} Simplified GeometryCollection.
|
|
529
|
+
* @override
|
|
530
|
+
*/
|
|
531
|
+
getSimplifiedGeometry(squaredTolerance) {
|
|
532
|
+
if (this.simplifiedGeometryRevision !== this.getRevision()) {
|
|
533
|
+
this.simplifiedGeometryMaxMinSquaredTolerance = 0;
|
|
534
|
+
this.simplifiedGeometryRevision = this.getRevision();
|
|
535
|
+
}
|
|
536
|
+
if (
|
|
537
|
+
squaredTolerance < 0 ||
|
|
538
|
+
(this.simplifiedGeometryMaxMinSquaredTolerance !== 0 &&
|
|
539
|
+
squaredTolerance < this.simplifiedGeometryMaxMinSquaredTolerance)
|
|
540
|
+
) {
|
|
541
|
+
return this;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
const simplifiedGeometries = [];
|
|
545
|
+
const geometries = this.geometries_;
|
|
546
|
+
let simplified = false;
|
|
547
|
+
for (let i = 0, ii = geometries.length; i < ii; ++i) {
|
|
548
|
+
const geometry = geometries[i];
|
|
549
|
+
const simplifiedGeometry =
|
|
550
|
+
geometry.getSimplifiedGeometry(squaredTolerance);
|
|
551
|
+
simplifiedGeometries.push(simplifiedGeometry);
|
|
552
|
+
if (simplifiedGeometry !== geometry) {
|
|
553
|
+
simplified = true;
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
if (simplified) {
|
|
557
|
+
const simplifiedGeometryCollection = new GeometryCollection(
|
|
558
|
+
simplifiedGeometries,
|
|
559
|
+
);
|
|
560
|
+
return simplifiedGeometryCollection;
|
|
561
|
+
}
|
|
562
|
+
this.simplifiedGeometryMaxMinSquaredTolerance = squaredTolerance;
|
|
563
|
+
return this;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* Get the type of this geometry.
|
|
568
|
+
* @return {import("./Geometry.js").Type} Geometry type.
|
|
569
|
+
* @api
|
|
570
|
+
* @override
|
|
571
|
+
*/
|
|
572
|
+
getType() {
|
|
573
|
+
return 'GeometryCollection';
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* Test if the geometry and the passed extent intersect.
|
|
578
|
+
* @param {import("../extent.js").Extent} extent Extent.
|
|
579
|
+
* @return {boolean} `true` if the geometry and the extent intersect.
|
|
580
|
+
* @api
|
|
581
|
+
* @override
|
|
582
|
+
*/
|
|
583
|
+
intersectsExtent(extent) {
|
|
584
|
+
const geometries = this.geometries_;
|
|
585
|
+
for (let i = 0, ii = geometries.length; i < ii; ++i) {
|
|
586
|
+
if (geometries[i].intersectsExtent(extent)) {
|
|
587
|
+
return true;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
return false;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* @return {boolean} Is empty.
|
|
595
|
+
*/
|
|
596
|
+
isEmpty() {
|
|
597
|
+
return this.geometries_.length === 0;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
/**
|
|
601
|
+
* Rotate the geometry around a given coordinate. This modifies the geometry
|
|
602
|
+
* coordinates in place.
|
|
603
|
+
* @param {number} angle Rotation angle in radians.
|
|
604
|
+
* @param {import("../coordinate.js").Coordinate} anchor The rotation center.
|
|
605
|
+
* @api
|
|
606
|
+
* @override
|
|
607
|
+
*/
|
|
608
|
+
rotate(angle, anchor) {
|
|
609
|
+
const geometries = this.geometries_;
|
|
610
|
+
for (let i = 0, ii = geometries.length; i < ii; ++i) {
|
|
611
|
+
geometries[i].rotate(angle, anchor);
|
|
612
|
+
}
|
|
613
|
+
this.changed();
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* Scale the geometry (with an optional origin). This modifies the geometry
|
|
618
|
+
* coordinates in place.
|
|
619
|
+
* @abstract
|
|
620
|
+
* @param {number} sx The scaling factor in the x-direction.
|
|
621
|
+
* @param {number} [sy] The scaling factor in the y-direction (defaults to sx).
|
|
622
|
+
* @param {import("../coordinate.js").Coordinate} [anchor] The scale origin (defaults to the center
|
|
623
|
+
* of the geometry extent).
|
|
624
|
+
* @api
|
|
625
|
+
* @override
|
|
626
|
+
*/
|
|
627
|
+
scale(sx, sy, anchor) {
|
|
628
|
+
if (!anchor) {
|
|
629
|
+
anchor = (0,_extent_js__WEBPACK_IMPORTED_MODULE_3__.getCenter)(this.getExtent());
|
|
630
|
+
}
|
|
631
|
+
const geometries = this.geometries_;
|
|
632
|
+
for (let i = 0, ii = geometries.length; i < ii; ++i) {
|
|
633
|
+
geometries[i].scale(sx, sy, anchor);
|
|
634
|
+
}
|
|
635
|
+
this.changed();
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* Set the geometries that make up this geometry collection.
|
|
640
|
+
* @param {Array<Geometry>} geometries Geometries.
|
|
641
|
+
* @api
|
|
642
|
+
*/
|
|
643
|
+
setGeometries(geometries) {
|
|
644
|
+
this.setGeometriesArray(cloneGeometries(geometries));
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* @param {Array<Geometry>} geometries Geometries.
|
|
649
|
+
*/
|
|
650
|
+
setGeometriesArray(geometries) {
|
|
651
|
+
this.unlistenGeometriesChange_();
|
|
652
|
+
this.geometries_ = geometries;
|
|
653
|
+
this.listenGeometriesChange_();
|
|
654
|
+
this.changed();
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* Apply a transform function to the coordinates of the geometry.
|
|
659
|
+
* The geometry is modified in place.
|
|
660
|
+
* If you do not want the geometry modified in place, first `clone()` it and
|
|
661
|
+
* then use this function on the clone.
|
|
662
|
+
* @param {import("../proj.js").TransformFunction} transformFn Transform function.
|
|
663
|
+
* Called with a flat array of geometry coordinates.
|
|
664
|
+
* @api
|
|
665
|
+
* @override
|
|
666
|
+
*/
|
|
667
|
+
applyTransform(transformFn) {
|
|
668
|
+
const geometries = this.geometries_;
|
|
669
|
+
for (let i = 0, ii = geometries.length; i < ii; ++i) {
|
|
670
|
+
geometries[i].applyTransform(transformFn);
|
|
671
|
+
}
|
|
672
|
+
this.changed();
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
/**
|
|
676
|
+
* Translate the geometry. This modifies the geometry coordinates in place. If
|
|
677
|
+
* instead you want a new geometry, first `clone()` this geometry.
|
|
678
|
+
* @param {number} deltaX Delta X.
|
|
679
|
+
* @param {number} deltaY Delta Y.
|
|
680
|
+
* @api
|
|
681
|
+
* @override
|
|
682
|
+
*/
|
|
683
|
+
translate(deltaX, deltaY) {
|
|
684
|
+
const geometries = this.geometries_;
|
|
685
|
+
for (let i = 0, ii = geometries.length; i < ii; ++i) {
|
|
686
|
+
geometries[i].translate(deltaX, deltaY);
|
|
687
|
+
}
|
|
688
|
+
this.changed();
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
/**
|
|
692
|
+
* Clean up.
|
|
693
|
+
* @override
|
|
694
|
+
*/
|
|
695
|
+
disposeInternal() {
|
|
696
|
+
this.unlistenGeometriesChange_();
|
|
697
|
+
super.disposeInternal();
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
/**
|
|
702
|
+
* @param {Array<Geometry>} geometries Geometries.
|
|
703
|
+
* @return {Array<Geometry>} Cloned geometries.
|
|
704
|
+
*/
|
|
705
|
+
function cloneGeometries(geometries) {
|
|
706
|
+
return geometries.map((geometry) => geometry.clone());
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (GeometryCollection);
|
|
710
|
+
|
|
711
|
+
|
|
712
|
+
/***/ }),
|
|
713
|
+
|
|
714
|
+
/***/ "./node_modules/ol/geom/flat/length.js":
|
|
715
|
+
/*!*********************************************!*\
|
|
716
|
+
!*** ./node_modules/ol/geom/flat/length.js ***!
|
|
717
|
+
\*********************************************/
|
|
718
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
719
|
+
|
|
720
|
+
__webpack_require__.r(__webpack_exports__);
|
|
721
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
722
|
+
/* harmony export */ "lineStringLength": () => (/* binding */ lineStringLength),
|
|
723
|
+
/* harmony export */ "linearRingLength": () => (/* binding */ linearRingLength)
|
|
724
|
+
/* harmony export */ });
|
|
725
|
+
/**
|
|
726
|
+
* @module ol/geom/flat/length
|
|
727
|
+
*/
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* @param {Array<number>} flatCoordinates Flat coordinates.
|
|
731
|
+
* @param {number} offset Offset.
|
|
732
|
+
* @param {number} end End.
|
|
733
|
+
* @param {number} stride Stride.
|
|
734
|
+
* @return {number} Length.
|
|
735
|
+
*/
|
|
736
|
+
function lineStringLength(flatCoordinates, offset, end, stride) {
|
|
737
|
+
let x1 = flatCoordinates[offset];
|
|
738
|
+
let y1 = flatCoordinates[offset + 1];
|
|
739
|
+
let length = 0;
|
|
740
|
+
for (let i = offset + stride; i < end; i += stride) {
|
|
741
|
+
const x2 = flatCoordinates[i];
|
|
742
|
+
const y2 = flatCoordinates[i + 1];
|
|
743
|
+
length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
|
|
744
|
+
x1 = x2;
|
|
745
|
+
y1 = y2;
|
|
746
|
+
}
|
|
747
|
+
return length;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
/**
|
|
751
|
+
* @param {Array<number>} flatCoordinates Flat coordinates.
|
|
752
|
+
* @param {number} offset Offset.
|
|
753
|
+
* @param {number} end End.
|
|
754
|
+
* @param {number} stride Stride.
|
|
755
|
+
* @return {number} Perimeter.
|
|
756
|
+
*/
|
|
757
|
+
function linearRingLength(flatCoordinates, offset, end, stride) {
|
|
758
|
+
let perimeter = lineStringLength(flatCoordinates, offset, end, stride);
|
|
759
|
+
const dx = flatCoordinates[end - stride] - flatCoordinates[offset];
|
|
760
|
+
const dy = flatCoordinates[end - stride + 1] - flatCoordinates[offset + 1];
|
|
761
|
+
perimeter += Math.sqrt(dx * dx + dy * dy);
|
|
762
|
+
return perimeter;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
|
|
766
|
+
/***/ })
|
|
767
|
+
|
|
768
|
+
}])
|
|
769
|
+
//# sourceMappingURL=vendors-node_modules_ol_geom_js-node_modules_ol_geom_flat_length_js.js.map
|