@eox/drawtools 0.14.2 → 0.15.0
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/dist/eox-drawtools.js +880 -844
- package/dist/eox-drawtools.umd.cjs +31 -32
- package/package.json +1 -1
- package/src/components/list.js +11 -3
- package/src/main.js +7 -0
- package/src/methods/draw/init-selection.js +40 -11
- package/src/methods/draw/on-draw-end.js +3 -0
- package/types/drawtools/src/components/list.d.ts +9 -0
- package/types/drawtools/src/components/list.d.ts.map +1 -1
- package/types/drawtools/src/main.d.ts +8 -0
- package/types/drawtools/src/main.d.ts.map +1 -1
- package/types/drawtools/src/methods/draw/init-selection.d.ts +2 -1
- package/types/drawtools/src/methods/draw/init-selection.d.ts.map +1 -1
- package/types/drawtools/src/methods/draw/on-draw-end.d.ts.map +1 -1
- package/types/map/src/components/compare.d.ts +2 -2
- package/types/map/src/components/compare.d.ts.map +1 -1
- package/types/map/src/components/tooltip.d.ts +7 -2
- package/types/map/src/components/tooltip.d.ts.map +1 -1
- package/types/map/src/controls/controls.d.ts +0 -6
- package/types/map/src/controls/controls.d.ts.map +1 -1
- package/types/map/src/controls/geo-location.d.ts +3 -3
- package/types/map/src/controls/geo-location.d.ts.map +1 -1
- package/types/map/src/controls/loading-indicator.d.ts +1 -1
- package/types/map/src/controls/loading-indicator.d.ts.map +1 -1
- package/types/map/src/custom/sources/FlatGeoBuf.d.ts +27 -0
- package/types/map/src/custom/sources/FlatGeoBuf.d.ts.map +1 -0
- package/types/map/src/custom/sources/WMTSCapabilities.d.ts +35 -0
- package/types/map/src/custom/sources/WMTSCapabilities.d.ts.map +1 -0
- package/types/map/src/helpers/add-new-feature.d.ts.map +1 -1
- package/types/map/src/helpers/generate.d.ts +5 -4
- package/types/map/src/helpers/generate.d.ts.map +1 -1
- package/types/map/src/helpers/interactions.d.ts.map +1 -1
- package/types/map/src/helpers/select.d.ts +5 -5
- package/types/map/src/helpers/select.d.ts.map +1 -1
- package/types/map/src/helpers/tile-grid.d.ts +2 -2
- package/types/map/src/helpers/tile-grid.d.ts.map +1 -1
- package/types/map/src/layers.d.ts +116 -0
- package/types/map/src/layers.d.ts.map +1 -0
- package/types/map/src/main.d.ts +6 -6
- package/types/map/src/main.d.ts.map +1 -1
- package/types/map/src/methods/map/add-update-layer.d.ts +2 -2
- package/types/map/src/methods/map/add-update-layer.d.ts.map +1 -1
- package/types/map/src/methods/map/setters.d.ts +2 -2
- package/types/map/src/methods/map/setters.d.ts.map +1 -1
- package/types/map/src/types.d.ts +28 -38
- package/types/map/src/types.d.ts.map +1 -1
package/dist/eox-drawtools.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Cn = Object.defineProperty;
|
|
2
|
+
var Xe = (n) => {
|
|
3
3
|
throw TypeError(n);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var R = (n, t, e) =>
|
|
7
|
-
var M = (n, t, e) => (
|
|
5
|
+
var bn = (n, t, e) => t in n ? Cn(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
6
|
+
var R = (n, t, e) => bn(n, typeof t != "symbol" ? t + "" : t, e), Ye = (n, t, e) => t.has(n) || Xe("Cannot " + e);
|
|
7
|
+
var M = (n, t, e) => (Ye(n, t, "read from private field"), e ? e.call(n) : t.get(n)), F = (n, t, e) => t.has(n) ? Xe("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, e), $ = (n, t, e, i) => (Ye(n, t, "write to private field"), i ? i.call(n, e) : t.set(n, e), e);
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2019 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const
|
|
14
|
-
let
|
|
13
|
+
const Rt = globalThis, pe = Rt.ShadowRoot && (Rt.ShadyCSS === void 0 || Rt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ei = Symbol(), Be = /* @__PURE__ */ new WeakMap();
|
|
14
|
+
let En = class {
|
|
15
15
|
constructor(t, e, i) {
|
|
16
|
-
if (this._$cssResult$ = !0, i !==
|
|
16
|
+
if (this._$cssResult$ = !0, i !== Ei) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
17
17
|
this.cssText = t, this.t = e;
|
|
18
18
|
}
|
|
19
19
|
get styleSheet() {
|
|
20
20
|
let t = this.o;
|
|
21
21
|
const e = this.t;
|
|
22
|
-
if (
|
|
22
|
+
if (pe && t === void 0) {
|
|
23
23
|
const i = e !== void 0 && e.length === 1;
|
|
24
|
-
i && (t =
|
|
24
|
+
i && (t = Be.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Be.set(e, t));
|
|
25
25
|
}
|
|
26
26
|
return t;
|
|
27
27
|
}
|
|
@@ -29,26 +29,26 @@ let Cn = class {
|
|
|
29
29
|
return this.cssText;
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
const
|
|
33
|
-
if (
|
|
32
|
+
const xn = (n) => new En(typeof n == "string" ? n : n + "", void 0, Ei), Pn = (n, t) => {
|
|
33
|
+
if (pe) n.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
34
34
|
else for (const e of t) {
|
|
35
|
-
const i = document.createElement("style"), r =
|
|
35
|
+
const i = document.createElement("style"), r = Rt.litNonce;
|
|
36
36
|
r !== void 0 && i.setAttribute("nonce", r), i.textContent = e.cssText, n.appendChild(i);
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, Ve = pe ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((t) => {
|
|
39
39
|
let e = "";
|
|
40
40
|
for (const i of t.cssRules) e += i.cssText;
|
|
41
|
-
return
|
|
41
|
+
return xn(e);
|
|
42
42
|
})(n) : n;
|
|
43
43
|
/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const { is:
|
|
48
|
+
const { is: Mn, defineProperty: Sn, getOwnPropertyDescriptor: $n, getOwnPropertyNames: An, getOwnPropertySymbols: Fn, getPrototypeOf: Gn } = Object, I = globalThis, ze = I.trustedTypes, In = ze ? ze.emptyScript : "", Qt = I.reactiveElementPolyfillSupport, ft = (n, t) => n, oe = { toAttribute(n, t) {
|
|
49
49
|
switch (t) {
|
|
50
50
|
case Boolean:
|
|
51
|
-
n = n ?
|
|
51
|
+
n = n ? In : null;
|
|
52
52
|
break;
|
|
53
53
|
case Object:
|
|
54
54
|
case Array:
|
|
@@ -73,46 +73,44 @@ const { is: En, defineProperty: xn, getOwnPropertyDescriptor: Pn, getOwnProperty
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return e;
|
|
76
|
-
} },
|
|
77
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")),
|
|
78
|
-
class
|
|
76
|
+
} }, xi = (n, t) => !Mn(n, t), Je = { attribute: !0, type: String, converter: oe, reflect: !1, useDefault: !1, hasChanged: xi };
|
|
77
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), I.litPropertyMetadata ?? (I.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
|
+
let et = class extends HTMLElement {
|
|
79
79
|
static addInitializer(t) {
|
|
80
80
|
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
|
81
81
|
}
|
|
82
82
|
static get observedAttributes() {
|
|
83
83
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
84
84
|
}
|
|
85
|
-
static createProperty(t, e =
|
|
86
|
-
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
85
|
+
static createProperty(t, e = Je) {
|
|
86
|
+
if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
87
87
|
const i = Symbol(), r = this.getPropertyDescriptor(t, i, e);
|
|
88
|
-
r !== void 0 &&
|
|
88
|
+
r !== void 0 && Sn(this.prototype, t, r);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
static getPropertyDescriptor(t, e, i) {
|
|
92
|
-
const { get: r, set: s } =
|
|
92
|
+
const { get: r, set: s } = $n(this.prototype, t) ?? { get() {
|
|
93
93
|
return this[e];
|
|
94
94
|
}, set(o) {
|
|
95
95
|
this[e] = o;
|
|
96
96
|
} };
|
|
97
|
-
return { get() {
|
|
98
|
-
return r == null ? void 0 : r.call(this);
|
|
99
|
-
}, set(o) {
|
|
97
|
+
return { get: r, set(o) {
|
|
100
98
|
const a = r == null ? void 0 : r.call(this);
|
|
101
|
-
s.call(this, o), this.requestUpdate(t, a, i);
|
|
99
|
+
s == null || s.call(this, o), this.requestUpdate(t, a, i);
|
|
102
100
|
}, configurable: !0, enumerable: !0 };
|
|
103
101
|
}
|
|
104
102
|
static getPropertyOptions(t) {
|
|
105
|
-
return this.elementProperties.get(t) ??
|
|
103
|
+
return this.elementProperties.get(t) ?? Je;
|
|
106
104
|
}
|
|
107
105
|
static _$Ei() {
|
|
108
|
-
if (this.hasOwnProperty(
|
|
109
|
-
const t =
|
|
106
|
+
if (this.hasOwnProperty(ft("elementProperties"))) return;
|
|
107
|
+
const t = Gn(this);
|
|
110
108
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
111
109
|
}
|
|
112
110
|
static finalize() {
|
|
113
|
-
if (this.hasOwnProperty(
|
|
114
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
115
|
-
const e = this.properties, i = [...
|
|
111
|
+
if (this.hasOwnProperty(ft("finalized"))) return;
|
|
112
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(ft("properties"))) {
|
|
113
|
+
const e = this.properties, i = [...An(e), ...Fn(e)];
|
|
116
114
|
for (const r of i) this.createProperty(r, e[r]);
|
|
117
115
|
}
|
|
118
116
|
const t = this[Symbol.metadata];
|
|
@@ -131,8 +129,8 @@ class tt extends HTMLElement {
|
|
|
131
129
|
const e = [];
|
|
132
130
|
if (Array.isArray(t)) {
|
|
133
131
|
const i = new Set(t.flat(1 / 0).reverse());
|
|
134
|
-
for (const r of i) e.unshift(
|
|
135
|
-
} else t !== void 0 && e.push(
|
|
132
|
+
for (const r of i) e.unshift(Ve(r));
|
|
133
|
+
} else t !== void 0 && e.push(Ve(t));
|
|
136
134
|
return e;
|
|
137
135
|
}
|
|
138
136
|
static _$Eu(t, e) {
|
|
@@ -161,7 +159,7 @@ class tt extends HTMLElement {
|
|
|
161
159
|
}
|
|
162
160
|
createRenderRoot() {
|
|
163
161
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
164
|
-
return
|
|
162
|
+
return Pn(t, this.constructor.elementStyles), t;
|
|
165
163
|
}
|
|
166
164
|
connectedCallback() {
|
|
167
165
|
var t;
|
|
@@ -182,33 +180,35 @@ class tt extends HTMLElement {
|
|
|
182
180
|
attributeChangedCallback(t, e, i) {
|
|
183
181
|
this._$AK(t, i);
|
|
184
182
|
}
|
|
185
|
-
_$
|
|
183
|
+
_$ET(t, e) {
|
|
186
184
|
var s;
|
|
187
185
|
const i = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, i);
|
|
188
186
|
if (r !== void 0 && i.reflect === !0) {
|
|
189
|
-
const o = (((s = i.converter) == null ? void 0 : s.toAttribute) !== void 0 ? i.converter :
|
|
187
|
+
const o = (((s = i.converter) == null ? void 0 : s.toAttribute) !== void 0 ? i.converter : oe).toAttribute(e, i.type);
|
|
190
188
|
this._$Em = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$Em = null;
|
|
191
189
|
}
|
|
192
190
|
}
|
|
193
191
|
_$AK(t, e) {
|
|
194
|
-
var s;
|
|
192
|
+
var s, o;
|
|
195
193
|
const i = this.constructor, r = i._$Eh.get(t);
|
|
196
194
|
if (r !== void 0 && this._$Em !== r) {
|
|
197
|
-
const
|
|
198
|
-
this._$Em = r, this[r] =
|
|
195
|
+
const a = i.getPropertyOptions(r), l = typeof a.converter == "function" ? { fromAttribute: a.converter } : ((s = a.converter) == null ? void 0 : s.fromAttribute) !== void 0 ? a.converter : oe;
|
|
196
|
+
this._$Em = r, this[r] = l.fromAttribute(e, a.type) ?? ((o = this._$Ej) == null ? void 0 : o.get(r)) ?? null, this._$Em = null;
|
|
199
197
|
}
|
|
200
198
|
}
|
|
201
199
|
requestUpdate(t, e, i) {
|
|
200
|
+
var r;
|
|
202
201
|
if (t !== void 0) {
|
|
203
|
-
|
|
204
|
-
|
|
202
|
+
const s = this.constructor, o = this[t];
|
|
203
|
+
if (i ?? (i = s.getPropertyOptions(t)), !((i.hasChanged ?? xi)(o, e) || i.useDefault && i.reflect && o === ((r = this._$Ej) == null ? void 0 : r.get(t)) && !this.hasAttribute(s._$Eu(t, i)))) return;
|
|
204
|
+
this.C(t, e, i);
|
|
205
205
|
}
|
|
206
|
-
this.isUpdatePending === !1 && (this._$ES = this._$
|
|
206
|
+
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
207
207
|
}
|
|
208
|
-
|
|
209
|
-
this._$AL.has(t) || this._$AL.set(t, e),
|
|
208
|
+
C(t, e, { useDefault: i, reflect: r, wrapped: s }, o) {
|
|
209
|
+
i && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(t) && (this._$Ej.set(t, o ?? e ?? this[t]), s !== !0 || o !== void 0) || (this._$AL.has(t) || (this.hasUpdated || i || (e = void 0), this._$AL.set(t, e)), r === !0 && this._$Em !== t && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(t));
|
|
210
210
|
}
|
|
211
|
-
async _$
|
|
211
|
+
async _$EP() {
|
|
212
212
|
this.isUpdatePending = !0;
|
|
213
213
|
try {
|
|
214
214
|
await this._$ES;
|
|
@@ -230,7 +230,10 @@ class tt extends HTMLElement {
|
|
|
230
230
|
this._$Ep = void 0;
|
|
231
231
|
}
|
|
232
232
|
const r = this.constructor.elementProperties;
|
|
233
|
-
if (r.size > 0) for (const [s, o] of r)
|
|
233
|
+
if (r.size > 0) for (const [s, o] of r) {
|
|
234
|
+
const { wrapped: a } = o, l = this[s];
|
|
235
|
+
a !== !0 || this._$AL.has(s) || l === void 0 || this.C(s, void 0, o, l);
|
|
236
|
+
}
|
|
234
237
|
}
|
|
235
238
|
let t = !1;
|
|
236
239
|
const e = this._$AL;
|
|
@@ -238,9 +241,9 @@ class tt extends HTMLElement {
|
|
|
238
241
|
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (i = this._$EO) == null || i.forEach((r) => {
|
|
239
242
|
var s;
|
|
240
243
|
return (s = r.hostUpdate) == null ? void 0 : s.call(r);
|
|
241
|
-
}), this.update(e)) : this._$
|
|
244
|
+
}), this.update(e)) : this._$EM();
|
|
242
245
|
} catch (r) {
|
|
243
|
-
throw t = !1, this._$
|
|
246
|
+
throw t = !1, this._$EM(), r;
|
|
244
247
|
}
|
|
245
248
|
t && this._$AE(e);
|
|
246
249
|
}
|
|
@@ -253,7 +256,7 @@ class tt extends HTMLElement {
|
|
|
253
256
|
return (r = i.hostUpdated) == null ? void 0 : r.call(i);
|
|
254
257
|
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
255
258
|
}
|
|
256
|
-
_$
|
|
259
|
+
_$EM() {
|
|
257
260
|
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
258
261
|
}
|
|
259
262
|
get updateComplete() {
|
|
@@ -266,63 +269,63 @@ class tt extends HTMLElement {
|
|
|
266
269
|
return !0;
|
|
267
270
|
}
|
|
268
271
|
update(t) {
|
|
269
|
-
this._$
|
|
272
|
+
this._$Eq && (this._$Eq = this._$Eq.forEach((e) => this._$ET(e, this[e]))), this._$EM();
|
|
270
273
|
}
|
|
271
274
|
updated(t) {
|
|
272
275
|
}
|
|
273
276
|
firstUpdated(t) {
|
|
274
277
|
}
|
|
275
|
-
}
|
|
276
|
-
|
|
278
|
+
};
|
|
279
|
+
et.elementStyles = [], et.shadowRootOptions = { mode: "open" }, et[ft("elementProperties")] = /* @__PURE__ */ new Map(), et[ft("finalized")] = /* @__PURE__ */ new Map(), Qt == null || Qt({ ReactiveElement: et }), (I.reactiveElementVersions ?? (I.reactiveElementVersions = [])).push("2.1.0");
|
|
277
280
|
/**
|
|
278
281
|
* @license
|
|
279
282
|
* Copyright 2017 Google LLC
|
|
280
283
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
281
284
|
*/
|
|
282
|
-
const gt = globalThis,
|
|
283
|
-
\f\r]`,
|
|
284
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
285
|
-
function
|
|
286
|
-
if (!
|
|
287
|
-
return
|
|
288
|
-
}
|
|
289
|
-
const
|
|
285
|
+
const gt = globalThis, Nt = gt.trustedTypes, We = Nt ? Nt.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, Pi = "$lit$", G = `lit$${Math.random().toFixed(9).slice(2)}$`, Mi = "?" + G, Ln = `<${Mi}>`, B = document, pt = () => B.createComment(""), yt = (n) => n === null || typeof n != "object" && typeof n != "function", ye = Array.isArray, Rn = (n) => ye(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", te = `[
|
|
286
|
+
\f\r]`, dt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, qe = /-->/g, Ke = />/g, T = RegExp(`>|${te}(?:([^\\s"'>=/]+)(${te}*=${te}*(?:[^
|
|
287
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), De = /'/g, Ze = /"/g, Si = /^(?:script|style|textarea|title)$/i, Tn = (n) => (t, ...e) => ({ _$litType$: n, strings: t, values: e }), H = Tn(1), at = Symbol.for("lit-noChange"), w = Symbol.for("lit-nothing"), Qe = /* @__PURE__ */ new WeakMap(), O = B.createTreeWalker(B, 129);
|
|
288
|
+
function $i(n, t) {
|
|
289
|
+
if (!ye(n) || !n.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
290
|
+
return We !== void 0 ? We.createHTML(t) : t;
|
|
291
|
+
}
|
|
292
|
+
const Nn = (n, t) => {
|
|
290
293
|
const e = n.length - 1, i = [];
|
|
291
|
-
let r, s = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o =
|
|
294
|
+
let r, s = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = dt;
|
|
292
295
|
for (let a = 0; a < e; a++) {
|
|
293
296
|
const l = n[a];
|
|
294
297
|
let h, c, u = -1, d = 0;
|
|
295
|
-
for (; d < l.length && (o.lastIndex = d, c = o.exec(l), c !== null); ) d = o.lastIndex, o ===
|
|
296
|
-
const
|
|
297
|
-
s += o ===
|
|
298
|
+
for (; d < l.length && (o.lastIndex = d, c = o.exec(l), c !== null); ) d = o.lastIndex, o === dt ? c[1] === "!--" ? o = qe : c[1] !== void 0 ? o = Ke : c[2] !== void 0 ? (Si.test(c[2]) && (r = RegExp("</" + c[2], "g")), o = T) : c[3] !== void 0 && (o = T) : o === T ? c[0] === ">" ? (o = r ?? dt, u = -1) : c[1] === void 0 ? u = -2 : (u = o.lastIndex - c[2].length, h = c[1], o = c[3] === void 0 ? T : c[3] === '"' ? Ze : De) : o === Ze || o === De ? o = T : o === qe || o === Ke ? o = dt : (o = T, r = void 0);
|
|
299
|
+
const f = o === T && n[a + 1].startsWith("/>") ? " " : "";
|
|
300
|
+
s += o === dt ? l + Ln : u >= 0 ? (i.push(h), l.slice(0, u) + Pi + l.slice(u) + G + f) : l + G + (u === -2 ? a : f);
|
|
298
301
|
}
|
|
299
|
-
return [
|
|
302
|
+
return [$i(n, s + (n[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
|
|
300
303
|
};
|
|
301
|
-
class
|
|
304
|
+
class mt {
|
|
302
305
|
constructor({ strings: t, _$litType$: e }, i) {
|
|
303
306
|
let r;
|
|
304
307
|
this.parts = [];
|
|
305
308
|
let s = 0, o = 0;
|
|
306
|
-
const a = t.length - 1, l = this.parts, [h, c] =
|
|
307
|
-
if (this.el =
|
|
309
|
+
const a = t.length - 1, l = this.parts, [h, c] = Nn(t, e);
|
|
310
|
+
if (this.el = mt.createElement(h, i), O.currentNode = this.el.content, e === 2 || e === 3) {
|
|
308
311
|
const u = this.el.content.firstChild;
|
|
309
312
|
u.replaceWith(...u.childNodes);
|
|
310
313
|
}
|
|
311
314
|
for (; (r = O.nextNode()) !== null && l.length < a; ) {
|
|
312
315
|
if (r.nodeType === 1) {
|
|
313
|
-
if (r.hasAttributes()) for (const u of r.getAttributeNames()) if (u.endsWith(
|
|
314
|
-
const d = c[o++],
|
|
315
|
-
l.push({ type: 1, index: s, name:
|
|
316
|
+
if (r.hasAttributes()) for (const u of r.getAttributeNames()) if (u.endsWith(Pi)) {
|
|
317
|
+
const d = c[o++], f = r.getAttribute(u).split(G), g = /([.?@])?(.*)/.exec(d);
|
|
318
|
+
l.push({ type: 1, index: s, name: g[2], strings: f, ctor: g[1] === "." ? kn : g[1] === "?" ? jn : g[1] === "@" ? Hn : Yt }), r.removeAttribute(u);
|
|
316
319
|
} else u.startsWith(G) && (l.push({ type: 6, index: s }), r.removeAttribute(u));
|
|
317
|
-
if (
|
|
320
|
+
if (Si.test(r.tagName)) {
|
|
318
321
|
const u = r.textContent.split(G), d = u.length - 1;
|
|
319
322
|
if (d > 0) {
|
|
320
|
-
r.textContent =
|
|
321
|
-
for (let
|
|
322
|
-
r.append(u[d],
|
|
323
|
+
r.textContent = Nt ? Nt.emptyScript : "";
|
|
324
|
+
for (let f = 0; f < d; f++) r.append(u[f], pt()), O.nextNode(), l.push({ type: 2, index: ++s });
|
|
325
|
+
r.append(u[d], pt());
|
|
323
326
|
}
|
|
324
327
|
}
|
|
325
|
-
} else if (r.nodeType === 8) if (r.data ===
|
|
328
|
+
} else if (r.nodeType === 8) if (r.data === Mi) l.push({ type: 2, index: s });
|
|
326
329
|
else {
|
|
327
330
|
let u = -1;
|
|
328
331
|
for (; (u = r.data.indexOf(G, u + 1)) !== -1; ) l.push({ type: 7, index: s }), u += G.length - 1;
|
|
@@ -331,18 +334,18 @@ class yt {
|
|
|
331
334
|
}
|
|
332
335
|
}
|
|
333
336
|
static createElement(t, e) {
|
|
334
|
-
const i =
|
|
337
|
+
const i = B.createElement("template");
|
|
335
338
|
return i.innerHTML = t, i;
|
|
336
339
|
}
|
|
337
340
|
}
|
|
338
|
-
function
|
|
341
|
+
function lt(n, t, e = n, i) {
|
|
339
342
|
var o, a;
|
|
340
|
-
if (t ===
|
|
343
|
+
if (t === at) return t;
|
|
341
344
|
let r = i !== void 0 ? (o = e._$Co) == null ? void 0 : o[i] : e._$Cl;
|
|
342
|
-
const s =
|
|
343
|
-
return (r == null ? void 0 : r.constructor) !== s && ((a = r == null ? void 0 : r._$AO) == null || a.call(r, !1), s === void 0 ? r = void 0 : (r = new s(n), r._$AT(n, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = r : e._$Cl = r), r !== void 0 && (t =
|
|
345
|
+
const s = yt(t) ? void 0 : t._$litDirective$;
|
|
346
|
+
return (r == null ? void 0 : r.constructor) !== s && ((a = r == null ? void 0 : r._$AO) == null || a.call(r, !1), s === void 0 ? r = void 0 : (r = new s(n), r._$AT(n, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = r : e._$Cl = r), r !== void 0 && (t = lt(n, r._$AS(n, t.values), r, i)), t;
|
|
344
347
|
}
|
|
345
|
-
let
|
|
348
|
+
let On = class {
|
|
346
349
|
constructor(t, e) {
|
|
347
350
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
348
351
|
}
|
|
@@ -353,29 +356,29 @@ let Rn = class {
|
|
|
353
356
|
return this._$AM._$AU;
|
|
354
357
|
}
|
|
355
358
|
u(t) {
|
|
356
|
-
const { el: { content: e }, parts: i } = this._$AD, r = ((t == null ? void 0 : t.creationScope) ??
|
|
359
|
+
const { el: { content: e }, parts: i } = this._$AD, r = ((t == null ? void 0 : t.creationScope) ?? B).importNode(e, !0);
|
|
357
360
|
O.currentNode = r;
|
|
358
361
|
let s = O.nextNode(), o = 0, a = 0, l = i[0];
|
|
359
362
|
for (; l !== void 0; ) {
|
|
360
363
|
if (o === l.index) {
|
|
361
364
|
let h;
|
|
362
|
-
l.type === 2 ? h = new
|
|
365
|
+
l.type === 2 ? h = new me(s, s.nextSibling, this, t) : l.type === 1 ? h = new l.ctor(s, l.name, l.strings, this, t) : l.type === 6 && (h = new Un(s, this, t)), this._$AV.push(h), l = i[++a];
|
|
363
366
|
}
|
|
364
367
|
o !== (l == null ? void 0 : l.index) && (s = O.nextNode(), o++);
|
|
365
368
|
}
|
|
366
|
-
return O.currentNode =
|
|
369
|
+
return O.currentNode = B, r;
|
|
367
370
|
}
|
|
368
371
|
p(t) {
|
|
369
372
|
let e = 0;
|
|
370
373
|
for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
|
|
371
374
|
}
|
|
372
|
-
},
|
|
375
|
+
}, me = class Ai {
|
|
373
376
|
get _$AU() {
|
|
374
377
|
var t;
|
|
375
378
|
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
376
379
|
}
|
|
377
380
|
constructor(t, e, i, r) {
|
|
378
|
-
this.type = 2, this._$AH =
|
|
381
|
+
this.type = 2, this._$AH = w, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = r, this._$Cv = (r == null ? void 0 : r.isConnected) ?? !0;
|
|
379
382
|
}
|
|
380
383
|
get parentNode() {
|
|
381
384
|
let t = this._$AA.parentNode;
|
|
@@ -389,7 +392,7 @@ let Rn = class {
|
|
|
389
392
|
return this._$AB;
|
|
390
393
|
}
|
|
391
394
|
_$AI(t, e = this) {
|
|
392
|
-
t =
|
|
395
|
+
t = lt(this, t, e), yt(t) ? t === w || t == null || t === "" ? (this._$AH !== w && this._$AR(), this._$AH = w) : t !== this._$AH && t !== at && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Rn(t) ? this.k(t) : this._(t);
|
|
393
396
|
}
|
|
394
397
|
O(t) {
|
|
395
398
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -398,26 +401,26 @@ let Rn = class {
|
|
|
398
401
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
399
402
|
}
|
|
400
403
|
_(t) {
|
|
401
|
-
this._$AH !==
|
|
404
|
+
this._$AH !== w && yt(this._$AH) ? this._$AA.nextSibling.data = t : this.T(B.createTextNode(t)), this._$AH = t;
|
|
402
405
|
}
|
|
403
406
|
$(t) {
|
|
404
407
|
var s;
|
|
405
|
-
const { values: e, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el =
|
|
408
|
+
const { values: e, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = mt.createElement($i(i.h, i.h[0]), this.options)), i);
|
|
406
409
|
if (((s = this._$AH) == null ? void 0 : s._$AD) === r) this._$AH.p(e);
|
|
407
410
|
else {
|
|
408
|
-
const o = new
|
|
411
|
+
const o = new On(r, this), a = o.u(this.options);
|
|
409
412
|
o.p(e), this.T(a), this._$AH = o;
|
|
410
413
|
}
|
|
411
414
|
}
|
|
412
415
|
_$AC(t) {
|
|
413
|
-
let e =
|
|
414
|
-
return e === void 0 &&
|
|
416
|
+
let e = Qe.get(t.strings);
|
|
417
|
+
return e === void 0 && Qe.set(t.strings, e = new mt(t)), e;
|
|
415
418
|
}
|
|
416
419
|
k(t) {
|
|
417
|
-
|
|
420
|
+
ye(this._$AH) || (this._$AH = [], this._$AR());
|
|
418
421
|
const e = this._$AH;
|
|
419
422
|
let i, r = 0;
|
|
420
|
-
for (const s of t) r === e.length ? e.push(i = new
|
|
423
|
+
for (const s of t) r === e.length ? e.push(i = new Ai(this.O(pt()), this.O(pt()), this, this.options)) : i = e[r], i._$AI(s), r++;
|
|
421
424
|
r < e.length && (this._$AR(i && i._$AB.nextSibling, r), e.length = r);
|
|
422
425
|
}
|
|
423
426
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
@@ -432,7 +435,7 @@ let Rn = class {
|
|
|
432
435
|
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
|
433
436
|
}
|
|
434
437
|
};
|
|
435
|
-
class
|
|
438
|
+
class Yt {
|
|
436
439
|
get tagName() {
|
|
437
440
|
return this.element.tagName;
|
|
438
441
|
}
|
|
@@ -440,46 +443,46 @@ class Xt {
|
|
|
440
443
|
return this._$AM._$AU;
|
|
441
444
|
}
|
|
442
445
|
constructor(t, e, i, r, s) {
|
|
443
|
-
this.type = 1, this._$AH =
|
|
446
|
+
this.type = 1, this._$AH = w, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = s, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = w;
|
|
444
447
|
}
|
|
445
448
|
_$AI(t, e = this, i, r) {
|
|
446
449
|
const s = this.strings;
|
|
447
450
|
let o = !1;
|
|
448
|
-
if (s === void 0) t =
|
|
451
|
+
if (s === void 0) t = lt(this, t, e, 0), o = !yt(t) || t !== this._$AH && t !== at, o && (this._$AH = t);
|
|
449
452
|
else {
|
|
450
453
|
const a = t;
|
|
451
454
|
let l, h;
|
|
452
|
-
for (t = s[0], l = 0; l < s.length - 1; l++) h =
|
|
455
|
+
for (t = s[0], l = 0; l < s.length - 1; l++) h = lt(this, a[i + l], e, l), h === at && (h = this._$AH[l]), o || (o = !yt(h) || h !== this._$AH[l]), h === w ? t = w : t !== w && (t += (h ?? "") + s[l + 1]), this._$AH[l] = h;
|
|
453
456
|
}
|
|
454
457
|
o && !r && this.j(t);
|
|
455
458
|
}
|
|
456
459
|
j(t) {
|
|
457
|
-
t ===
|
|
460
|
+
t === w ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
458
461
|
}
|
|
459
462
|
}
|
|
460
|
-
class
|
|
463
|
+
class kn extends Yt {
|
|
461
464
|
constructor() {
|
|
462
465
|
super(...arguments), this.type = 3;
|
|
463
466
|
}
|
|
464
467
|
j(t) {
|
|
465
|
-
this.element[this.name] = t ===
|
|
468
|
+
this.element[this.name] = t === w ? void 0 : t;
|
|
466
469
|
}
|
|
467
470
|
}
|
|
468
|
-
class
|
|
471
|
+
class jn extends Yt {
|
|
469
472
|
constructor() {
|
|
470
473
|
super(...arguments), this.type = 4;
|
|
471
474
|
}
|
|
472
475
|
j(t) {
|
|
473
|
-
this.element.toggleAttribute(this.name, !!t && t !==
|
|
476
|
+
this.element.toggleAttribute(this.name, !!t && t !== w);
|
|
474
477
|
}
|
|
475
478
|
}
|
|
476
|
-
class
|
|
479
|
+
class Hn extends Yt {
|
|
477
480
|
constructor(t, e, i, r, s) {
|
|
478
481
|
super(t, e, i, r, s), this.type = 5;
|
|
479
482
|
}
|
|
480
483
|
_$AI(t, e = this) {
|
|
481
|
-
if ((t =
|
|
482
|
-
const i = this._$AH, r = t ===
|
|
484
|
+
if ((t = lt(this, t, e, 0) ?? w) === at) return;
|
|
485
|
+
const i = this._$AH, r = t === w && i !== w || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, s = t !== w && (i === w || r);
|
|
483
486
|
r && this.element.removeEventListener(this.name, this, i), s && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
484
487
|
}
|
|
485
488
|
handleEvent(t) {
|
|
@@ -487,7 +490,7 @@ class On extends Xt {
|
|
|
487
490
|
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
488
491
|
}
|
|
489
492
|
}
|
|
490
|
-
class
|
|
493
|
+
class Un {
|
|
491
494
|
constructor(t, e, i) {
|
|
492
495
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
|
|
493
496
|
}
|
|
@@ -495,17 +498,17 @@ class kn {
|
|
|
495
498
|
return this._$AM._$AU;
|
|
496
499
|
}
|
|
497
500
|
_$AI(t) {
|
|
498
|
-
|
|
501
|
+
lt(this, t);
|
|
499
502
|
}
|
|
500
503
|
}
|
|
501
|
-
const
|
|
502
|
-
|
|
503
|
-
const
|
|
504
|
+
const ee = gt.litHtmlPolyfillSupport;
|
|
505
|
+
ee == null || ee(mt, me), (gt.litHtmlVersions ?? (gt.litHtmlVersions = [])).push("3.3.0");
|
|
506
|
+
const Xn = (n, t, e) => {
|
|
504
507
|
const i = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
505
508
|
let r = i._$litPart$;
|
|
506
509
|
if (r === void 0) {
|
|
507
510
|
const s = (e == null ? void 0 : e.renderBefore) ?? null;
|
|
508
|
-
i._$litPart$ = r = new
|
|
511
|
+
i._$litPart$ = r = new me(t.insertBefore(pt(), s), s, void 0, e ?? {});
|
|
509
512
|
}
|
|
510
513
|
return r._$AI(n), r;
|
|
511
514
|
};
|
|
@@ -514,7 +517,8 @@ const jn = (n, t, e) => {
|
|
|
514
517
|
* Copyright 2017 Google LLC
|
|
515
518
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
516
519
|
*/
|
|
517
|
-
|
|
520
|
+
const U = globalThis;
|
|
521
|
+
let X = class extends et {
|
|
518
522
|
constructor() {
|
|
519
523
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
520
524
|
}
|
|
@@ -525,7 +529,7 @@ class U extends tt {
|
|
|
525
529
|
}
|
|
526
530
|
update(t) {
|
|
527
531
|
const e = this.render();
|
|
528
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do =
|
|
532
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Xn(e, this.renderRoot, this.renderOptions);
|
|
529
533
|
}
|
|
530
534
|
connectedCallback() {
|
|
531
535
|
var t;
|
|
@@ -536,21 +540,21 @@ class U extends tt {
|
|
|
536
540
|
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
|
537
541
|
}
|
|
538
542
|
render() {
|
|
539
|
-
return
|
|
543
|
+
return at;
|
|
540
544
|
}
|
|
541
|
-
}
|
|
542
|
-
var
|
|
543
|
-
|
|
544
|
-
const
|
|
545
|
-
|
|
546
|
-
(
|
|
545
|
+
};
|
|
546
|
+
var bi;
|
|
547
|
+
X._$litElement$ = !0, X.finalized = !0, (bi = U.litElementHydrateSupport) == null || bi.call(U, { LitElement: X });
|
|
548
|
+
const ie = U.litElementPolyfillSupport;
|
|
549
|
+
ie == null || ie({ LitElement: X });
|
|
550
|
+
(U.litElementVersions ?? (U.litElementVersions = [])).push("4.2.0");
|
|
547
551
|
/**
|
|
548
552
|
* @license
|
|
549
553
|
* Copyright 2017 Google LLC
|
|
550
554
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
551
555
|
*/
|
|
552
|
-
const
|
|
553
|
-
let
|
|
556
|
+
const Yn = (n) => (...t) => ({ _$litDirective$: n, values: t });
|
|
557
|
+
let Bn = class {
|
|
554
558
|
constructor(t) {
|
|
555
559
|
}
|
|
556
560
|
get _$AU() {
|
|
@@ -571,23 +575,23 @@ let Un = class {
|
|
|
571
575
|
* Copyright 2020 Google LLC
|
|
572
576
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
573
577
|
*/
|
|
574
|
-
const
|
|
578
|
+
const Vn = {}, zn = (n, t = Vn) => n._$AH = t;
|
|
575
579
|
/**
|
|
576
580
|
* @license
|
|
577
581
|
* Copyright 2021 Google LLC
|
|
578
582
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
579
583
|
*/
|
|
580
|
-
const
|
|
584
|
+
const Jn = Yn(class extends Bn {
|
|
581
585
|
constructor() {
|
|
582
|
-
super(...arguments), this.key =
|
|
586
|
+
super(...arguments), this.key = w;
|
|
583
587
|
}
|
|
584
588
|
render(n, t) {
|
|
585
589
|
return this.key = n, t;
|
|
586
590
|
}
|
|
587
591
|
update(n, [t, e]) {
|
|
588
|
-
return t !== this.key && (
|
|
592
|
+
return t !== this.key && (zn(n), this.key = t), e;
|
|
589
593
|
}
|
|
590
|
-
}),
|
|
594
|
+
}), Wn = (n) => {
|
|
591
595
|
n.hoverInteraction = n.eoxMap.selectInteractions.SelectLayerHoverInteraction, n.clickInteraction = n.eoxMap.selectInteractions.SelectLayerClickInteraction;
|
|
592
596
|
const t = () => {
|
|
593
597
|
n.requestUpdate();
|
|
@@ -599,32 +603,32 @@ const Bn = Hn(class extends Un {
|
|
|
599
603
|
"change",
|
|
600
604
|
t
|
|
601
605
|
);
|
|
602
|
-
},
|
|
606
|
+
}, qn = (n, t, e) => {
|
|
603
607
|
if (n.clickId === t) return;
|
|
604
608
|
const i = e ? [] : [t];
|
|
605
609
|
n.hoverInteraction.highlightById(i);
|
|
606
|
-
},
|
|
610
|
+
}, Kn = (n, t) => {
|
|
607
611
|
n.stopPropagation();
|
|
608
612
|
const e = Number(n.target.getAttribute("index")), i = t.drawLayer.getSource().getFeatures()[e];
|
|
609
613
|
t.drawLayer.getSource().removeFeature(i), t.drawnFeatures.splice(e, 1), t.requestUpdate();
|
|
610
|
-
},
|
|
614
|
+
}, ti = {
|
|
611
615
|
duration: 750,
|
|
612
616
|
padding: [20, 20, 20, 20]
|
|
613
|
-
},
|
|
617
|
+
}, ei = {
|
|
614
618
|
type: "FeatureCollection",
|
|
615
619
|
features: []
|
|
616
|
-
},
|
|
620
|
+
}, Dn = (n, t) => {
|
|
617
621
|
const { clickId: e, drawLayer: i, olMap: r, clickInteraction: s } = t, o = s.getId(n);
|
|
618
622
|
if (e === o) {
|
|
619
623
|
const l = i.getSource().getExtent();
|
|
620
|
-
r.getView().fit(l,
|
|
624
|
+
r.getView().fit(l, ti), s.highlightById([]);
|
|
621
625
|
} else {
|
|
622
626
|
const l = t.eoxMap.projection || "EPSG:3857", h = t.eoxDrawTools.projection, c = n.clone().getGeometry().transform(h, l).getExtent();
|
|
623
|
-
s.highlightById([o]), r.getView().fit(c,
|
|
627
|
+
s.highlightById([o]), r.getView().fit(c, ti);
|
|
624
628
|
}
|
|
625
629
|
t.requestUpdate();
|
|
626
|
-
},
|
|
627
|
-
class
|
|
630
|
+
}, Zn = "ul.list-wrap { padding: 0;}ul.list-wrap li:hover,ul.list-wrap li.selected { background: var(--secondary-bg-color-hover);}ul.list-wrap li { list-style: none; padding: 4px;}ul.list-wrap li { border-bottom: 1.2px solid var(--secondary-color);}ul.list-wrap li:first-child { border-top: 1.2px solid var(--secondary-color);}ul.list-wrap li .list { width: 100%; align-items: center; justify-content: space-between; display: flex; align-items: center; cursor: pointer; font-size: small; gap: 10px;}ul.list-wrap li .list span { display: flex; align-items: center; cursor: pointer; font-size: small; flex-grow: 1;}";
|
|
631
|
+
class Fi extends X {
|
|
628
632
|
constructor() {
|
|
629
633
|
super();
|
|
630
634
|
/**
|
|
@@ -643,7 +647,7 @@ class Ai extends U {
|
|
|
643
647
|
* @type string | number
|
|
644
648
|
*/
|
|
645
649
|
R(this, "clickId");
|
|
646
|
-
this.eoxDrawTools = null, this.eoxMap = null, this.olMap = null, this.draw = null, this.drawLayer = null, this.drawnFeatures = [], this.featureName = "Feature", this.modify = null, this.unstyled = !1;
|
|
650
|
+
this.eoxDrawTools = null, this.eoxMap = null, this.olMap = null, this.draw = null, this.drawLayer = null, this.drawnFeatures = [], this.featureName = "Feature", this.featureNameKey = null, this.modify = null, this.unstyled = !1;
|
|
647
651
|
}
|
|
648
652
|
/**
|
|
649
653
|
* Handles the deletion of an individual feature.
|
|
@@ -651,7 +655,7 @@ class Ai extends U {
|
|
|
651
655
|
* @param {Event & { target: HTMLButtonElement }} evt - Event object containing button target.
|
|
652
656
|
*/
|
|
653
657
|
_handleDelete(e) {
|
|
654
|
-
|
|
658
|
+
Kn(e, this), this.dispatchEvent(new CustomEvent("changed", { bubbles: !0 }));
|
|
655
659
|
}
|
|
656
660
|
/**
|
|
657
661
|
* Handles the selection and deselection of a feature from the list.
|
|
@@ -659,7 +663,7 @@ class Ai extends U {
|
|
|
659
663
|
* @param {import("ol").Feature} feature - The selected feature.
|
|
660
664
|
*/
|
|
661
665
|
_handleFeatureSelectAndDeselect(e) {
|
|
662
|
-
|
|
666
|
+
Dn(e, this);
|
|
663
667
|
}
|
|
664
668
|
/**
|
|
665
669
|
*
|
|
@@ -667,13 +671,13 @@ class Ai extends U {
|
|
|
667
671
|
* @param {Boolean} mouseOut - Flag indicating mouse out event.
|
|
668
672
|
*/
|
|
669
673
|
_handleHoverFeature(e, i = !1) {
|
|
670
|
-
|
|
674
|
+
qn(this, e, i);
|
|
671
675
|
}
|
|
672
676
|
/**
|
|
673
677
|
* Initiates initial settings and event triggers upon the component's first update.
|
|
674
678
|
*/
|
|
675
679
|
firstUpdated() {
|
|
676
|
-
|
|
680
|
+
Wn(this);
|
|
677
681
|
}
|
|
678
682
|
/**
|
|
679
683
|
* Overrides createRenderRoot to handle shadow DOM.
|
|
@@ -685,18 +689,18 @@ class Ai extends U {
|
|
|
685
689
|
var e, i;
|
|
686
690
|
return this.hoverId = (e = this.hoverInteraction) == null ? void 0 : e.selectedFids[0], this.clickId = (i = this.clickInteraction) == null ? void 0 : i.selectedFids[0], H`
|
|
687
691
|
<style>
|
|
688
|
-
${!this.unstyled &&
|
|
692
|
+
${!this.unstyled && Zn}
|
|
689
693
|
</style>
|
|
690
694
|
<ul class="list-wrap">
|
|
691
695
|
${this.drawnFeatures.map((r, s) => {
|
|
692
696
|
const o = s + 1, a = Object.values(
|
|
693
697
|
this.eoxMap.selectInteractions
|
|
694
|
-
)[0].getId(r), l = this.hoverId === a, h = this.clickId === a
|
|
695
|
-
return
|
|
698
|
+
)[0].getId(r), l = this.hoverId === a, h = this.clickId === a, u = l || h ? "selected" : w, d = r.get(this.featureNameKey), f = d || `${this.featureName} ${o}`;
|
|
699
|
+
return Jn(
|
|
696
700
|
o,
|
|
697
701
|
H`
|
|
698
702
|
<li
|
|
699
|
-
class="${
|
|
703
|
+
class="${u}"
|
|
700
704
|
@mouseover=${() => this._handleHoverFeature(a)}
|
|
701
705
|
@mouseout=${() => this._handleHoverFeature(a, !0)}
|
|
702
706
|
>
|
|
@@ -704,9 +708,7 @@ class Ai extends U {
|
|
|
704
708
|
class="list"
|
|
705
709
|
@click="${() => this._handleFeatureSelectAndDeselect(r)}"
|
|
706
710
|
>
|
|
707
|
-
<span class="title"
|
|
708
|
-
>${this.featureName} ${o}</span
|
|
709
|
-
>
|
|
711
|
+
<span class="title">${f}</span>
|
|
710
712
|
<button
|
|
711
713
|
index=${s}
|
|
712
714
|
data-cy="deleteFeatureBtn"
|
|
@@ -724,7 +726,7 @@ class Ai extends U {
|
|
|
724
726
|
`;
|
|
725
727
|
}
|
|
726
728
|
}
|
|
727
|
-
R(
|
|
729
|
+
R(Fi, "properties", {
|
|
728
730
|
eoxDrawTools: { attribute: !1, state: !0 },
|
|
729
731
|
eoxMap: { attribute: !1, state: !0 },
|
|
730
732
|
olMap: { attribute: !1, state: !0 },
|
|
@@ -732,15 +734,16 @@ R(Ai, "properties", {
|
|
|
732
734
|
drawLayer: { attribute: !1, state: !0 },
|
|
733
735
|
drawnFeatures: { attribute: !1, state: !0, type: Array },
|
|
734
736
|
featureName: { attribute: !1, state: !0, type: String },
|
|
737
|
+
featureNameKey: { attribute: !1, state: !0, type: String },
|
|
735
738
|
modify: { attribute: !1, state: !0 },
|
|
736
739
|
unstyled: { type: Boolean }
|
|
737
740
|
});
|
|
738
|
-
customElements.define("eox-drawtools-list",
|
|
739
|
-
const
|
|
741
|
+
customElements.define("eox-drawtools-list", Fi);
|
|
742
|
+
const Qn = (n) => {
|
|
740
743
|
const { multipleFeatures: t, drawnFeatures: e, currentlyDrawing: i } = n, r = !t && (e == null ? void 0 : e.length) > 0 || i, s = !(e != null && e.length) && !i;
|
|
741
744
|
return { drawDisabled: r, discardDisabled: s };
|
|
742
|
-
},
|
|
743
|
-
function
|
|
745
|
+
}, tr = "button,.button { /* TODO: why does this only work here and not from :root? */ --primary-color: #004170; --primary-color-hover: #004170cc; --error-color: #ff5252; display: inline-flex; position: relative; align-items: center; color: #fff; border-width: 0; outline: none; border-radius: 4px; padding: 16px; height: 36px; cursor: pointer; font-family: inherit; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 1.25px; font-weight: 500; box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12); transition-property: box-shadow, transform, opacity, background; transition-duration: 0.28s; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);}button:hover:not([disabled]):not(.icon),.button:hover:not([disabled]):not(.icon) { box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12); background: var(--primary-color-hover);}button,button:active,.button,.button:active { background: var(--primary-color);}button[disabled],.button[disabled] { opacity: 0.5; cursor: not-allowed;}button.block,.button.block { display: block;}button.outline,.button.outline { background: transparent; box-shadow: none; color: var(--primary-color); outline: 1px solid var(--primary-color);}button.outline:hover,.button.outline:hover { background: transparent;}button.icon,.button.icon { background: transparent; border: none; box-shadow: none; padding: 0; border-radius: 50%; width: 24px; height: 24px; text-indent: -9999px;}button.icon-text,.button.icon-text { text-indent: 26px;}button.icon-text.block,.button.icon-text.block { text-indent: 20px;}button.icon:before,button.icon-text:before,.button.icon:before,.button.icon-text:before { position: absolute; text-indent: 0; line-height: initial;}button.icon-text.block:before,.button.icon-text.block:before { text-indent: -54px;}button.icon:before,.button.icon:before { width: 24px; height: 24px; margin-right: 0;}button.icon-text:before,.button.icon-text:before { width: 18px; height: 18px;}button.small,.button.small { height: 28px; padding: 12.4px; font-size: 0.75rem;}button.smallest.icon,button.smallest.icon::before { height: 16px; width: 16px; padding: 0px;}", er = 'textarea { height: 90px; resize: none; border-radius: 4px; box-sizing: border-box !important; width: 100%; padding: 5px 7px; border: 1px solid var(--secondary-color); font-size: smaller; background: var(--background-color);}input,input[type="text"],input[type="url"],input[type="email"],input[type="password"],input[type="text"],input[type="number"],input[type="search"],input[type="tel"],select { box-sizing: border-box; width: 100%; margin-top: 0.5rem; margin-bottom: 0.5rem; padding: 5px 7px; border-radius: 4px; border: 1px solid #0004; background-color: var(--background-color);}';
|
|
746
|
+
function ir(n) {
|
|
744
747
|
navigator.clipboard.writeText(n).then(
|
|
745
748
|
function() {
|
|
746
749
|
},
|
|
@@ -749,14 +752,14 @@ function Qn(n) {
|
|
|
749
752
|
}
|
|
750
753
|
);
|
|
751
754
|
}
|
|
752
|
-
const
|
|
755
|
+
const nr = {
|
|
753
756
|
/**
|
|
754
757
|
* Triggered when a property is changed.
|
|
755
758
|
* @event module:ol/Object.ObjectEvent#propertychange
|
|
756
759
|
* @api
|
|
757
760
|
*/
|
|
758
761
|
PROPERTYCHANGE: "propertychange"
|
|
759
|
-
},
|
|
762
|
+
}, _e = {
|
|
760
763
|
/**
|
|
761
764
|
* Generic change event. Triggered when the revision counter is increased.
|
|
762
765
|
* @event module:ol/events/Event~BaseEvent#change
|
|
@@ -764,7 +767,7 @@ const tr = {
|
|
|
764
767
|
*/
|
|
765
768
|
CHANGE: "change"
|
|
766
769
|
};
|
|
767
|
-
class
|
|
770
|
+
class rr {
|
|
768
771
|
constructor() {
|
|
769
772
|
this.disposed = !1;
|
|
770
773
|
}
|
|
@@ -781,15 +784,15 @@ class er {
|
|
|
781
784
|
disposeInternal() {
|
|
782
785
|
}
|
|
783
786
|
}
|
|
784
|
-
function
|
|
787
|
+
function sr(n, t, e) {
|
|
785
788
|
let i, r;
|
|
786
|
-
e = e ||
|
|
789
|
+
e = e || Gi;
|
|
787
790
|
let s = 0, o = n.length, a = !1;
|
|
788
791
|
for (; s < o; )
|
|
789
792
|
i = s + (o - s >> 1), r = +e(n[i], t), r < 0 ? s = i + 1 : (o = i, a = !r);
|
|
790
793
|
return a ? s : ~s;
|
|
791
794
|
}
|
|
792
|
-
function
|
|
795
|
+
function Gi(n, t) {
|
|
793
796
|
return n > t ? 1 : n < t ? -1 : 0;
|
|
794
797
|
}
|
|
795
798
|
function A(n, t) {
|
|
@@ -797,7 +800,7 @@ function A(n, t) {
|
|
|
797
800
|
for (let r = 0; r < i; r++)
|
|
798
801
|
n[n.length] = e[r];
|
|
799
802
|
}
|
|
800
|
-
function
|
|
803
|
+
function or(n, t) {
|
|
801
804
|
const e = n.length;
|
|
802
805
|
if (e !== t.length)
|
|
803
806
|
return !1;
|
|
@@ -806,26 +809,26 @@ function nr(n, t) {
|
|
|
806
809
|
return !1;
|
|
807
810
|
return !0;
|
|
808
811
|
}
|
|
809
|
-
function
|
|
812
|
+
function ii() {
|
|
810
813
|
}
|
|
811
|
-
function
|
|
814
|
+
function Ii(n) {
|
|
812
815
|
let t, e, i;
|
|
813
816
|
return function() {
|
|
814
817
|
const r = Array.prototype.slice.call(arguments);
|
|
815
|
-
return (!e || this !== i || !
|
|
818
|
+
return (!e || this !== i || !or(r, e)) && (i = this, e = r, t = n.apply(this, arguments)), t;
|
|
816
819
|
};
|
|
817
820
|
}
|
|
818
821
|
function Li(n) {
|
|
819
822
|
for (const t in n)
|
|
820
823
|
delete n[t];
|
|
821
824
|
}
|
|
822
|
-
function
|
|
825
|
+
function Ri(n) {
|
|
823
826
|
let t;
|
|
824
827
|
for (t in n)
|
|
825
828
|
return !1;
|
|
826
829
|
return !t;
|
|
827
830
|
}
|
|
828
|
-
class
|
|
831
|
+
class Ti {
|
|
829
832
|
/**
|
|
830
833
|
* @param {string} type Type.
|
|
831
834
|
*/
|
|
@@ -848,7 +851,7 @@ class Ri {
|
|
|
848
851
|
this.propagationStopped = !0;
|
|
849
852
|
}
|
|
850
853
|
}
|
|
851
|
-
class
|
|
854
|
+
class ar extends rr {
|
|
852
855
|
/**
|
|
853
856
|
* @param {*} [target] Default event target for dispatched events.
|
|
854
857
|
*/
|
|
@@ -879,7 +882,7 @@ class rr extends er {
|
|
|
879
882
|
const e = typeof t == "string", i = e ? t : t.type, r = this.listeners_ && this.listeners_[i];
|
|
880
883
|
if (!r)
|
|
881
884
|
return;
|
|
882
|
-
const s = e ? new
|
|
885
|
+
const s = e ? new Ti(t) : (
|
|
883
886
|
/** @type {Event} */
|
|
884
887
|
t
|
|
885
888
|
);
|
|
@@ -897,7 +900,7 @@ class rr extends er {
|
|
|
897
900
|
if (--o[i] === 0) {
|
|
898
901
|
let h = a[i];
|
|
899
902
|
for (delete a[i]; h--; )
|
|
900
|
-
this.removeEventListener(i,
|
|
903
|
+
this.removeEventListener(i, ii);
|
|
901
904
|
delete o[i];
|
|
902
905
|
}
|
|
903
906
|
return l;
|
|
@@ -938,10 +941,10 @@ class rr extends er {
|
|
|
938
941
|
if (!i)
|
|
939
942
|
return;
|
|
940
943
|
const r = i.indexOf(e);
|
|
941
|
-
r !== -1 && (this.pendingRemovals_ && t in this.pendingRemovals_ ? (i[r] =
|
|
944
|
+
r !== -1 && (this.pendingRemovals_ && t in this.pendingRemovals_ ? (i[r] = ii, ++this.pendingRemovals_[t]) : (i.splice(r, 1), i.length === 0 && delete this.listeners_[t]));
|
|
942
945
|
}
|
|
943
946
|
}
|
|
944
|
-
function
|
|
947
|
+
function _t(n, t, e, i, r) {
|
|
945
948
|
if (r) {
|
|
946
949
|
const o = e;
|
|
947
950
|
e = function(a) {
|
|
@@ -955,13 +958,13 @@ function mt(n, t, e, i, r) {
|
|
|
955
958
|
};
|
|
956
959
|
return n.addEventListener(t, e), s;
|
|
957
960
|
}
|
|
958
|
-
function
|
|
959
|
-
return
|
|
961
|
+
function ni(n, t, e, i) {
|
|
962
|
+
return _t(n, t, e, i, !0);
|
|
960
963
|
}
|
|
961
|
-
function
|
|
964
|
+
function Ot(n) {
|
|
962
965
|
n && n.target && (n.target.removeEventListener(n.type, n.listener), Li(n));
|
|
963
966
|
}
|
|
964
|
-
class
|
|
967
|
+
class Bt extends ar {
|
|
965
968
|
constructor() {
|
|
966
969
|
super(), this.on = /** @type {ObservableOnSignature<import("./events").EventsKey>} */
|
|
967
970
|
this.onInternal, this.once = /** @type {ObservableOnSignature<import("./events").EventsKey>} */
|
|
@@ -973,7 +976,7 @@ class Yt extends rr {
|
|
|
973
976
|
* @api
|
|
974
977
|
*/
|
|
975
978
|
changed() {
|
|
976
|
-
++this.revision_, this.dispatchEvent(
|
|
979
|
+
++this.revision_, this.dispatchEvent(_e.CHANGE);
|
|
977
980
|
}
|
|
978
981
|
/**
|
|
979
982
|
* Get the version number for this object. Each time the object is modified,
|
|
@@ -994,10 +997,10 @@ class Yt extends rr {
|
|
|
994
997
|
if (Array.isArray(t)) {
|
|
995
998
|
const i = t.length, r = new Array(i);
|
|
996
999
|
for (let s = 0; s < i; ++s)
|
|
997
|
-
r[s] =
|
|
1000
|
+
r[s] = _t(this, t[s], e);
|
|
998
1001
|
return r;
|
|
999
1002
|
}
|
|
1000
|
-
return
|
|
1003
|
+
return _t(
|
|
1001
1004
|
this,
|
|
1002
1005
|
/** @type {string} */
|
|
1003
1006
|
t,
|
|
@@ -1016,9 +1019,9 @@ class Yt extends rr {
|
|
|
1016
1019
|
const r = t.length;
|
|
1017
1020
|
i = new Array(r);
|
|
1018
1021
|
for (let s = 0; s < r; ++s)
|
|
1019
|
-
i[s] =
|
|
1022
|
+
i[s] = ni(this, t[s], e);
|
|
1020
1023
|
} else
|
|
1021
|
-
i =
|
|
1024
|
+
i = ni(
|
|
1022
1025
|
this,
|
|
1023
1026
|
/** @type {string} */
|
|
1024
1027
|
t,
|
|
@@ -1038,7 +1041,7 @@ class Yt extends rr {
|
|
|
1038
1041
|
e.ol_key
|
|
1039
1042
|
);
|
|
1040
1043
|
if (i)
|
|
1041
|
-
|
|
1044
|
+
lr(i);
|
|
1042
1045
|
else if (Array.isArray(t))
|
|
1043
1046
|
for (let r = 0, s = t.length; r < s; ++r)
|
|
1044
1047
|
this.removeEventListener(t[r], e);
|
|
@@ -1046,15 +1049,15 @@ class Yt extends rr {
|
|
|
1046
1049
|
this.removeEventListener(t, e);
|
|
1047
1050
|
}
|
|
1048
1051
|
}
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
function
|
|
1052
|
+
Bt.prototype.on;
|
|
1053
|
+
Bt.prototype.once;
|
|
1054
|
+
Bt.prototype.un;
|
|
1055
|
+
function lr(n) {
|
|
1053
1056
|
if (Array.isArray(n))
|
|
1054
1057
|
for (let t = 0, e = n.length; t < e; ++t)
|
|
1055
|
-
|
|
1058
|
+
Ot(n[t]);
|
|
1056
1059
|
else
|
|
1057
|
-
|
|
1060
|
+
Ot(
|
|
1058
1061
|
/** @type {import("./events.js").EventsKey} */
|
|
1059
1062
|
n
|
|
1060
1063
|
);
|
|
@@ -1062,11 +1065,11 @@ function sr(n) {
|
|
|
1062
1065
|
function y() {
|
|
1063
1066
|
throw new Error("Unimplemented abstract method.");
|
|
1064
1067
|
}
|
|
1065
|
-
let
|
|
1066
|
-
function
|
|
1067
|
-
return n.ol_uid || (n.ol_uid = String(++
|
|
1068
|
+
let hr = 0;
|
|
1069
|
+
function cr(n) {
|
|
1070
|
+
return n.ol_uid || (n.ol_uid = String(++hr));
|
|
1068
1071
|
}
|
|
1069
|
-
class
|
|
1072
|
+
class ri extends Ti {
|
|
1070
1073
|
/**
|
|
1071
1074
|
* @param {string} type The event type.
|
|
1072
1075
|
* @param {string} key The property name.
|
|
@@ -1076,12 +1079,12 @@ class ni extends Ri {
|
|
|
1076
1079
|
super(t), this.key = e, this.oldValue = i;
|
|
1077
1080
|
}
|
|
1078
1081
|
}
|
|
1079
|
-
class
|
|
1082
|
+
class Ni extends Bt {
|
|
1080
1083
|
/**
|
|
1081
1084
|
* @param {Object<string, *>} [values] An object with key-value pairs.
|
|
1082
1085
|
*/
|
|
1083
1086
|
constructor(t) {
|
|
1084
|
-
super(), this.on, this.once, this.un,
|
|
1087
|
+
super(), this.on, this.once, this.un, cr(this), this.values_ = null, t !== void 0 && this.setProperties(t);
|
|
1085
1088
|
}
|
|
1086
1089
|
/**
|
|
1087
1090
|
* Gets a value.
|
|
@@ -1128,7 +1131,7 @@ class Ti extends Yt {
|
|
|
1128
1131
|
*/
|
|
1129
1132
|
notify(t, e) {
|
|
1130
1133
|
let i;
|
|
1131
|
-
i = `change:${t}`, this.hasListener(i) && this.dispatchEvent(new
|
|
1134
|
+
i = `change:${t}`, this.hasListener(i) && this.dispatchEvent(new ri(i, t, e)), i = nr.PROPERTYCHANGE, this.hasListener(i) && this.dispatchEvent(new ri(i, t, e));
|
|
1132
1135
|
}
|
|
1133
1136
|
/**
|
|
1134
1137
|
* @param {string} key Key name.
|
|
@@ -1188,15 +1191,15 @@ class Ti extends Yt {
|
|
|
1188
1191
|
unset(t, e) {
|
|
1189
1192
|
if (this.values_ && t in this.values_) {
|
|
1190
1193
|
const i = this.values_[t];
|
|
1191
|
-
delete this.values_[t],
|
|
1194
|
+
delete this.values_[t], Ri(this.values_) && (this.values_ = null), e || this.notify(t, i);
|
|
1192
1195
|
}
|
|
1193
1196
|
}
|
|
1194
1197
|
}
|
|
1195
|
-
function
|
|
1198
|
+
function ur(n, t) {
|
|
1196
1199
|
if (!n)
|
|
1197
1200
|
throw new Error(t);
|
|
1198
1201
|
}
|
|
1199
|
-
class
|
|
1202
|
+
class ht extends Ni {
|
|
1200
1203
|
/**
|
|
1201
1204
|
* @param {Geometry|ObjectWithGeometry<Geometry>} [geometryOrProperties]
|
|
1202
1205
|
* You may pass a Geometry object directly, or an object literal containing
|
|
@@ -1226,7 +1229,7 @@ class lt extends Ti {
|
|
|
1226
1229
|
clone() {
|
|
1227
1230
|
const t = (
|
|
1228
1231
|
/** @type {Feature<Geometry>} */
|
|
1229
|
-
new
|
|
1232
|
+
new ht(this.hasProperties() ? this.getProperties() : null)
|
|
1230
1233
|
);
|
|
1231
1234
|
t.setGeometryName(this.getGeometryName());
|
|
1232
1235
|
const e = this.getGeometry();
|
|
@@ -1299,11 +1302,11 @@ class lt extends Ti {
|
|
|
1299
1302
|
* @private
|
|
1300
1303
|
*/
|
|
1301
1304
|
handleGeometryChanged_() {
|
|
1302
|
-
this.geometryChangeKey_ && (
|
|
1305
|
+
this.geometryChangeKey_ && (Ot(this.geometryChangeKey_), this.geometryChangeKey_ = null);
|
|
1303
1306
|
const t = this.getGeometry();
|
|
1304
|
-
t && (this.geometryChangeKey_ =
|
|
1307
|
+
t && (this.geometryChangeKey_ = _t(
|
|
1305
1308
|
t,
|
|
1306
|
-
|
|
1309
|
+
_e.CHANGE,
|
|
1307
1310
|
this.handleGeometryChange_,
|
|
1308
1311
|
this
|
|
1309
1312
|
)), this.changed();
|
|
@@ -1328,7 +1331,7 @@ class lt extends Ti {
|
|
|
1328
1331
|
* @fires module:ol/events/Event~BaseEvent#event:change
|
|
1329
1332
|
*/
|
|
1330
1333
|
setStyle(t) {
|
|
1331
|
-
this.style_ = t, this.styleFunction_ = t ?
|
|
1334
|
+
this.style_ = t, this.styleFunction_ = t ? dr(t) : void 0, this.changed();
|
|
1332
1335
|
}
|
|
1333
1336
|
/**
|
|
1334
1337
|
* Set the feature id. The feature id is considered stable and may be used when
|
|
@@ -1353,11 +1356,11 @@ class lt extends Ti {
|
|
|
1353
1356
|
this.removeChangeListener(this.geometryName_, this.handleGeometryChanged_), this.geometryName_ = t, this.addChangeListener(this.geometryName_, this.handleGeometryChanged_), this.handleGeometryChanged_();
|
|
1354
1357
|
}
|
|
1355
1358
|
}
|
|
1356
|
-
function
|
|
1359
|
+
function dr(n) {
|
|
1357
1360
|
if (typeof n == "function")
|
|
1358
1361
|
return n;
|
|
1359
1362
|
let t;
|
|
1360
|
-
return Array.isArray(n) ? t = n : (
|
|
1363
|
+
return Array.isArray(n) ? t = n : (ur(
|
|
1361
1364
|
typeof /** @type {?} */
|
|
1362
1365
|
n.getZIndex == "function",
|
|
1363
1366
|
"Expected an `ol/style/Style` or an array of `ol/style/Style.js`"
|
|
@@ -1368,7 +1371,7 @@ function hr(n) {
|
|
|
1368
1371
|
return t;
|
|
1369
1372
|
};
|
|
1370
1373
|
}
|
|
1371
|
-
const
|
|
1374
|
+
const C = {
|
|
1372
1375
|
UNKNOWN: 0,
|
|
1373
1376
|
INTERSECTING: 1,
|
|
1374
1377
|
ABOVE: 2,
|
|
@@ -1376,114 +1379,114 @@ const w = {
|
|
|
1376
1379
|
BELOW: 8,
|
|
1377
1380
|
LEFT: 16
|
|
1378
1381
|
};
|
|
1379
|
-
function
|
|
1382
|
+
function K(n, t, e) {
|
|
1380
1383
|
let i, r;
|
|
1381
1384
|
return t < n[0] ? i = n[0] - t : n[2] < t ? i = t - n[2] : i = 0, e < n[1] ? r = n[1] - e : n[3] < e ? r = e - n[3] : r = 0, i * i + r * r;
|
|
1382
1385
|
}
|
|
1383
|
-
function
|
|
1386
|
+
function Oi(n, t, e) {
|
|
1384
1387
|
return n[0] <= t && t <= n[2] && n[1] <= e && e <= n[3];
|
|
1385
1388
|
}
|
|
1386
|
-
function
|
|
1389
|
+
function si(n, t) {
|
|
1387
1390
|
const e = n[0], i = n[1], r = n[2], s = n[3], o = t[0], a = t[1];
|
|
1388
|
-
let l =
|
|
1389
|
-
return o < e ? l = l |
|
|
1391
|
+
let l = C.UNKNOWN;
|
|
1392
|
+
return o < e ? l = l | C.LEFT : o > r && (l = l | C.RIGHT), a < i ? l = l | C.BELOW : a > s && (l = l | C.ABOVE), l === C.UNKNOWN && (l = C.INTERSECTING), l;
|
|
1390
1393
|
}
|
|
1391
|
-
function
|
|
1394
|
+
function ve() {
|
|
1392
1395
|
return [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
1393
1396
|
}
|
|
1394
|
-
function
|
|
1397
|
+
function ki(n, t, e, i, r) {
|
|
1395
1398
|
return r ? (r[0] = n, r[1] = t, r[2] = e, r[3] = i, r) : [n, t, e, i];
|
|
1396
1399
|
}
|
|
1397
|
-
function
|
|
1398
|
-
return
|
|
1400
|
+
function we(n) {
|
|
1401
|
+
return ki(1 / 0, 1 / 0, -1 / 0, -1 / 0, n);
|
|
1399
1402
|
}
|
|
1400
|
-
function
|
|
1403
|
+
function ji(n, t) {
|
|
1401
1404
|
const e = n[0], i = n[1];
|
|
1402
|
-
return
|
|
1405
|
+
return ki(e, i, e, i, t);
|
|
1403
1406
|
}
|
|
1404
1407
|
function Ce(n, t, e, i, r) {
|
|
1405
|
-
const s =
|
|
1406
|
-
return
|
|
1408
|
+
const s = we(r);
|
|
1409
|
+
return Hi(s, n, t, e, i);
|
|
1407
1410
|
}
|
|
1408
|
-
function
|
|
1411
|
+
function fr(n, t) {
|
|
1409
1412
|
return t[0] < n[0] && (n[0] = t[0]), t[2] > n[2] && (n[2] = t[2]), t[1] < n[1] && (n[1] = t[1]), t[3] > n[3] && (n[3] = t[3]), n;
|
|
1410
1413
|
}
|
|
1411
|
-
function
|
|
1414
|
+
function Hi(n, t, e, i, r) {
|
|
1412
1415
|
for (; e < i; e += r)
|
|
1413
|
-
|
|
1416
|
+
gr(n, t[e], t[e + 1]);
|
|
1414
1417
|
return n;
|
|
1415
1418
|
}
|
|
1416
|
-
function
|
|
1419
|
+
function gr(n, t, e) {
|
|
1417
1420
|
n[0] = Math.min(n[0], t), n[1] = Math.min(n[1], e), n[2] = Math.max(n[2], t), n[3] = Math.max(n[3], e);
|
|
1418
1421
|
}
|
|
1419
|
-
function
|
|
1422
|
+
function pr(n, t) {
|
|
1420
1423
|
let e;
|
|
1421
|
-
return e = t(
|
|
1424
|
+
return e = t(yr(n)), e || (e = t(mr(n)), e) || (e = t(vr(n)), e) || (e = t(_r(n)), e) ? e : !1;
|
|
1422
1425
|
}
|
|
1423
|
-
function
|
|
1426
|
+
function yr(n) {
|
|
1424
1427
|
return [n[0], n[1]];
|
|
1425
1428
|
}
|
|
1426
|
-
function
|
|
1429
|
+
function mr(n) {
|
|
1427
1430
|
return [n[2], n[1]];
|
|
1428
1431
|
}
|
|
1429
|
-
function
|
|
1432
|
+
function Vt(n) {
|
|
1430
1433
|
return [(n[0] + n[2]) / 2, (n[1] + n[3]) / 2];
|
|
1431
1434
|
}
|
|
1432
|
-
function
|
|
1435
|
+
function kt(n) {
|
|
1433
1436
|
return n[3] - n[1];
|
|
1434
1437
|
}
|
|
1435
|
-
function
|
|
1438
|
+
function _r(n) {
|
|
1436
1439
|
return [n[0], n[3]];
|
|
1437
1440
|
}
|
|
1438
|
-
function
|
|
1441
|
+
function vr(n) {
|
|
1439
1442
|
return [n[2], n[3]];
|
|
1440
1443
|
}
|
|
1441
|
-
function
|
|
1444
|
+
function wr(n, t) {
|
|
1442
1445
|
return n[0] <= t[2] && n[2] >= t[0] && n[1] <= t[3] && n[3] >= t[1];
|
|
1443
1446
|
}
|
|
1444
|
-
function
|
|
1447
|
+
function Cr(n, t) {
|
|
1445
1448
|
return t ? (t[0] = n[0], t[1] = n[1], t[2] = n[2], t[3] = n[3], t) : n;
|
|
1446
1449
|
}
|
|
1447
|
-
function
|
|
1450
|
+
function br(n, t, e) {
|
|
1448
1451
|
let i = !1;
|
|
1449
|
-
const r =
|
|
1450
|
-
if (r ===
|
|
1452
|
+
const r = si(n, t), s = si(n, e);
|
|
1453
|
+
if (r === C.INTERSECTING || s === C.INTERSECTING)
|
|
1451
1454
|
i = !0;
|
|
1452
1455
|
else {
|
|
1453
|
-
const o = n[0], a = n[1], l = n[2], h = n[3], c = t[0], u = t[1], d = e[0],
|
|
1456
|
+
const o = n[0], a = n[1], l = n[2], h = n[3], c = t[0], u = t[1], d = e[0], f = e[1], g = (f - u) / (d - c);
|
|
1454
1457
|
let p, _;
|
|
1455
|
-
s &
|
|
1458
|
+
s & C.ABOVE && !(r & C.ABOVE) && (p = d - (f - h) / g, i = p >= o && p <= l), !i && s & C.RIGHT && !(r & C.RIGHT) && (_ = f - (d - l) * g, i = _ >= a && _ <= h), !i && s & C.BELOW && !(r & C.BELOW) && (p = d - (f - a) / g, i = p >= o && p <= l), !i && s & C.LEFT && !(r & C.LEFT) && (_ = f - (d - o) * g, i = _ >= a && _ <= h);
|
|
1456
1459
|
}
|
|
1457
1460
|
return i;
|
|
1458
1461
|
}
|
|
1459
|
-
function
|
|
1462
|
+
function Er(n, t, e, i, r, s) {
|
|
1460
1463
|
const o = r - e, a = s - i;
|
|
1461
1464
|
if (o !== 0 || a !== 0) {
|
|
1462
1465
|
const l = ((n - e) * o + (t - i) * a) / (o * o + a * a);
|
|
1463
1466
|
l > 1 ? (e = r, i = s) : l > 0 && (e += o * l, i += a * l);
|
|
1464
1467
|
}
|
|
1465
|
-
return
|
|
1468
|
+
return Y(n, t, e, i);
|
|
1466
1469
|
}
|
|
1467
|
-
function
|
|
1470
|
+
function Y(n, t, e, i) {
|
|
1468
1471
|
const r = e - n, s = i - t;
|
|
1469
1472
|
return r * r + s * s;
|
|
1470
1473
|
}
|
|
1471
|
-
function
|
|
1474
|
+
function oi(n) {
|
|
1472
1475
|
return n * 180 / Math.PI;
|
|
1473
1476
|
}
|
|
1474
|
-
function
|
|
1477
|
+
function Tt(n) {
|
|
1475
1478
|
return n * Math.PI / 180;
|
|
1476
1479
|
}
|
|
1477
|
-
function
|
|
1480
|
+
function be(n, t, e) {
|
|
1478
1481
|
return n + e * (t - n);
|
|
1479
1482
|
}
|
|
1480
|
-
function
|
|
1483
|
+
function ae(n, t, e) {
|
|
1481
1484
|
if (n >= t && n < e)
|
|
1482
1485
|
return n;
|
|
1483
1486
|
const i = e - t;
|
|
1484
1487
|
return ((n - t) % i + i) % i + t;
|
|
1485
1488
|
}
|
|
1486
|
-
const
|
|
1489
|
+
const xr = {
|
|
1487
1490
|
// use the radius of the Normal sphere
|
|
1488
1491
|
radians: 6370997 / (2 * Math.PI),
|
|
1489
1492
|
degrees: 2 * Math.PI * 6370997 / 360,
|
|
@@ -1491,7 +1494,7 @@ const wr = {
|
|
|
1491
1494
|
m: 1,
|
|
1492
1495
|
"us-ft": 1200 / 3937
|
|
1493
1496
|
};
|
|
1494
|
-
class
|
|
1497
|
+
class Ee {
|
|
1495
1498
|
/**
|
|
1496
1499
|
* @param {Options} options Projection options.
|
|
1497
1500
|
*/
|
|
@@ -1537,7 +1540,7 @@ class be {
|
|
|
1537
1540
|
* @api
|
|
1538
1541
|
*/
|
|
1539
1542
|
getMetersPerUnit() {
|
|
1540
|
-
return this.metersPerUnit_ ||
|
|
1543
|
+
return this.metersPerUnit_ || xr[this.units_];
|
|
1541
1544
|
}
|
|
1542
1545
|
/**
|
|
1543
1546
|
* Get the world extent for this projection.
|
|
@@ -1624,8 +1627,8 @@ class be {
|
|
|
1624
1627
|
return this.getPointResolutionFunc_;
|
|
1625
1628
|
}
|
|
1626
1629
|
}
|
|
1627
|
-
const
|
|
1628
|
-
class
|
|
1630
|
+
const $t = 6378137, it = Math.PI * $t, Pr = [-it, -it, it, it], Mr = [-180, -85, 180, 85], Gt = $t * Math.log(Math.tan(Math.PI / 2));
|
|
1631
|
+
class Q extends Ee {
|
|
1629
1632
|
/**
|
|
1630
1633
|
* @param {string} code Code.
|
|
1631
1634
|
*/
|
|
@@ -1633,42 +1636,42 @@ class K extends be {
|
|
|
1633
1636
|
super({
|
|
1634
1637
|
code: t,
|
|
1635
1638
|
units: "m",
|
|
1636
|
-
extent:
|
|
1639
|
+
extent: Pr,
|
|
1637
1640
|
global: !0,
|
|
1638
|
-
worldExtent:
|
|
1641
|
+
worldExtent: Mr,
|
|
1639
1642
|
getPointResolution: function(e, i) {
|
|
1640
|
-
return e / Math.cosh(i[1] /
|
|
1643
|
+
return e / Math.cosh(i[1] / $t);
|
|
1641
1644
|
}
|
|
1642
1645
|
});
|
|
1643
1646
|
}
|
|
1644
1647
|
}
|
|
1645
|
-
const
|
|
1646
|
-
new
|
|
1647
|
-
new
|
|
1648
|
-
new
|
|
1649
|
-
new
|
|
1650
|
-
new
|
|
1651
|
-
new
|
|
1648
|
+
const ai = [
|
|
1649
|
+
new Q("EPSG:3857"),
|
|
1650
|
+
new Q("EPSG:102100"),
|
|
1651
|
+
new Q("EPSG:102113"),
|
|
1652
|
+
new Q("EPSG:900913"),
|
|
1653
|
+
new Q("http://www.opengis.net/def/crs/EPSG/0/3857"),
|
|
1654
|
+
new Q("http://www.opengis.net/gml/srs/epsg.xml#3857")
|
|
1652
1655
|
];
|
|
1653
|
-
function
|
|
1656
|
+
function Sr(n, t, e, i) {
|
|
1654
1657
|
const r = n.length;
|
|
1655
1658
|
e = e > 1 ? e : 2, i = i ?? e, t === void 0 && (e > 2 ? t = n.slice() : t = new Array(r));
|
|
1656
1659
|
for (let s = 0; s < r; s += i) {
|
|
1657
|
-
t[s] =
|
|
1658
|
-
let o =
|
|
1659
|
-
o >
|
|
1660
|
+
t[s] = it * n[s] / 180;
|
|
1661
|
+
let o = $t * Math.log(Math.tan(Math.PI * (+n[s + 1] + 90) / 360));
|
|
1662
|
+
o > Gt ? o = Gt : o < -Gt && (o = -Gt), t[s + 1] = o;
|
|
1660
1663
|
}
|
|
1661
1664
|
return t;
|
|
1662
1665
|
}
|
|
1663
|
-
function
|
|
1666
|
+
function $r(n, t, e, i) {
|
|
1664
1667
|
const r = n.length;
|
|
1665
1668
|
e = e > 1 ? e : 2, i = i ?? e, t === void 0 && (e > 2 ? t = n.slice() : t = new Array(r));
|
|
1666
1669
|
for (let s = 0; s < r; s += i)
|
|
1667
|
-
t[s] = 180 * n[s] /
|
|
1670
|
+
t[s] = 180 * n[s] / it, t[s + 1] = 360 * Math.atan(Math.exp(n[s + 1] / $t)) / Math.PI - 90;
|
|
1668
1671
|
return t;
|
|
1669
1672
|
}
|
|
1670
|
-
const
|
|
1671
|
-
class N extends
|
|
1673
|
+
const Ar = 6378137, li = [-180, -90, 180, 90], Fr = Math.PI * Ar / 180;
|
|
1674
|
+
class N extends Ee {
|
|
1672
1675
|
/**
|
|
1673
1676
|
* @param {string} code Code.
|
|
1674
1677
|
* @param {string} [axisOrientation] Axis orientation.
|
|
@@ -1677,15 +1680,15 @@ class N extends be {
|
|
|
1677
1680
|
super({
|
|
1678
1681
|
code: t,
|
|
1679
1682
|
units: "degrees",
|
|
1680
|
-
extent:
|
|
1683
|
+
extent: li,
|
|
1681
1684
|
axisOrientation: e,
|
|
1682
1685
|
global: !0,
|
|
1683
|
-
metersPerUnit:
|
|
1684
|
-
worldExtent:
|
|
1686
|
+
metersPerUnit: Fr,
|
|
1687
|
+
worldExtent: li
|
|
1685
1688
|
});
|
|
1686
1689
|
}
|
|
1687
1690
|
}
|
|
1688
|
-
const
|
|
1691
|
+
const hi = [
|
|
1689
1692
|
new N("CRS:84"),
|
|
1690
1693
|
new N("EPSG:4326", "neu"),
|
|
1691
1694
|
new N("urn:ogc:def:crs:OGC:1.3:CRS84"),
|
|
@@ -1694,49 +1697,49 @@ const li = [
|
|
|
1694
1697
|
new N("http://www.opengis.net/gml/srs/epsg.xml#4326", "neu"),
|
|
1695
1698
|
new N("http://www.opengis.net/def/crs/EPSG/0/4326", "neu")
|
|
1696
1699
|
];
|
|
1697
|
-
let
|
|
1698
|
-
function
|
|
1699
|
-
return
|
|
1700
|
+
let le = {};
|
|
1701
|
+
function Gr(n) {
|
|
1702
|
+
return le[n] || le[n.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/, "EPSG:$3")] || null;
|
|
1700
1703
|
}
|
|
1701
|
-
function
|
|
1702
|
-
|
|
1704
|
+
function Ir(n, t) {
|
|
1705
|
+
le[n] = t;
|
|
1703
1706
|
}
|
|
1704
|
-
let
|
|
1705
|
-
function
|
|
1707
|
+
let nt = {};
|
|
1708
|
+
function vt(n, t, e) {
|
|
1706
1709
|
const i = n.getCode(), r = t.getCode();
|
|
1707
|
-
i in
|
|
1710
|
+
i in nt || (nt[i] = {}), nt[i][r] = e;
|
|
1708
1711
|
}
|
|
1709
|
-
function
|
|
1710
|
-
return n in
|
|
1712
|
+
function ne(n, t) {
|
|
1713
|
+
return n in nt && t in nt[n] ? nt[n][t] : null;
|
|
1711
1714
|
}
|
|
1712
|
-
const
|
|
1713
|
-
function
|
|
1714
|
-
const i = n - 5e5, o = (e.north ? t : t - 1e7) /
|
|
1715
|
-
let
|
|
1716
|
-
return
|
|
1717
|
-
|
|
1715
|
+
const jt = 0.9996, P = 669438e-8, zt = P * P, Jt = zt * P, k = P / (1 - P), ci = Math.sqrt(1 - P), ct = (1 - ci) / (1 + ci), Ui = ct * ct, xe = Ui * ct, Pe = xe * ct, Xi = Pe * ct, Yi = 1 - P / 4 - 3 * zt / 64 - 5 * Jt / 256, Lr = 3 * P / 8 + 3 * zt / 32 + 45 * Jt / 1024, Rr = 15 * zt / 256 + 45 * Jt / 1024, Tr = 35 * Jt / 3072, Nr = 3 / 2 * ct - 27 / 32 * xe + 269 / 512 * Xi, Or = 21 / 16 * Ui - 55 / 32 * Pe, kr = 151 / 96 * xe - 417 / 128 * Xi, jr = 1097 / 512 * Pe, Ht = 6378137;
|
|
1716
|
+
function Hr(n, t, e) {
|
|
1717
|
+
const i = n - 5e5, o = (e.north ? t : t - 1e7) / jt / (Ht * Yi), a = o + Nr * Math.sin(2 * o) + Or * Math.sin(4 * o) + kr * Math.sin(6 * o) + jr * Math.sin(8 * o), l = Math.sin(a), h = l * l, c = Math.cos(a), u = l / c, d = u * u, f = d * d, g = 1 - P * h, p = Math.sqrt(1 - P * h), _ = Ht / p, b = (1 - P) / g, v = k * c ** 2, S = v * v, E = i / (_ * jt), L = E * E, ut = L * E, He = ut * E, Ue = He * E, vn = Ue * E, wn = a - u / b * (L / 2 - He / 24 * (5 + 3 * d + 10 * v - 4 * S - 9 * k)) + vn / 720 * (61 + 90 * d + 298 * v + 45 * f - 252 * k - 3 * S);
|
|
1718
|
+
let Zt = (E - ut / 6 * (1 + 2 * d + v) + Ue / 120 * (5 - 2 * v + 28 * d - 3 * S + 8 * k + 24 * f)) / c;
|
|
1719
|
+
return Zt = ae(
|
|
1720
|
+
Zt + Tt(Bi(e.number)),
|
|
1718
1721
|
-Math.PI,
|
|
1719
1722
|
Math.PI
|
|
1720
|
-
), [
|
|
1723
|
+
), [oi(Zt), oi(wn)];
|
|
1721
1724
|
}
|
|
1722
|
-
const
|
|
1723
|
-
function
|
|
1724
|
-
n =
|
|
1725
|
-
const i =
|
|
1726
|
-
let
|
|
1727
|
-
return e.north || (
|
|
1725
|
+
const ui = -80, di = 84, Ur = -180, Xr = 180;
|
|
1726
|
+
function Yr(n, t, e) {
|
|
1727
|
+
n = ae(n, Ur, Xr), t < ui ? t = ui : t > di && (t = di);
|
|
1728
|
+
const i = Tt(t), r = Math.sin(i), s = Math.cos(i), o = r / s, a = o * o, l = a * a, h = Tt(n), c = Bi(e.number), u = Tt(c), d = Ht / Math.sqrt(1 - P * r ** 2), f = k * s ** 2, g = s * ae(h - u, -Math.PI, Math.PI), p = g * g, _ = p * g, b = _ * g, v = b * g, S = v * g, E = Ht * (Yi * i - Lr * Math.sin(2 * i) + Rr * Math.sin(4 * i) - Tr * Math.sin(6 * i)), L = jt * d * (g + _ / 6 * (1 - a + f) + v / 120 * (5 - 18 * a + l + 72 * f - 58 * k)) + 5e5;
|
|
1729
|
+
let ut = jt * (E + d * o * (p / 2 + b / 24 * (5 - a + 9 * f + 4 * f ** 2) + S / 720 * (61 - 58 * a + l + 600 * f - 330 * k)));
|
|
1730
|
+
return e.north || (ut += 1e7), [L, ut];
|
|
1728
1731
|
}
|
|
1729
|
-
function
|
|
1732
|
+
function Bi(n) {
|
|
1730
1733
|
return (n - 1) * 6 - 180 + 3;
|
|
1731
1734
|
}
|
|
1732
|
-
const
|
|
1735
|
+
const Br = [
|
|
1733
1736
|
/^EPSG:(\d+)$/,
|
|
1734
1737
|
/^urn:ogc:def:crs:EPSG::(\d+)$/,
|
|
1735
1738
|
/^http:\/\/www\.opengis\.net\/def\/crs\/EPSG\/0\/(\d+)$/
|
|
1736
1739
|
];
|
|
1737
|
-
function
|
|
1740
|
+
function Vi(n) {
|
|
1738
1741
|
let t = 0;
|
|
1739
|
-
for (const r of
|
|
1742
|
+
for (const r of Br) {
|
|
1740
1743
|
const s = n.match(r);
|
|
1741
1744
|
if (s) {
|
|
1742
1745
|
t = parseInt(s[1]);
|
|
@@ -1748,7 +1751,7 @@ function Bi(n) {
|
|
|
1748
1751
|
let e = 0, i = !1;
|
|
1749
1752
|
return t > 32700 && t < 32761 ? e = t - 32700 : t > 32600 && t < 32661 && (i = !0, e = t - 32600), e ? { number: e, north: i } : null;
|
|
1750
1753
|
}
|
|
1751
|
-
function
|
|
1754
|
+
function fi(n, t) {
|
|
1752
1755
|
return function(e, i, r, s) {
|
|
1753
1756
|
const o = e.length;
|
|
1754
1757
|
r = r > 1 ? r : 2, s = s ?? r, i || (r > 2 ? i = e.slice() : i = new Array(o));
|
|
@@ -1759,18 +1762,18 @@ function di(n, t) {
|
|
|
1759
1762
|
return i;
|
|
1760
1763
|
};
|
|
1761
1764
|
}
|
|
1762
|
-
function
|
|
1763
|
-
return
|
|
1765
|
+
function Vr(n) {
|
|
1766
|
+
return Vi(n) ? new Ee({ code: n, units: "m" }) : null;
|
|
1764
1767
|
}
|
|
1765
|
-
function
|
|
1766
|
-
const t =
|
|
1768
|
+
function zr(n) {
|
|
1769
|
+
const t = Vi(n.getCode());
|
|
1767
1770
|
return t ? {
|
|
1768
|
-
forward:
|
|
1769
|
-
inverse:
|
|
1771
|
+
forward: fi(Yr, t),
|
|
1772
|
+
inverse: fi(Hr, t)
|
|
1770
1773
|
} : null;
|
|
1771
1774
|
}
|
|
1772
|
-
const
|
|
1773
|
-
function
|
|
1775
|
+
const Jr = [zr], Wr = [Vr];
|
|
1776
|
+
function Me(n, t) {
|
|
1774
1777
|
if (t !== void 0) {
|
|
1775
1778
|
for (let e = 0, i = n.length; e < i; ++e)
|
|
1776
1779
|
t[e] = n[e];
|
|
@@ -1779,19 +1782,19 @@ function Pe(n, t) {
|
|
|
1779
1782
|
t = n.slice();
|
|
1780
1783
|
return t;
|
|
1781
1784
|
}
|
|
1782
|
-
function
|
|
1783
|
-
|
|
1785
|
+
function he(n) {
|
|
1786
|
+
Ir(n.getCode(), n), vt(n, n, Me);
|
|
1784
1787
|
}
|
|
1785
|
-
function
|
|
1786
|
-
n.forEach(
|
|
1788
|
+
function qr(n) {
|
|
1789
|
+
n.forEach(he);
|
|
1787
1790
|
}
|
|
1788
1791
|
function x(n) {
|
|
1789
1792
|
if (typeof n != "string")
|
|
1790
1793
|
return n;
|
|
1791
|
-
const t =
|
|
1794
|
+
const t = Gr(n);
|
|
1792
1795
|
if (t)
|
|
1793
1796
|
return t;
|
|
1794
|
-
for (const e of
|
|
1797
|
+
for (const e of Wr) {
|
|
1795
1798
|
const i = e(n);
|
|
1796
1799
|
if (i)
|
|
1797
1800
|
return i;
|
|
@@ -1799,85 +1802,85 @@ function x(n) {
|
|
|
1799
1802
|
return null;
|
|
1800
1803
|
}
|
|
1801
1804
|
function gi(n) {
|
|
1802
|
-
|
|
1805
|
+
qr(n), n.forEach(function(t) {
|
|
1803
1806
|
n.forEach(function(e) {
|
|
1804
|
-
t !== e &&
|
|
1807
|
+
t !== e && vt(t, e, Me);
|
|
1805
1808
|
});
|
|
1806
1809
|
});
|
|
1807
1810
|
}
|
|
1808
|
-
function
|
|
1811
|
+
function Kr(n, t, e, i) {
|
|
1809
1812
|
n.forEach(function(r) {
|
|
1810
1813
|
t.forEach(function(s) {
|
|
1811
|
-
|
|
1814
|
+
vt(r, s, e), vt(s, r, i);
|
|
1812
1815
|
});
|
|
1813
1816
|
});
|
|
1814
1817
|
}
|
|
1815
|
-
function
|
|
1818
|
+
function Dr(n, t) {
|
|
1816
1819
|
if (n === t)
|
|
1817
1820
|
return !0;
|
|
1818
1821
|
const e = n.getUnits() === t.getUnits();
|
|
1819
|
-
return (n.getCode() === t.getCode() ||
|
|
1822
|
+
return (n.getCode() === t.getCode() || zi(n, t) === Me) && e;
|
|
1820
1823
|
}
|
|
1821
|
-
function
|
|
1824
|
+
function zi(n, t) {
|
|
1822
1825
|
const e = n.getCode(), i = t.getCode();
|
|
1823
|
-
let r =
|
|
1826
|
+
let r = ne(e, i);
|
|
1824
1827
|
if (r)
|
|
1825
1828
|
return r;
|
|
1826
1829
|
let s = null, o = null;
|
|
1827
|
-
for (const l of
|
|
1830
|
+
for (const l of Jr)
|
|
1828
1831
|
s || (s = l(n)), o || (o = l(t));
|
|
1829
1832
|
if (!s && !o)
|
|
1830
1833
|
return null;
|
|
1831
1834
|
const a = "EPSG:4326";
|
|
1832
1835
|
if (o)
|
|
1833
1836
|
if (s)
|
|
1834
|
-
r =
|
|
1837
|
+
r = re(
|
|
1835
1838
|
s.inverse,
|
|
1836
1839
|
o.forward
|
|
1837
1840
|
);
|
|
1838
1841
|
else {
|
|
1839
|
-
const l =
|
|
1840
|
-
l && (r =
|
|
1842
|
+
const l = ne(e, a);
|
|
1843
|
+
l && (r = re(
|
|
1841
1844
|
l,
|
|
1842
1845
|
o.forward
|
|
1843
1846
|
));
|
|
1844
1847
|
}
|
|
1845
1848
|
else {
|
|
1846
|
-
const l =
|
|
1847
|
-
l && (r =
|
|
1849
|
+
const l = ne(a, i);
|
|
1850
|
+
l && (r = re(
|
|
1848
1851
|
s.inverse,
|
|
1849
1852
|
l
|
|
1850
1853
|
));
|
|
1851
1854
|
}
|
|
1852
|
-
return r && (
|
|
1855
|
+
return r && (he(n), he(t), vt(n, t, r)), r;
|
|
1853
1856
|
}
|
|
1854
|
-
function
|
|
1857
|
+
function re(n, t) {
|
|
1855
1858
|
return function(e, i, r, s) {
|
|
1856
1859
|
return i = n(e, i, r, s), t(i, i, r, s);
|
|
1857
1860
|
};
|
|
1858
1861
|
}
|
|
1859
|
-
function
|
|
1862
|
+
function ce(n, t) {
|
|
1860
1863
|
const e = x(n), i = x(t);
|
|
1861
|
-
return
|
|
1862
|
-
}
|
|
1863
|
-
function
|
|
1864
|
-
gi(
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1864
|
+
return zi(e, i);
|
|
1865
|
+
}
|
|
1866
|
+
function Zr() {
|
|
1867
|
+
gi(ai), gi(hi), Kr(
|
|
1868
|
+
hi,
|
|
1869
|
+
ai,
|
|
1870
|
+
Sr,
|
|
1871
|
+
$r
|
|
1869
1872
|
);
|
|
1870
1873
|
}
|
|
1871
|
-
|
|
1874
|
+
Zr();
|
|
1872
1875
|
new Array(6);
|
|
1873
|
-
function
|
|
1876
|
+
function Ji() {
|
|
1874
1877
|
return [1, 0, 0, 1, 0, 0];
|
|
1875
1878
|
}
|
|
1876
|
-
function
|
|
1879
|
+
function Wi(n, t, e, i, r, s, o, a) {
|
|
1877
1880
|
const l = Math.sin(s), h = Math.cos(s);
|
|
1878
1881
|
return n[0] = i * h, n[1] = r * l, n[2] = -i * l, n[3] = r * h, n[4] = o * i * h - a * i * l + t, n[5] = o * r * l + a * r * h + e, n;
|
|
1879
1882
|
}
|
|
1880
|
-
function
|
|
1883
|
+
function qi(n, t, e, i, r, s, o) {
|
|
1881
1884
|
s = s || [], o = o || 2;
|
|
1882
1885
|
let a = 0;
|
|
1883
1886
|
for (let l = t; l < e; l += i) {
|
|
@@ -1888,31 +1891,31 @@ function Wi(n, t, e, i, r, s, o) {
|
|
|
1888
1891
|
}
|
|
1889
1892
|
return s && s.length != a && (s.length = a), s;
|
|
1890
1893
|
}
|
|
1891
|
-
function
|
|
1894
|
+
function Qr(n, t, e, i, r, s, o) {
|
|
1892
1895
|
o = o || [];
|
|
1893
1896
|
const a = Math.cos(r), l = Math.sin(r), h = s[0], c = s[1];
|
|
1894
1897
|
let u = 0;
|
|
1895
1898
|
for (let d = t; d < e; d += i) {
|
|
1896
|
-
const
|
|
1897
|
-
o[u++] = h +
|
|
1899
|
+
const f = n[d] - h, g = n[d + 1] - c;
|
|
1900
|
+
o[u++] = h + f * a - g * l, o[u++] = c + f * l + g * a;
|
|
1898
1901
|
for (let p = d + 2; p < d + i; ++p)
|
|
1899
1902
|
o[u++] = n[p];
|
|
1900
1903
|
}
|
|
1901
1904
|
return o && o.length != u && (o.length = u), o;
|
|
1902
1905
|
}
|
|
1903
|
-
function
|
|
1906
|
+
function ts(n, t, e, i, r, s, o, a) {
|
|
1904
1907
|
a = a || [];
|
|
1905
1908
|
const l = o[0], h = o[1];
|
|
1906
1909
|
let c = 0;
|
|
1907
1910
|
for (let u = t; u < e; u += i) {
|
|
1908
|
-
const d = n[u] - l,
|
|
1909
|
-
a[c++] = l + r * d, a[c++] = h + s *
|
|
1910
|
-
for (let
|
|
1911
|
-
a[c++] = n[
|
|
1911
|
+
const d = n[u] - l, f = n[u + 1] - h;
|
|
1912
|
+
a[c++] = l + r * d, a[c++] = h + s * f;
|
|
1913
|
+
for (let g = u + 2; g < u + i; ++g)
|
|
1914
|
+
a[c++] = n[g];
|
|
1912
1915
|
}
|
|
1913
1916
|
return a && a.length != c && (a.length = c), a;
|
|
1914
1917
|
}
|
|
1915
|
-
function
|
|
1918
|
+
function es(n, t, e, i, r, s, o) {
|
|
1916
1919
|
o = o || [];
|
|
1917
1920
|
let a = 0;
|
|
1918
1921
|
for (let l = t; l < e; l += i) {
|
|
@@ -1922,10 +1925,10 @@ function Kr(n, t, e, i, r, s, o) {
|
|
|
1922
1925
|
}
|
|
1923
1926
|
return o && o.length != a && (o.length = a), o;
|
|
1924
1927
|
}
|
|
1925
|
-
const
|
|
1926
|
-
class
|
|
1928
|
+
const pi = Ji(), is = [NaN, NaN];
|
|
1929
|
+
class Ki extends Ni {
|
|
1927
1930
|
constructor() {
|
|
1928
|
-
super(), this.extent_ =
|
|
1931
|
+
super(), this.extent_ = ve(), this.extentRevision_ = -1, this.simplifiedGeometryMaxMinSquaredTolerance = 0, this.simplifiedGeometryRevision = 0, this.simplifyTransformedInternal = Ii(
|
|
1929
1932
|
(t, e, i) => {
|
|
1930
1933
|
if (!i)
|
|
1931
1934
|
return this.getSimplifiedGeometry(e);
|
|
@@ -1973,7 +1976,7 @@ class qi extends Ti {
|
|
|
1973
1976
|
* @return {boolean} Contains (x, y).
|
|
1974
1977
|
*/
|
|
1975
1978
|
containsXY(t, e) {
|
|
1976
|
-
return this.closestPointXY(t, e,
|
|
1979
|
+
return this.closestPointXY(t, e, is, Number.MIN_VALUE) === 0;
|
|
1977
1980
|
}
|
|
1978
1981
|
/**
|
|
1979
1982
|
* Return the closest point of the geometry to the passed point as
|
|
@@ -2014,9 +2017,9 @@ class qi extends Ti {
|
|
|
2014
2017
|
getExtent(t) {
|
|
2015
2018
|
if (this.extentRevision_ != this.getRevision()) {
|
|
2016
2019
|
const e = this.computeExtent(this.extent_);
|
|
2017
|
-
(isNaN(e[0]) || isNaN(e[1])) &&
|
|
2020
|
+
(isNaN(e[0]) || isNaN(e[1])) && we(e), this.extentRevision_ = this.getRevision();
|
|
2018
2021
|
}
|
|
2019
|
-
return
|
|
2022
|
+
return Cr(this.extent_, t);
|
|
2020
2023
|
}
|
|
2021
2024
|
/**
|
|
2022
2025
|
* Rotate the geometry around a given coordinate. This modifies the geometry
|
|
@@ -2122,9 +2125,9 @@ class qi extends Ti {
|
|
|
2122
2125
|
*/
|
|
2123
2126
|
transform(t, e) {
|
|
2124
2127
|
const i = x(t), r = i.getUnits() == "tile-pixels" ? function(s, o, a) {
|
|
2125
|
-
const l = i.getExtent(), h = i.getWorldExtent(), c =
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
+
const l = i.getExtent(), h = i.getWorldExtent(), c = kt(h) / kt(l);
|
|
2129
|
+
Wi(
|
|
2130
|
+
pi,
|
|
2128
2131
|
h[0],
|
|
2129
2132
|
h[3],
|
|
2130
2133
|
c,
|
|
@@ -2133,20 +2136,20 @@ class qi extends Ti {
|
|
|
2133
2136
|
0,
|
|
2134
2137
|
0
|
|
2135
2138
|
);
|
|
2136
|
-
const u =
|
|
2139
|
+
const u = qi(
|
|
2137
2140
|
s,
|
|
2138
2141
|
0,
|
|
2139
2142
|
s.length,
|
|
2140
2143
|
a,
|
|
2141
|
-
|
|
2144
|
+
pi,
|
|
2142
2145
|
o
|
|
2143
|
-
), d =
|
|
2146
|
+
), d = ce(i, e);
|
|
2144
2147
|
return d ? d(u, u, a) : u;
|
|
2145
|
-
} :
|
|
2148
|
+
} : ce(i, e);
|
|
2146
2149
|
return this.applyTransform(r), this;
|
|
2147
2150
|
}
|
|
2148
2151
|
}
|
|
2149
|
-
class
|
|
2152
|
+
class D extends Ki {
|
|
2150
2153
|
constructor() {
|
|
2151
2154
|
super(), this.layout = "XY", this.stride = 2, this.flatCoordinates;
|
|
2152
2155
|
}
|
|
@@ -2235,7 +2238,7 @@ class Z extends qi {
|
|
|
2235
2238
|
* @param {Array<number>} flatCoordinates Flat coordinates.
|
|
2236
2239
|
*/
|
|
2237
2240
|
setFlatCoordinates(t, e) {
|
|
2238
|
-
this.stride =
|
|
2241
|
+
this.stride = yi(t), this.layout = t, this.flatCoordinates = e;
|
|
2239
2242
|
}
|
|
2240
2243
|
/**
|
|
2241
2244
|
* @abstract
|
|
@@ -2254,7 +2257,7 @@ class Z extends qi {
|
|
|
2254
2257
|
setLayout(t, e, i) {
|
|
2255
2258
|
let r;
|
|
2256
2259
|
if (t)
|
|
2257
|
-
r =
|
|
2260
|
+
r = yi(t);
|
|
2258
2261
|
else {
|
|
2259
2262
|
for (let s = 0; s < i; ++s) {
|
|
2260
2263
|
if (e.length === 0) {
|
|
@@ -2264,7 +2267,7 @@ class Z extends qi {
|
|
|
2264
2267
|
e = /** @type {Array<unknown>} */
|
|
2265
2268
|
e[0];
|
|
2266
2269
|
}
|
|
2267
|
-
r = e.length, t =
|
|
2270
|
+
r = e.length, t = Z(r);
|
|
2268
2271
|
}
|
|
2269
2272
|
this.layout = t, this.stride = r;
|
|
2270
2273
|
}
|
|
@@ -2298,7 +2301,7 @@ class Z extends qi {
|
|
|
2298
2301
|
const i = this.getFlatCoordinates();
|
|
2299
2302
|
if (i) {
|
|
2300
2303
|
const r = this.getStride();
|
|
2301
|
-
|
|
2304
|
+
Qr(
|
|
2302
2305
|
i,
|
|
2303
2306
|
0,
|
|
2304
2307
|
i.length,
|
|
@@ -2320,11 +2323,11 @@ class Z extends qi {
|
|
|
2320
2323
|
* @override
|
|
2321
2324
|
*/
|
|
2322
2325
|
scale(t, e, i) {
|
|
2323
|
-
e === void 0 && (e = t), i || (i =
|
|
2326
|
+
e === void 0 && (e = t), i || (i = Vt(this.getExtent()));
|
|
2324
2327
|
const r = this.getFlatCoordinates();
|
|
2325
2328
|
if (r) {
|
|
2326
2329
|
const s = this.getStride();
|
|
2327
|
-
|
|
2330
|
+
ts(
|
|
2328
2331
|
r,
|
|
2329
2332
|
0,
|
|
2330
2333
|
r.length,
|
|
@@ -2348,7 +2351,7 @@ class Z extends qi {
|
|
|
2348
2351
|
const i = this.getFlatCoordinates();
|
|
2349
2352
|
if (i) {
|
|
2350
2353
|
const r = this.getStride();
|
|
2351
|
-
|
|
2354
|
+
es(
|
|
2352
2355
|
i,
|
|
2353
2356
|
0,
|
|
2354
2357
|
i.length,
|
|
@@ -2360,22 +2363,22 @@ class Z extends qi {
|
|
|
2360
2363
|
}
|
|
2361
2364
|
}
|
|
2362
2365
|
}
|
|
2363
|
-
function
|
|
2366
|
+
function Z(n) {
|
|
2364
2367
|
let t;
|
|
2365
2368
|
return n == 2 ? t = "XY" : n == 3 ? t = "XYZ" : n == 4 && (t = "XYZM"), /** @type {import("./Geometry.js").GeometryLayout} */
|
|
2366
2369
|
t;
|
|
2367
2370
|
}
|
|
2368
|
-
function
|
|
2371
|
+
function yi(n) {
|
|
2369
2372
|
let t;
|
|
2370
2373
|
return n == "XY" ? t = 2 : n == "XYZ" || n == "XYM" ? t = 3 : n == "XYZM" && (t = 4), /** @type {number} */
|
|
2371
2374
|
t;
|
|
2372
2375
|
}
|
|
2373
|
-
function
|
|
2376
|
+
function ns(n, t, e, i) {
|
|
2374
2377
|
for (let r = 0, s = e.length; r < s; ++r)
|
|
2375
2378
|
n[t++] = e[r];
|
|
2376
2379
|
return t;
|
|
2377
2380
|
}
|
|
2378
|
-
function
|
|
2381
|
+
function Wt(n, t, e, i) {
|
|
2379
2382
|
for (let r = 0, s = e.length; r < s; ++r) {
|
|
2380
2383
|
const o = e[r];
|
|
2381
2384
|
for (let a = 0; a < i; ++a)
|
|
@@ -2383,11 +2386,11 @@ function Jt(n, t, e, i) {
|
|
|
2383
2386
|
}
|
|
2384
2387
|
return t;
|
|
2385
2388
|
}
|
|
2386
|
-
function
|
|
2389
|
+
function At(n, t, e, i, r) {
|
|
2387
2390
|
r = r || [];
|
|
2388
2391
|
let s = 0;
|
|
2389
2392
|
for (let o = 0, a = e.length; o < a; ++o) {
|
|
2390
|
-
const l =
|
|
2393
|
+
const l = Wt(
|
|
2391
2394
|
n,
|
|
2392
2395
|
t,
|
|
2393
2396
|
e[o],
|
|
@@ -2397,11 +2400,11 @@ function $t(n, t, e, i, r) {
|
|
|
2397
2400
|
}
|
|
2398
2401
|
return r.length = s, r;
|
|
2399
2402
|
}
|
|
2400
|
-
function
|
|
2403
|
+
function Di(n, t, e, i, r) {
|
|
2401
2404
|
r = r || [];
|
|
2402
2405
|
let s = 0;
|
|
2403
2406
|
for (let o = 0, a = e.length; o < a; ++o) {
|
|
2404
|
-
const l =
|
|
2407
|
+
const l = At(
|
|
2405
2408
|
n,
|
|
2406
2409
|
t,
|
|
2407
2410
|
e[o],
|
|
@@ -2412,9 +2415,9 @@ function Zi(n, t, e, i, r) {
|
|
|
2412
2415
|
}
|
|
2413
2416
|
return r.length = s, r;
|
|
2414
2417
|
}
|
|
2415
|
-
function
|
|
2418
|
+
function Zi(n, t, e, i) {
|
|
2416
2419
|
const r = [];
|
|
2417
|
-
let s =
|
|
2420
|
+
let s = ve();
|
|
2418
2421
|
for (let o = 0, a = e.length; o < a; ++o) {
|
|
2419
2422
|
const l = e[o];
|
|
2420
2423
|
s = Ce(
|
|
@@ -2426,8 +2429,8 @@ function Di(n, t, e, i) {
|
|
|
2426
2429
|
}
|
|
2427
2430
|
return r;
|
|
2428
2431
|
}
|
|
2429
|
-
function
|
|
2430
|
-
return !
|
|
2432
|
+
function rs(n, t, e, i, r) {
|
|
2433
|
+
return !pr(
|
|
2431
2434
|
r,
|
|
2432
2435
|
/**
|
|
2433
2436
|
* @param {import("../../coordinate.js").Coordinate} coordinate Coordinate.
|
|
@@ -2453,7 +2456,7 @@ function j(n, t, e, i, r, s) {
|
|
|
2453
2456
|
}
|
|
2454
2457
|
return o !== 0;
|
|
2455
2458
|
}
|
|
2456
|
-
function
|
|
2459
|
+
function Se(n, t, e, i, r, s) {
|
|
2457
2460
|
if (e.length === 0 || !j(n, t, e[0], i, r, s))
|
|
2458
2461
|
return !1;
|
|
2459
2462
|
for (let o = 1, a = e.length; o < a; ++o)
|
|
@@ -2461,38 +2464,38 @@ function Me(n, t, e, i, r, s) {
|
|
|
2461
2464
|
return !1;
|
|
2462
2465
|
return !0;
|
|
2463
2466
|
}
|
|
2464
|
-
function
|
|
2467
|
+
function ss(n, t, e, i, r, s) {
|
|
2465
2468
|
if (e.length === 0)
|
|
2466
2469
|
return !1;
|
|
2467
2470
|
for (let o = 0, a = e.length; o < a; ++o) {
|
|
2468
2471
|
const l = e[o];
|
|
2469
|
-
if (
|
|
2472
|
+
if (Se(n, t, l, i, r, s))
|
|
2470
2473
|
return !0;
|
|
2471
2474
|
t = l[l.length - 1];
|
|
2472
2475
|
}
|
|
2473
2476
|
return !1;
|
|
2474
2477
|
}
|
|
2475
|
-
function
|
|
2476
|
-
let a, l, h, c, u, d,
|
|
2477
|
-
const
|
|
2478
|
+
function $e(n, t, e, i, r, s, o) {
|
|
2479
|
+
let a, l, h, c, u, d, f;
|
|
2480
|
+
const g = r[s + 1], p = [];
|
|
2478
2481
|
for (let v = 0, S = e.length; v < S; ++v) {
|
|
2479
2482
|
const E = e[v];
|
|
2480
2483
|
for (c = n[E - i], d = n[E - i + 1], a = t; a < E; a += i)
|
|
2481
|
-
u = n[a],
|
|
2484
|
+
u = n[a], f = n[a + 1], (g <= d && f <= g || d <= g && g <= f) && (h = (g - d) / (f - d) * (u - c) + c, p.push(h)), c = u, d = f;
|
|
2482
2485
|
}
|
|
2483
2486
|
let _ = NaN, b = -1 / 0;
|
|
2484
|
-
for (p.sort(
|
|
2487
|
+
for (p.sort(Gi), c = p[0], a = 1, l = p.length; a < l; ++a) {
|
|
2485
2488
|
u = p[a];
|
|
2486
2489
|
const v = Math.abs(u - c);
|
|
2487
|
-
v > b && (h = (c + u) / 2,
|
|
2490
|
+
v > b && (h = (c + u) / 2, Se(n, t, e, i, h, g) && (_ = h, b = v)), c = u;
|
|
2488
2491
|
}
|
|
2489
|
-
return isNaN(_) && (_ = r[s]), o ? (o.push(_,
|
|
2492
|
+
return isNaN(_) && (_ = r[s]), o ? (o.push(_, g, b), o) : [_, g, b];
|
|
2490
2493
|
}
|
|
2491
|
-
function
|
|
2494
|
+
function Qi(n, t, e, i, r) {
|
|
2492
2495
|
let s = [];
|
|
2493
2496
|
for (let o = 0, a = e.length; o < a; ++o) {
|
|
2494
2497
|
const l = e[o];
|
|
2495
|
-
s =
|
|
2498
|
+
s = $e(
|
|
2496
2499
|
n,
|
|
2497
2500
|
t,
|
|
2498
2501
|
l,
|
|
@@ -2504,7 +2507,7 @@ function Ki(n, t, e, i, r) {
|
|
|
2504
2507
|
}
|
|
2505
2508
|
return s;
|
|
2506
2509
|
}
|
|
2507
|
-
function
|
|
2510
|
+
function Ut(n, t, e, i, r, s, o) {
|
|
2508
2511
|
let a, l;
|
|
2509
2512
|
const h = (e - t) / i;
|
|
2510
2513
|
if (h === 1)
|
|
@@ -2513,20 +2516,20 @@ function Ht(n, t, e, i, r, s, o) {
|
|
|
2513
2516
|
a = t, l = r;
|
|
2514
2517
|
else if (h !== 0) {
|
|
2515
2518
|
let c = n[t], u = n[t + 1], d = 0;
|
|
2516
|
-
const
|
|
2519
|
+
const f = [0];
|
|
2517
2520
|
for (let _ = t + i; _ < e; _ += i) {
|
|
2518
2521
|
const b = n[_], v = n[_ + 1];
|
|
2519
|
-
d += Math.sqrt((b - c) * (b - c) + (v - u) * (v - u)),
|
|
2522
|
+
d += Math.sqrt((b - c) * (b - c) + (v - u) * (v - u)), f.push(d), c = b, u = v;
|
|
2520
2523
|
}
|
|
2521
|
-
const
|
|
2522
|
-
p < 0 ? (l = (
|
|
2524
|
+
const g = r * d, p = sr(f, g);
|
|
2525
|
+
p < 0 ? (l = (g - f[-p - 2]) / (f[-p - 1] - f[-p - 2]), a = t + (-p - 2) * i) : a = t + p * i;
|
|
2523
2526
|
}
|
|
2524
2527
|
o = o > 1 ? o : 2, s = s || new Array(o);
|
|
2525
2528
|
for (let c = 0; c < o; ++c)
|
|
2526
|
-
s[c] = a === void 0 ? NaN : l === void 0 ? n[a + c] :
|
|
2529
|
+
s[c] = a === void 0 ? NaN : l === void 0 ? n[a + c] : be(n[a + c], n[a + i + c], l);
|
|
2527
2530
|
return s;
|
|
2528
2531
|
}
|
|
2529
|
-
function
|
|
2532
|
+
function ue(n, t, e, i, r, s) {
|
|
2530
2533
|
if (e == t)
|
|
2531
2534
|
return null;
|
|
2532
2535
|
let o;
|
|
@@ -2548,7 +2551,7 @@ function ce(n, t, e, i, r, s) {
|
|
|
2548
2551
|
o = [];
|
|
2549
2552
|
for (let d = 0; d < i - 1; ++d)
|
|
2550
2553
|
o.push(
|
|
2551
|
-
|
|
2554
|
+
be(
|
|
2552
2555
|
n[(a - 1) * i + d],
|
|
2553
2556
|
n[a * i + d],
|
|
2554
2557
|
u
|
|
@@ -2556,9 +2559,9 @@ function ce(n, t, e, i, r, s) {
|
|
|
2556
2559
|
);
|
|
2557
2560
|
return o.push(r), o;
|
|
2558
2561
|
}
|
|
2559
|
-
function
|
|
2562
|
+
function os(n, t, e, i, r, s, o) {
|
|
2560
2563
|
if (o)
|
|
2561
|
-
return
|
|
2564
|
+
return ue(
|
|
2562
2565
|
n,
|
|
2563
2566
|
t,
|
|
2564
2567
|
e[e.length - 1],
|
|
@@ -2577,7 +2580,7 @@ function ns(n, t, e, i, r, s, o) {
|
|
|
2577
2580
|
if (r < n[t + i - 1])
|
|
2578
2581
|
return null;
|
|
2579
2582
|
if (r <= n[c - 1])
|
|
2580
|
-
return
|
|
2583
|
+
return ue(
|
|
2581
2584
|
n,
|
|
2582
2585
|
t,
|
|
2583
2586
|
c,
|
|
@@ -2590,7 +2593,7 @@ function ns(n, t, e, i, r, s, o) {
|
|
|
2590
2593
|
}
|
|
2591
2594
|
return null;
|
|
2592
2595
|
}
|
|
2593
|
-
function
|
|
2596
|
+
function as(n, t, e, i) {
|
|
2594
2597
|
for (; t < e - i; ) {
|
|
2595
2598
|
for (let r = 0; r < i; ++r) {
|
|
2596
2599
|
const s = n[t + r];
|
|
@@ -2599,7 +2602,7 @@ function rs(n, t, e, i) {
|
|
|
2599
2602
|
t += i, e -= i;
|
|
2600
2603
|
}
|
|
2601
2604
|
}
|
|
2602
|
-
function
|
|
2605
|
+
function Ae(n, t, e, i) {
|
|
2603
2606
|
let r = 0, s = n[e - i], o = n[e - i + 1];
|
|
2604
2607
|
for (; t < e; t += i) {
|
|
2605
2608
|
const a = n[t], l = n[t + 1];
|
|
@@ -2607,10 +2610,10 @@ function $e(n, t, e, i) {
|
|
|
2607
2610
|
}
|
|
2608
2611
|
return r === 0 ? void 0 : r > 0;
|
|
2609
2612
|
}
|
|
2610
|
-
function
|
|
2613
|
+
function Fe(n, t, e, i, r) {
|
|
2611
2614
|
r = r !== void 0 ? r : !1;
|
|
2612
2615
|
for (let s = 0, o = e.length; s < o; ++s) {
|
|
2613
|
-
const a = e[s], l =
|
|
2616
|
+
const a = e[s], l = Ae(
|
|
2614
2617
|
n,
|
|
2615
2618
|
t,
|
|
2616
2619
|
a,
|
|
@@ -2625,31 +2628,31 @@ function Ae(n, t, e, i, r) {
|
|
|
2625
2628
|
}
|
|
2626
2629
|
return !0;
|
|
2627
2630
|
}
|
|
2628
|
-
function
|
|
2631
|
+
function tn(n, t, e, i, r) {
|
|
2629
2632
|
for (let s = 0, o = e.length; s < o; ++s) {
|
|
2630
2633
|
const a = e[s];
|
|
2631
|
-
if (!
|
|
2634
|
+
if (!Fe(n, t, a, i, r))
|
|
2632
2635
|
return !1;
|
|
2633
2636
|
a.length && (t = a[a.length - 1]);
|
|
2634
2637
|
}
|
|
2635
2638
|
return !0;
|
|
2636
2639
|
}
|
|
2637
|
-
function
|
|
2640
|
+
function Xt(n, t, e, i, r) {
|
|
2638
2641
|
r = r !== void 0 ? r : !1;
|
|
2639
2642
|
for (let s = 0, o = e.length; s < o; ++s) {
|
|
2640
|
-
const a = e[s], l =
|
|
2643
|
+
const a = e[s], l = Ae(
|
|
2641
2644
|
n,
|
|
2642
2645
|
t,
|
|
2643
2646
|
a,
|
|
2644
2647
|
i
|
|
2645
2648
|
);
|
|
2646
|
-
(s === 0 ? r && l || !r && !l : r && !l || !r && l) &&
|
|
2649
|
+
(s === 0 ? r && l || !r && !l : r && !l || !r && l) && as(n, t, a, i), t = a;
|
|
2647
2650
|
}
|
|
2648
2651
|
return t;
|
|
2649
2652
|
}
|
|
2650
|
-
function
|
|
2653
|
+
function de(n, t, e, i, r) {
|
|
2651
2654
|
for (let s = 0, o = e.length; s < o; ++s)
|
|
2652
|
-
t =
|
|
2655
|
+
t = Xt(
|
|
2653
2656
|
n,
|
|
2654
2657
|
t,
|
|
2655
2658
|
e[s],
|
|
@@ -2658,11 +2661,11 @@ function ue(n, t, e, i, r) {
|
|
|
2658
2661
|
);
|
|
2659
2662
|
return t;
|
|
2660
2663
|
}
|
|
2661
|
-
function
|
|
2664
|
+
function ls(n, t) {
|
|
2662
2665
|
const e = [];
|
|
2663
2666
|
let i = 0, r = 0, s;
|
|
2664
2667
|
for (let o = 0, a = t.length; o < a; ++o) {
|
|
2665
|
-
const l = t[o], h =
|
|
2668
|
+
const l = t[o], h = Ae(n, i, l, 2);
|
|
2666
2669
|
if (s === void 0 && (s = h), h === s)
|
|
2667
2670
|
e.push(t.slice(r, o + 1));
|
|
2668
2671
|
else {
|
|
@@ -2674,7 +2677,7 @@ function ss(n, t) {
|
|
|
2674
2677
|
}
|
|
2675
2678
|
return e;
|
|
2676
2679
|
}
|
|
2677
|
-
function
|
|
2680
|
+
function qt(n, t, e, i, r, s, o) {
|
|
2678
2681
|
const a = (e - t) / i;
|
|
2679
2682
|
if (a < 3) {
|
|
2680
2683
|
for (; t < e; t += i)
|
|
@@ -2687,22 +2690,22 @@ function Wt(n, t, e, i, r, s, o) {
|
|
|
2687
2690
|
let c = 0;
|
|
2688
2691
|
for (; h.length > 0; ) {
|
|
2689
2692
|
const u = h.pop(), d = h.pop();
|
|
2690
|
-
let
|
|
2691
|
-
const
|
|
2693
|
+
let f = 0;
|
|
2694
|
+
const g = n[d], p = n[d + 1], _ = n[u], b = n[u + 1];
|
|
2692
2695
|
for (let v = d + i; v < u; v += i) {
|
|
2693
|
-
const S = n[v], E = n[v + 1],
|
|
2694
|
-
|
|
2696
|
+
const S = n[v], E = n[v + 1], L = Er(S, E, g, p, _, b);
|
|
2697
|
+
L > f && (c = v, f = L);
|
|
2695
2698
|
}
|
|
2696
|
-
|
|
2699
|
+
f > r && (l[(c - t) / i] = 1, d + i < c && h.push(d, c), c + i < u && h.push(c, u));
|
|
2697
2700
|
}
|
|
2698
2701
|
for (let u = 0; u < a; ++u)
|
|
2699
2702
|
l[u] && (s[o++] = n[t + u * i], s[o++] = n[t + u * i + 1]);
|
|
2700
2703
|
return o;
|
|
2701
2704
|
}
|
|
2702
|
-
function
|
|
2705
|
+
function en(n, t, e, i, r, s, o, a) {
|
|
2703
2706
|
for (let l = 0, h = e.length; l < h; ++l) {
|
|
2704
2707
|
const c = e[l];
|
|
2705
|
-
o =
|
|
2708
|
+
o = qt(
|
|
2706
2709
|
n,
|
|
2707
2710
|
t,
|
|
2708
2711
|
c,
|
|
@@ -2714,25 +2717,25 @@ function tn(n, t, e, i, r, s, o, a) {
|
|
|
2714
2717
|
}
|
|
2715
2718
|
return o;
|
|
2716
2719
|
}
|
|
2717
|
-
function
|
|
2720
|
+
function tt(n, t) {
|
|
2718
2721
|
return t * Math.round(n / t);
|
|
2719
2722
|
}
|
|
2720
|
-
function
|
|
2723
|
+
function hs(n, t, e, i, r, s, o) {
|
|
2721
2724
|
if (t == e)
|
|
2722
2725
|
return o;
|
|
2723
|
-
let a =
|
|
2726
|
+
let a = tt(n[t], r), l = tt(n[t + 1], r);
|
|
2724
2727
|
t += i, s[o++] = a, s[o++] = l;
|
|
2725
2728
|
let h, c;
|
|
2726
2729
|
do
|
|
2727
|
-
if (h =
|
|
2730
|
+
if (h = tt(n[t], r), c = tt(n[t + 1], r), t += i, t == e)
|
|
2728
2731
|
return s[o++] = h, s[o++] = c, o;
|
|
2729
2732
|
while (h == a && c == l);
|
|
2730
2733
|
for (; t < e; ) {
|
|
2731
|
-
const u =
|
|
2734
|
+
const u = tt(n[t], r), d = tt(n[t + 1], r);
|
|
2732
2735
|
if (t += i, u == h && d == c)
|
|
2733
2736
|
continue;
|
|
2734
|
-
const
|
|
2735
|
-
if (
|
|
2737
|
+
const f = h - a, g = c - l, p = u - a, _ = d - l;
|
|
2738
|
+
if (f * _ == g * p && (f < 0 && p < f || f == p || f > 0 && p > f) && (g < 0 && _ < g || g == _ || g > 0 && _ > g)) {
|
|
2736
2739
|
h = u, c = d;
|
|
2737
2740
|
continue;
|
|
2738
2741
|
}
|
|
@@ -2740,10 +2743,10 @@ function os(n, t, e, i, r, s, o) {
|
|
|
2740
2743
|
}
|
|
2741
2744
|
return s[o++] = h, s[o++] = c, o;
|
|
2742
2745
|
}
|
|
2743
|
-
function
|
|
2746
|
+
function Ge(n, t, e, i, r, s, o, a) {
|
|
2744
2747
|
for (let l = 0, h = e.length; l < h; ++l) {
|
|
2745
2748
|
const c = e[l];
|
|
2746
|
-
o =
|
|
2749
|
+
o = hs(
|
|
2747
2750
|
n,
|
|
2748
2751
|
t,
|
|
2749
2752
|
c,
|
|
@@ -2755,10 +2758,10 @@ function Fe(n, t, e, i, r, s, o, a) {
|
|
|
2755
2758
|
}
|
|
2756
2759
|
return o;
|
|
2757
2760
|
}
|
|
2758
|
-
function
|
|
2761
|
+
function cs(n, t, e, i, r, s, o, a) {
|
|
2759
2762
|
for (let l = 0, h = e.length; l < h; ++l) {
|
|
2760
2763
|
const c = e[l], u = [];
|
|
2761
|
-
o =
|
|
2764
|
+
o = Ge(
|
|
2762
2765
|
n,
|
|
2763
2766
|
t,
|
|
2764
2767
|
c,
|
|
@@ -2771,7 +2774,7 @@ function as(n, t, e, i, r, s, o, a) {
|
|
|
2771
2774
|
}
|
|
2772
2775
|
return o;
|
|
2773
2776
|
}
|
|
2774
|
-
class
|
|
2777
|
+
class V extends Ki {
|
|
2775
2778
|
/**
|
|
2776
2779
|
* @param {Array<Geometry>} geometries Geometries.
|
|
2777
2780
|
*/
|
|
@@ -2782,7 +2785,7 @@ class B extends qi {
|
|
|
2782
2785
|
* @private
|
|
2783
2786
|
*/
|
|
2784
2787
|
unlistenGeometriesChange_() {
|
|
2785
|
-
this.changeEventsKeys_.forEach(
|
|
2788
|
+
this.changeEventsKeys_.forEach(Ot), this.changeEventsKeys_.length = 0;
|
|
2786
2789
|
}
|
|
2787
2790
|
/**
|
|
2788
2791
|
* @private
|
|
@@ -2791,7 +2794,7 @@ class B extends qi {
|
|
|
2791
2794
|
const t = this.geometries_;
|
|
2792
2795
|
for (let e = 0, i = t.length; e < i; ++e)
|
|
2793
2796
|
this.changeEventsKeys_.push(
|
|
2794
|
-
|
|
2797
|
+
_t(t[e], _e.CHANGE, this.changed, this)
|
|
2795
2798
|
);
|
|
2796
2799
|
}
|
|
2797
2800
|
/**
|
|
@@ -2801,8 +2804,8 @@ class B extends qi {
|
|
|
2801
2804
|
* @override
|
|
2802
2805
|
*/
|
|
2803
2806
|
clone() {
|
|
2804
|
-
const t = new
|
|
2805
|
-
|
|
2807
|
+
const t = new V(
|
|
2808
|
+
se(this.geometries_)
|
|
2806
2809
|
);
|
|
2807
2810
|
return t.applyProperties(this), t;
|
|
2808
2811
|
}
|
|
@@ -2815,7 +2818,7 @@ class B extends qi {
|
|
|
2815
2818
|
* @override
|
|
2816
2819
|
*/
|
|
2817
2820
|
closestPointXY(t, e, i, r) {
|
|
2818
|
-
if (r <
|
|
2821
|
+
if (r < K(this.getExtent(), t, e))
|
|
2819
2822
|
return r;
|
|
2820
2823
|
const s = this.geometries_;
|
|
2821
2824
|
for (let o = 0, a = s.length; o < a; ++o)
|
|
@@ -2847,10 +2850,10 @@ class B extends qi {
|
|
|
2847
2850
|
* @override
|
|
2848
2851
|
*/
|
|
2849
2852
|
computeExtent(t) {
|
|
2850
|
-
|
|
2853
|
+
we(t);
|
|
2851
2854
|
const e = this.geometries_;
|
|
2852
2855
|
for (let i = 0, r = e.length; i < r; ++i)
|
|
2853
|
-
|
|
2856
|
+
fr(t, e[i].getExtent());
|
|
2854
2857
|
return t;
|
|
2855
2858
|
}
|
|
2856
2859
|
/**
|
|
@@ -2859,7 +2862,7 @@ class B extends qi {
|
|
|
2859
2862
|
* @api
|
|
2860
2863
|
*/
|
|
2861
2864
|
getGeometries() {
|
|
2862
|
-
return
|
|
2865
|
+
return se(this.geometries_);
|
|
2863
2866
|
}
|
|
2864
2867
|
/**
|
|
2865
2868
|
* @return {Array<Geometry>} Geometries.
|
|
@@ -2895,7 +2898,7 @@ class B extends qi {
|
|
|
2895
2898
|
const a = i[s], l = a.getSimplifiedGeometry(t);
|
|
2896
2899
|
e.push(l), l !== a && (r = !0);
|
|
2897
2900
|
}
|
|
2898
|
-
return r ? new
|
|
2901
|
+
return r ? new V(
|
|
2899
2902
|
e
|
|
2900
2903
|
) : (this.simplifiedGeometryMaxMinSquaredTolerance = t, this);
|
|
2901
2904
|
}
|
|
@@ -2954,7 +2957,7 @@ class B extends qi {
|
|
|
2954
2957
|
* @override
|
|
2955
2958
|
*/
|
|
2956
2959
|
scale(t, e, i) {
|
|
2957
|
-
i || (i =
|
|
2960
|
+
i || (i = Vt(this.getExtent()));
|
|
2958
2961
|
const r = this.geometries_;
|
|
2959
2962
|
for (let s = 0, o = r.length; s < o; ++s)
|
|
2960
2963
|
r[s].scale(t, e, i);
|
|
@@ -2966,7 +2969,7 @@ class B extends qi {
|
|
|
2966
2969
|
* @api
|
|
2967
2970
|
*/
|
|
2968
2971
|
setGeometries(t) {
|
|
2969
|
-
this.setGeometriesArray(
|
|
2972
|
+
this.setGeometriesArray(se(t));
|
|
2970
2973
|
}
|
|
2971
2974
|
/**
|
|
2972
2975
|
* @param {Array<Geometry>} geometries Geometries.
|
|
@@ -3012,10 +3015,10 @@ class B extends qi {
|
|
|
3012
3015
|
this.unlistenGeometriesChange_(), super.disposeInternal();
|
|
3013
3016
|
}
|
|
3014
3017
|
}
|
|
3015
|
-
function
|
|
3018
|
+
function se(n) {
|
|
3016
3019
|
return n.map((t) => t.clone());
|
|
3017
3020
|
}
|
|
3018
|
-
function
|
|
3021
|
+
function nn(n, t, e, i) {
|
|
3019
3022
|
let r = 0;
|
|
3020
3023
|
const s = n[e - i], o = n[e - i + 1];
|
|
3021
3024
|
let a = 0, l = 0;
|
|
@@ -3025,23 +3028,23 @@ function en(n, t, e, i) {
|
|
|
3025
3028
|
}
|
|
3026
3029
|
return r / 2;
|
|
3027
3030
|
}
|
|
3028
|
-
function
|
|
3031
|
+
function rn(n, t, e, i) {
|
|
3029
3032
|
let r = 0;
|
|
3030
3033
|
for (let s = 0, o = e.length; s < o; ++s) {
|
|
3031
3034
|
const a = e[s];
|
|
3032
|
-
r +=
|
|
3035
|
+
r += nn(n, t, a, i), t = a;
|
|
3033
3036
|
}
|
|
3034
3037
|
return r;
|
|
3035
3038
|
}
|
|
3036
|
-
function
|
|
3039
|
+
function us(n, t, e, i) {
|
|
3037
3040
|
let r = 0;
|
|
3038
3041
|
for (let s = 0, o = e.length; s < o; ++s) {
|
|
3039
3042
|
const a = e[s];
|
|
3040
|
-
r +=
|
|
3043
|
+
r += rn(n, t, a, i), t = a[a.length - 1];
|
|
3041
3044
|
}
|
|
3042
3045
|
return r;
|
|
3043
3046
|
}
|
|
3044
|
-
function
|
|
3047
|
+
function mi(n, t, e, i, r, s, o) {
|
|
3045
3048
|
const a = n[t], l = n[t + 1], h = n[e] - a, c = n[e + 1] - l;
|
|
3046
3049
|
let u;
|
|
3047
3050
|
if (h === 0 && c === 0)
|
|
@@ -3051,10 +3054,10 @@ function yi(n, t, e, i, r, s, o) {
|
|
|
3051
3054
|
if (d > 1)
|
|
3052
3055
|
u = e;
|
|
3053
3056
|
else if (d > 0) {
|
|
3054
|
-
for (let
|
|
3055
|
-
o[
|
|
3056
|
-
n[t +
|
|
3057
|
-
n[e +
|
|
3057
|
+
for (let f = 0; f < i; ++f)
|
|
3058
|
+
o[f] = be(
|
|
3059
|
+
n[t + f],
|
|
3060
|
+
n[e + f],
|
|
3058
3061
|
d
|
|
3059
3062
|
);
|
|
3060
3063
|
o.length = i;
|
|
@@ -3066,10 +3069,10 @@ function yi(n, t, e, i, r, s, o) {
|
|
|
3066
3069
|
o[d] = n[u + d];
|
|
3067
3070
|
o.length = i;
|
|
3068
3071
|
}
|
|
3069
|
-
function
|
|
3072
|
+
function Ie(n, t, e, i, r) {
|
|
3070
3073
|
let s = n[t], o = n[t + 1];
|
|
3071
3074
|
for (t += i; t < e; t += i) {
|
|
3072
|
-
const a = n[t], l = n[t + 1], h =
|
|
3075
|
+
const a = n[t], l = n[t + 1], h = Y(s, o, a, l);
|
|
3073
3076
|
h > r && (r = h), s = a, o = l;
|
|
3074
3077
|
}
|
|
3075
3078
|
return r;
|
|
@@ -3077,23 +3080,23 @@ function Ge(n, t, e, i, r) {
|
|
|
3077
3080
|
function Le(n, t, e, i, r) {
|
|
3078
3081
|
for (let s = 0, o = e.length; s < o; ++s) {
|
|
3079
3082
|
const a = e[s];
|
|
3080
|
-
r =
|
|
3083
|
+
r = Ie(n, t, a, i, r), t = a;
|
|
3081
3084
|
}
|
|
3082
3085
|
return r;
|
|
3083
3086
|
}
|
|
3084
|
-
function
|
|
3087
|
+
function ds(n, t, e, i, r) {
|
|
3085
3088
|
for (let s = 0, o = e.length; s < o; ++s) {
|
|
3086
3089
|
const a = e[s];
|
|
3087
3090
|
r = Le(n, t, a, i, r), t = a[a.length - 1];
|
|
3088
3091
|
}
|
|
3089
3092
|
return r;
|
|
3090
3093
|
}
|
|
3091
|
-
function
|
|
3094
|
+
function Re(n, t, e, i, r, s, o, a, l, h, c) {
|
|
3092
3095
|
if (t == e)
|
|
3093
3096
|
return h;
|
|
3094
3097
|
let u, d;
|
|
3095
3098
|
if (r === 0) {
|
|
3096
|
-
if (d =
|
|
3099
|
+
if (d = Y(
|
|
3097
3100
|
o,
|
|
3098
3101
|
a,
|
|
3099
3102
|
n[t],
|
|
@@ -3106,26 +3109,26 @@ function Ie(n, t, e, i, r, s, o, a, l, h, c) {
|
|
|
3106
3109
|
return h;
|
|
3107
3110
|
}
|
|
3108
3111
|
c = c || [NaN, NaN];
|
|
3109
|
-
let
|
|
3110
|
-
for (;
|
|
3111
|
-
if (
|
|
3112
|
+
let f = t + i;
|
|
3113
|
+
for (; f < e; )
|
|
3114
|
+
if (mi(
|
|
3112
3115
|
n,
|
|
3113
|
-
|
|
3114
|
-
|
|
3116
|
+
f - i,
|
|
3117
|
+
f,
|
|
3115
3118
|
i,
|
|
3116
3119
|
o,
|
|
3117
3120
|
a,
|
|
3118
3121
|
c
|
|
3119
|
-
), d =
|
|
3122
|
+
), d = Y(o, a, c[0], c[1]), d < h) {
|
|
3120
3123
|
for (h = d, u = 0; u < i; ++u)
|
|
3121
3124
|
l[u] = c[u];
|
|
3122
|
-
l.length = i,
|
|
3125
|
+
l.length = i, f += i;
|
|
3123
3126
|
} else
|
|
3124
|
-
|
|
3127
|
+
f += i * Math.max(
|
|
3125
3128
|
(Math.sqrt(d) - Math.sqrt(h)) / r | 0,
|
|
3126
3129
|
1
|
|
3127
3130
|
);
|
|
3128
|
-
if (s && (
|
|
3131
|
+
if (s && (mi(
|
|
3129
3132
|
n,
|
|
3130
3133
|
e - i,
|
|
3131
3134
|
t,
|
|
@@ -3133,21 +3136,21 @@ function Ie(n, t, e, i, r, s, o, a, l, h, c) {
|
|
|
3133
3136
|
o,
|
|
3134
3137
|
a,
|
|
3135
3138
|
c
|
|
3136
|
-
), d =
|
|
3139
|
+
), d = Y(o, a, c[0], c[1]), d < h)) {
|
|
3137
3140
|
for (h = d, u = 0; u < i; ++u)
|
|
3138
3141
|
l[u] = c[u];
|
|
3139
3142
|
l.length = i;
|
|
3140
3143
|
}
|
|
3141
3144
|
return h;
|
|
3142
3145
|
}
|
|
3143
|
-
function
|
|
3146
|
+
function Te(n, t, e, i, r, s, o, a, l, h, c) {
|
|
3144
3147
|
c = c || [NaN, NaN];
|
|
3145
3148
|
for (let u = 0, d = e.length; u < d; ++u) {
|
|
3146
|
-
const
|
|
3147
|
-
h =
|
|
3149
|
+
const f = e[u];
|
|
3150
|
+
h = Re(
|
|
3148
3151
|
n,
|
|
3149
3152
|
t,
|
|
3150
|
-
|
|
3153
|
+
f,
|
|
3151
3154
|
i,
|
|
3152
3155
|
r,
|
|
3153
3156
|
s,
|
|
@@ -3156,18 +3159,18 @@ function Re(n, t, e, i, r, s, o, a, l, h, c) {
|
|
|
3156
3159
|
l,
|
|
3157
3160
|
h,
|
|
3158
3161
|
c
|
|
3159
|
-
), t =
|
|
3162
|
+
), t = f;
|
|
3160
3163
|
}
|
|
3161
3164
|
return h;
|
|
3162
3165
|
}
|
|
3163
|
-
function
|
|
3166
|
+
function fs(n, t, e, i, r, s, o, a, l, h, c) {
|
|
3164
3167
|
c = c || [NaN, NaN];
|
|
3165
3168
|
for (let u = 0, d = e.length; u < d; ++u) {
|
|
3166
|
-
const
|
|
3167
|
-
h =
|
|
3169
|
+
const f = e[u];
|
|
3170
|
+
h = Te(
|
|
3168
3171
|
n,
|
|
3169
3172
|
t,
|
|
3170
|
-
|
|
3173
|
+
f,
|
|
3171
3174
|
i,
|
|
3172
3175
|
r,
|
|
3173
3176
|
s,
|
|
@@ -3176,23 +3179,23 @@ function cs(n, t, e, i, r, s, o, a, l, h, c) {
|
|
|
3176
3179
|
l,
|
|
3177
3180
|
h,
|
|
3178
3181
|
c
|
|
3179
|
-
), t =
|
|
3182
|
+
), t = f[f.length - 1];
|
|
3180
3183
|
}
|
|
3181
3184
|
return h;
|
|
3182
3185
|
}
|
|
3183
|
-
function
|
|
3186
|
+
function Kt(n, t, e, i, r) {
|
|
3184
3187
|
r = r !== void 0 ? r : [];
|
|
3185
3188
|
let s = 0;
|
|
3186
3189
|
for (let o = t; o < e; o += i)
|
|
3187
3190
|
r[s++] = n.slice(o, o + i);
|
|
3188
3191
|
return r.length = s, r;
|
|
3189
3192
|
}
|
|
3190
|
-
function
|
|
3193
|
+
function Ne(n, t, e, i, r) {
|
|
3191
3194
|
r = r !== void 0 ? r : [];
|
|
3192
3195
|
let s = 0;
|
|
3193
3196
|
for (let o = 0, a = e.length; o < a; ++o) {
|
|
3194
3197
|
const l = e[o];
|
|
3195
|
-
r[s++] =
|
|
3198
|
+
r[s++] = Kt(
|
|
3196
3199
|
n,
|
|
3197
3200
|
t,
|
|
3198
3201
|
l,
|
|
@@ -3202,12 +3205,12 @@ function Te(n, t, e, i, r) {
|
|
|
3202
3205
|
}
|
|
3203
3206
|
return r.length = s, r;
|
|
3204
3207
|
}
|
|
3205
|
-
function
|
|
3208
|
+
function gs(n, t, e, i, r) {
|
|
3206
3209
|
r = r !== void 0 ? r : [];
|
|
3207
3210
|
let s = 0;
|
|
3208
3211
|
for (let o = 0, a = e.length; o < a; ++o) {
|
|
3209
3212
|
const l = e[o];
|
|
3210
|
-
r[s++] = l.length === 1 && l[0] === t ? [] :
|
|
3213
|
+
r[s++] = l.length === 1 && l[0] === t ? [] : Ne(
|
|
3211
3214
|
n,
|
|
3212
3215
|
t,
|
|
3213
3216
|
l,
|
|
@@ -3217,7 +3220,7 @@ function us(n, t, e, i, r) {
|
|
|
3217
3220
|
}
|
|
3218
3221
|
return r.length = s, r;
|
|
3219
3222
|
}
|
|
3220
|
-
class
|
|
3223
|
+
class wt extends D {
|
|
3221
3224
|
/**
|
|
3222
3225
|
* @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
|
|
3223
3226
|
* For internal use, flat coordinates in combination with `layout` are also accepted.
|
|
@@ -3241,7 +3244,7 @@ class vt extends Z {
|
|
|
3241
3244
|
* @override
|
|
3242
3245
|
*/
|
|
3243
3246
|
clone() {
|
|
3244
|
-
return new
|
|
3247
|
+
return new wt(this.flatCoordinates.slice(), this.layout);
|
|
3245
3248
|
}
|
|
3246
3249
|
/**
|
|
3247
3250
|
* @param {number} x X.
|
|
@@ -3252,15 +3255,15 @@ class vt extends Z {
|
|
|
3252
3255
|
* @override
|
|
3253
3256
|
*/
|
|
3254
3257
|
closestPointXY(t, e, i, r) {
|
|
3255
|
-
return r <
|
|
3256
|
-
|
|
3258
|
+
return r < K(this.getExtent(), t, e) ? r : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(
|
|
3259
|
+
Ie(
|
|
3257
3260
|
this.flatCoordinates,
|
|
3258
3261
|
0,
|
|
3259
3262
|
this.flatCoordinates.length,
|
|
3260
3263
|
this.stride,
|
|
3261
3264
|
0
|
|
3262
3265
|
)
|
|
3263
|
-
), this.maxDeltaRevision_ = this.getRevision()),
|
|
3266
|
+
), this.maxDeltaRevision_ = this.getRevision()), Re(
|
|
3264
3267
|
this.flatCoordinates,
|
|
3265
3268
|
0,
|
|
3266
3269
|
this.flatCoordinates.length,
|
|
@@ -3279,7 +3282,7 @@ class vt extends Z {
|
|
|
3279
3282
|
* @api
|
|
3280
3283
|
*/
|
|
3281
3284
|
getArea() {
|
|
3282
|
-
return
|
|
3285
|
+
return nn(
|
|
3283
3286
|
this.flatCoordinates,
|
|
3284
3287
|
0,
|
|
3285
3288
|
this.flatCoordinates.length,
|
|
@@ -3293,7 +3296,7 @@ class vt extends Z {
|
|
|
3293
3296
|
* @override
|
|
3294
3297
|
*/
|
|
3295
3298
|
getCoordinates() {
|
|
3296
|
-
return
|
|
3299
|
+
return Kt(
|
|
3297
3300
|
this.flatCoordinates,
|
|
3298
3301
|
0,
|
|
3299
3302
|
this.flatCoordinates.length,
|
|
@@ -3308,7 +3311,7 @@ class vt extends Z {
|
|
|
3308
3311
|
*/
|
|
3309
3312
|
getSimplifiedGeometryInternal(t) {
|
|
3310
3313
|
const e = [];
|
|
3311
|
-
return e.length =
|
|
3314
|
+
return e.length = qt(
|
|
3312
3315
|
this.flatCoordinates,
|
|
3313
3316
|
0,
|
|
3314
3317
|
this.flatCoordinates.length,
|
|
@@ -3316,7 +3319,7 @@ class vt extends Z {
|
|
|
3316
3319
|
t,
|
|
3317
3320
|
e,
|
|
3318
3321
|
0
|
|
3319
|
-
), new
|
|
3322
|
+
), new wt(e, "XY");
|
|
3320
3323
|
}
|
|
3321
3324
|
/**
|
|
3322
3325
|
* Get the type of this geometry.
|
|
@@ -3345,7 +3348,7 @@ class vt extends Z {
|
|
|
3345
3348
|
* @override
|
|
3346
3349
|
*/
|
|
3347
3350
|
setCoordinates(t, e) {
|
|
3348
|
-
this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length =
|
|
3351
|
+
this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = Wt(
|
|
3349
3352
|
this.flatCoordinates,
|
|
3350
3353
|
0,
|
|
3351
3354
|
t,
|
|
@@ -3353,7 +3356,7 @@ class vt extends Z {
|
|
|
3353
3356
|
), this.changed();
|
|
3354
3357
|
}
|
|
3355
3358
|
}
|
|
3356
|
-
function
|
|
3359
|
+
function sn(n, t, e, i, r) {
|
|
3357
3360
|
let s;
|
|
3358
3361
|
for (t += i; t < e; t += i)
|
|
3359
3362
|
if (s = r(
|
|
@@ -3363,8 +3366,8 @@ function rn(n, t, e, i, r) {
|
|
|
3363
3366
|
return s;
|
|
3364
3367
|
return !1;
|
|
3365
3368
|
}
|
|
3366
|
-
function
|
|
3367
|
-
return s = s ??
|
|
3369
|
+
function Dt(n, t, e, i, r, s) {
|
|
3370
|
+
return s = s ?? Hi(ve(), n, t, e, i), wr(r, s) ? s[0] >= r[0] && s[2] <= r[2] || s[1] >= r[1] && s[3] <= r[3] ? !0 : sn(
|
|
3368
3371
|
n,
|
|
3369
3372
|
t,
|
|
3370
3373
|
e,
|
|
@@ -3376,20 +3379,20 @@ function Zt(n, t, e, i, r, s) {
|
|
|
3376
3379
|
* `false` otherwise.
|
|
3377
3380
|
*/
|
|
3378
3381
|
function(o, a) {
|
|
3379
|
-
return
|
|
3382
|
+
return br(r, o, a);
|
|
3380
3383
|
}
|
|
3381
3384
|
) : !1;
|
|
3382
3385
|
}
|
|
3383
|
-
function
|
|
3386
|
+
function ps(n, t, e, i, r) {
|
|
3384
3387
|
for (let s = 0, o = e.length; s < o; ++s) {
|
|
3385
|
-
if (
|
|
3388
|
+
if (Dt(n, t, e[s], i, r))
|
|
3386
3389
|
return !0;
|
|
3387
3390
|
t = e[s];
|
|
3388
3391
|
}
|
|
3389
3392
|
return !1;
|
|
3390
3393
|
}
|
|
3391
|
-
function
|
|
3392
|
-
return !!(
|
|
3394
|
+
function ys(n, t, e, i, r) {
|
|
3395
|
+
return !!(Dt(n, t, e, i, r) || j(
|
|
3393
3396
|
n,
|
|
3394
3397
|
t,
|
|
3395
3398
|
e,
|
|
@@ -3419,19 +3422,19 @@ function gs(n, t, e, i, r) {
|
|
|
3419
3422
|
r[3]
|
|
3420
3423
|
));
|
|
3421
3424
|
}
|
|
3422
|
-
function
|
|
3423
|
-
if (!
|
|
3425
|
+
function on(n, t, e, i, r) {
|
|
3426
|
+
if (!ys(n, t, e[0], i, r))
|
|
3424
3427
|
return !1;
|
|
3425
3428
|
if (e.length === 1)
|
|
3426
3429
|
return !0;
|
|
3427
3430
|
for (let s = 1, o = e.length; s < o; ++s)
|
|
3428
|
-
if (
|
|
3431
|
+
if (rs(
|
|
3429
3432
|
n,
|
|
3430
3433
|
e[s - 1],
|
|
3431
3434
|
e[s],
|
|
3432
3435
|
i,
|
|
3433
3436
|
r
|
|
3434
|
-
) && !
|
|
3437
|
+
) && !Dt(
|
|
3435
3438
|
n,
|
|
3436
3439
|
e[s - 1],
|
|
3437
3440
|
e[s],
|
|
@@ -3441,16 +3444,16 @@ function sn(n, t, e, i, r) {
|
|
|
3441
3444
|
return !1;
|
|
3442
3445
|
return !0;
|
|
3443
3446
|
}
|
|
3444
|
-
function
|
|
3447
|
+
function ms(n, t, e, i, r) {
|
|
3445
3448
|
for (let s = 0, o = e.length; s < o; ++s) {
|
|
3446
3449
|
const a = e[s];
|
|
3447
|
-
if (
|
|
3450
|
+
if (on(n, t, a, i, r))
|
|
3448
3451
|
return !0;
|
|
3449
3452
|
t = a[a.length - 1];
|
|
3450
3453
|
}
|
|
3451
3454
|
return !1;
|
|
3452
3455
|
}
|
|
3453
|
-
function
|
|
3456
|
+
function an(n, t, e, i) {
|
|
3454
3457
|
let r = n[t], s = n[t + 1], o = 0;
|
|
3455
3458
|
for (let a = t + i; a < e; a += i) {
|
|
3456
3459
|
const l = n[a], h = n[a + 1];
|
|
@@ -3458,7 +3461,7 @@ function ps(n, t, e, i) {
|
|
|
3458
3461
|
}
|
|
3459
3462
|
return o;
|
|
3460
3463
|
}
|
|
3461
|
-
class
|
|
3464
|
+
class z extends D {
|
|
3462
3465
|
/**
|
|
3463
3466
|
* @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
|
|
3464
3467
|
* For internal use, flat coordinates in combination with `layout` are also accepted.
|
|
@@ -3490,7 +3493,7 @@ class V extends Z {
|
|
|
3490
3493
|
* @override
|
|
3491
3494
|
*/
|
|
3492
3495
|
clone() {
|
|
3493
|
-
const t = new
|
|
3496
|
+
const t = new z(
|
|
3494
3497
|
this.flatCoordinates.slice(),
|
|
3495
3498
|
this.layout
|
|
3496
3499
|
);
|
|
@@ -3505,15 +3508,15 @@ class V extends Z {
|
|
|
3505
3508
|
* @override
|
|
3506
3509
|
*/
|
|
3507
3510
|
closestPointXY(t, e, i, r) {
|
|
3508
|
-
return r <
|
|
3509
|
-
|
|
3511
|
+
return r < K(this.getExtent(), t, e) ? r : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(
|
|
3512
|
+
Ie(
|
|
3510
3513
|
this.flatCoordinates,
|
|
3511
3514
|
0,
|
|
3512
3515
|
this.flatCoordinates.length,
|
|
3513
3516
|
this.stride,
|
|
3514
3517
|
0
|
|
3515
3518
|
)
|
|
3516
|
-
), this.maxDeltaRevision_ = this.getRevision()),
|
|
3519
|
+
), this.maxDeltaRevision_ = this.getRevision()), Re(
|
|
3517
3520
|
this.flatCoordinates,
|
|
3518
3521
|
0,
|
|
3519
3522
|
this.flatCoordinates.length,
|
|
@@ -3538,7 +3541,7 @@ class V extends Z {
|
|
|
3538
3541
|
* @api
|
|
3539
3542
|
*/
|
|
3540
3543
|
forEachSegment(t) {
|
|
3541
|
-
return
|
|
3544
|
+
return sn(
|
|
3542
3545
|
this.flatCoordinates,
|
|
3543
3546
|
0,
|
|
3544
3547
|
this.flatCoordinates.length,
|
|
@@ -3561,7 +3564,7 @@ class V extends Z {
|
|
|
3561
3564
|
* @api
|
|
3562
3565
|
*/
|
|
3563
3566
|
getCoordinateAtM(t, e) {
|
|
3564
|
-
return this.layout != "XYM" && this.layout != "XYZM" ? null : (e = e !== void 0 ? e : !1,
|
|
3567
|
+
return this.layout != "XYM" && this.layout != "XYZM" ? null : (e = e !== void 0 ? e : !1, ue(
|
|
3565
3568
|
this.flatCoordinates,
|
|
3566
3569
|
0,
|
|
3567
3570
|
this.flatCoordinates.length,
|
|
@@ -3577,7 +3580,7 @@ class V extends Z {
|
|
|
3577
3580
|
* @override
|
|
3578
3581
|
*/
|
|
3579
3582
|
getCoordinates() {
|
|
3580
|
-
return
|
|
3583
|
+
return Kt(
|
|
3581
3584
|
this.flatCoordinates,
|
|
3582
3585
|
0,
|
|
3583
3586
|
this.flatCoordinates.length,
|
|
@@ -3595,7 +3598,7 @@ class V extends Z {
|
|
|
3595
3598
|
* @api
|
|
3596
3599
|
*/
|
|
3597
3600
|
getCoordinateAt(t, e) {
|
|
3598
|
-
return
|
|
3601
|
+
return Ut(
|
|
3599
3602
|
this.flatCoordinates,
|
|
3600
3603
|
0,
|
|
3601
3604
|
this.flatCoordinates.length,
|
|
@@ -3611,7 +3614,7 @@ class V extends Z {
|
|
|
3611
3614
|
* @api
|
|
3612
3615
|
*/
|
|
3613
3616
|
getLength() {
|
|
3614
|
-
return
|
|
3617
|
+
return an(
|
|
3615
3618
|
this.flatCoordinates,
|
|
3616
3619
|
0,
|
|
3617
3620
|
this.flatCoordinates.length,
|
|
@@ -3636,7 +3639,7 @@ class V extends Z {
|
|
|
3636
3639
|
*/
|
|
3637
3640
|
getSimplifiedGeometryInternal(t) {
|
|
3638
3641
|
const e = [];
|
|
3639
|
-
return e.length =
|
|
3642
|
+
return e.length = qt(
|
|
3640
3643
|
this.flatCoordinates,
|
|
3641
3644
|
0,
|
|
3642
3645
|
this.flatCoordinates.length,
|
|
@@ -3644,7 +3647,7 @@ class V extends Z {
|
|
|
3644
3647
|
t,
|
|
3645
3648
|
e,
|
|
3646
3649
|
0
|
|
3647
|
-
), new
|
|
3650
|
+
), new z(e, "XY");
|
|
3648
3651
|
}
|
|
3649
3652
|
/**
|
|
3650
3653
|
* Get the type of this geometry.
|
|
@@ -3663,7 +3666,7 @@ class V extends Z {
|
|
|
3663
3666
|
* @override
|
|
3664
3667
|
*/
|
|
3665
3668
|
intersectsExtent(t) {
|
|
3666
|
-
return
|
|
3669
|
+
return Dt(
|
|
3667
3670
|
this.flatCoordinates,
|
|
3668
3671
|
0,
|
|
3669
3672
|
this.flatCoordinates.length,
|
|
@@ -3680,7 +3683,7 @@ class V extends Z {
|
|
|
3680
3683
|
* @override
|
|
3681
3684
|
*/
|
|
3682
3685
|
setCoordinates(t, e) {
|
|
3683
|
-
this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length =
|
|
3686
|
+
this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = Wt(
|
|
3684
3687
|
this.flatCoordinates,
|
|
3685
3688
|
0,
|
|
3686
3689
|
t,
|
|
@@ -3688,7 +3691,7 @@ class V extends Z {
|
|
|
3688
3691
|
), this.changed();
|
|
3689
3692
|
}
|
|
3690
3693
|
}
|
|
3691
|
-
class Ct extends
|
|
3694
|
+
class Ct extends D {
|
|
3692
3695
|
/**
|
|
3693
3696
|
* @param {Array<Array<import("../coordinate.js").Coordinate>|LineString>|Array<number>} coordinates
|
|
3694
3697
|
* Coordinates or LineString geometries. (For internal use, flat coordinates in
|
|
@@ -3753,7 +3756,7 @@ class Ct extends Z {
|
|
|
3753
3756
|
* @override
|
|
3754
3757
|
*/
|
|
3755
3758
|
closestPointXY(t, e, i, r) {
|
|
3756
|
-
return r <
|
|
3759
|
+
return r < K(this.getExtent(), t, e) ? r : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(
|
|
3757
3760
|
Le(
|
|
3758
3761
|
this.flatCoordinates,
|
|
3759
3762
|
0,
|
|
@@ -3761,7 +3764,7 @@ class Ct extends Z {
|
|
|
3761
3764
|
this.stride,
|
|
3762
3765
|
0
|
|
3763
3766
|
)
|
|
3764
|
-
), this.maxDeltaRevision_ = this.getRevision()),
|
|
3767
|
+
), this.maxDeltaRevision_ = this.getRevision()), Te(
|
|
3765
3768
|
this.flatCoordinates,
|
|
3766
3769
|
0,
|
|
3767
3770
|
this.ends_,
|
|
@@ -3797,7 +3800,7 @@ class Ct extends Z {
|
|
|
3797
3800
|
* @api
|
|
3798
3801
|
*/
|
|
3799
3802
|
getCoordinateAtM(t, e, i) {
|
|
3800
|
-
return this.layout != "XYM" && this.layout != "XYZM" || this.flatCoordinates.length === 0 ? null : (e = e !== void 0 ? e : !1, i = i !== void 0 ? i : !1,
|
|
3803
|
+
return this.layout != "XYM" && this.layout != "XYZM" || this.flatCoordinates.length === 0 ? null : (e = e !== void 0 ? e : !1, i = i !== void 0 ? i : !1, os(
|
|
3801
3804
|
this.flatCoordinates,
|
|
3802
3805
|
0,
|
|
3803
3806
|
this.ends_,
|
|
@@ -3814,7 +3817,7 @@ class Ct extends Z {
|
|
|
3814
3817
|
* @override
|
|
3815
3818
|
*/
|
|
3816
3819
|
getCoordinates() {
|
|
3817
|
-
return
|
|
3820
|
+
return Ne(
|
|
3818
3821
|
this.flatCoordinates,
|
|
3819
3822
|
0,
|
|
3820
3823
|
this.ends_,
|
|
@@ -3834,7 +3837,7 @@ class Ct extends Z {
|
|
|
3834
3837
|
* @api
|
|
3835
3838
|
*/
|
|
3836
3839
|
getLineString(t) {
|
|
3837
|
-
return t < 0 || this.ends_.length <= t ? null : new
|
|
3840
|
+
return t < 0 || this.ends_.length <= t ? null : new z(
|
|
3838
3841
|
this.flatCoordinates.slice(
|
|
3839
3842
|
t === 0 ? 0 : this.ends_[t - 1],
|
|
3840
3843
|
this.ends_[t]
|
|
@@ -3851,7 +3854,7 @@ class Ct extends Z {
|
|
|
3851
3854
|
const t = this.flatCoordinates, e = this.ends_, i = this.layout, r = [];
|
|
3852
3855
|
let s = 0;
|
|
3853
3856
|
for (let o = 0, a = e.length; o < a; ++o) {
|
|
3854
|
-
const l = e[o], h = new
|
|
3857
|
+
const l = e[o], h = new z(
|
|
3855
3858
|
t.slice(s, l),
|
|
3856
3859
|
i
|
|
3857
3860
|
);
|
|
@@ -3859,6 +3862,23 @@ class Ct extends Z {
|
|
|
3859
3862
|
}
|
|
3860
3863
|
return r;
|
|
3861
3864
|
}
|
|
3865
|
+
/**
|
|
3866
|
+
* Return the sum of all line string lengths
|
|
3867
|
+
* @return {number} Length (on projected plane).
|
|
3868
|
+
* @api
|
|
3869
|
+
*/
|
|
3870
|
+
getLength() {
|
|
3871
|
+
const t = this.ends_;
|
|
3872
|
+
let e = 0, i = 0;
|
|
3873
|
+
for (let r = 0, s = t.length; r < s; ++r)
|
|
3874
|
+
i += an(
|
|
3875
|
+
this.flatCoordinates,
|
|
3876
|
+
e,
|
|
3877
|
+
t[r],
|
|
3878
|
+
this.stride
|
|
3879
|
+
), e = t[r];
|
|
3880
|
+
return i;
|
|
3881
|
+
}
|
|
3862
3882
|
/**
|
|
3863
3883
|
* @return {Array<number>} Flat midpoints.
|
|
3864
3884
|
*/
|
|
@@ -3867,7 +3887,7 @@ class Ct extends Z {
|
|
|
3867
3887
|
let i = 0;
|
|
3868
3888
|
const r = this.ends_, s = this.stride;
|
|
3869
3889
|
for (let o = 0, a = r.length; o < a; ++o) {
|
|
3870
|
-
const l = r[o], h =
|
|
3890
|
+
const l = r[o], h = Ut(
|
|
3871
3891
|
e,
|
|
3872
3892
|
i,
|
|
3873
3893
|
l,
|
|
@@ -3886,7 +3906,7 @@ class Ct extends Z {
|
|
|
3886
3906
|
*/
|
|
3887
3907
|
getSimplifiedGeometryInternal(t) {
|
|
3888
3908
|
const e = [], i = [];
|
|
3889
|
-
return e.length =
|
|
3909
|
+
return e.length = en(
|
|
3890
3910
|
this.flatCoordinates,
|
|
3891
3911
|
0,
|
|
3892
3912
|
this.ends_,
|
|
@@ -3914,7 +3934,7 @@ class Ct extends Z {
|
|
|
3914
3934
|
* @override
|
|
3915
3935
|
*/
|
|
3916
3936
|
intersectsExtent(t) {
|
|
3917
|
-
return
|
|
3937
|
+
return ps(
|
|
3918
3938
|
this.flatCoordinates,
|
|
3919
3939
|
0,
|
|
3920
3940
|
this.ends_,
|
|
@@ -3931,7 +3951,7 @@ class Ct extends Z {
|
|
|
3931
3951
|
*/
|
|
3932
3952
|
setCoordinates(t, e) {
|
|
3933
3953
|
this.setLayout(e, t, 2), this.flatCoordinates || (this.flatCoordinates = []);
|
|
3934
|
-
const i =
|
|
3954
|
+
const i = At(
|
|
3935
3955
|
this.flatCoordinates,
|
|
3936
3956
|
0,
|
|
3937
3957
|
t,
|
|
@@ -3941,7 +3961,7 @@ class Ct extends Z {
|
|
|
3941
3961
|
this.flatCoordinates.length = i.length === 0 ? 0 : i[i.length - 1], this.changed();
|
|
3942
3962
|
}
|
|
3943
3963
|
}
|
|
3944
|
-
class
|
|
3964
|
+
class J extends D {
|
|
3945
3965
|
/**
|
|
3946
3966
|
* @param {import("../coordinate.js").Coordinate} coordinates Coordinates.
|
|
3947
3967
|
* @param {import("./Geometry.js").GeometryLayout} [layout] Layout.
|
|
@@ -3956,7 +3976,7 @@ class z extends Z {
|
|
|
3956
3976
|
* @override
|
|
3957
3977
|
*/
|
|
3958
3978
|
clone() {
|
|
3959
|
-
const t = new
|
|
3979
|
+
const t = new J(this.flatCoordinates.slice(), this.layout);
|
|
3960
3980
|
return t.applyProperties(this), t;
|
|
3961
3981
|
}
|
|
3962
3982
|
/**
|
|
@@ -3968,7 +3988,7 @@ class z extends Z {
|
|
|
3968
3988
|
* @override
|
|
3969
3989
|
*/
|
|
3970
3990
|
closestPointXY(t, e, i, r) {
|
|
3971
|
-
const s = this.flatCoordinates, o =
|
|
3991
|
+
const s = this.flatCoordinates, o = Y(
|
|
3972
3992
|
t,
|
|
3973
3993
|
e,
|
|
3974
3994
|
s[0],
|
|
@@ -3998,7 +4018,7 @@ class z extends Z {
|
|
|
3998
4018
|
* @override
|
|
3999
4019
|
*/
|
|
4000
4020
|
computeExtent(t) {
|
|
4001
|
-
return
|
|
4021
|
+
return ji(this.flatCoordinates, t);
|
|
4002
4022
|
}
|
|
4003
4023
|
/**
|
|
4004
4024
|
* Get the type of this geometry.
|
|
@@ -4017,7 +4037,7 @@ class z extends Z {
|
|
|
4017
4037
|
* @override
|
|
4018
4038
|
*/
|
|
4019
4039
|
intersectsExtent(t) {
|
|
4020
|
-
return
|
|
4040
|
+
return Oi(t, this.flatCoordinates[0], this.flatCoordinates[1]);
|
|
4021
4041
|
}
|
|
4022
4042
|
/**
|
|
4023
4043
|
* @param {!Array<*>} coordinates Coordinates.
|
|
@@ -4026,7 +4046,7 @@ class z extends Z {
|
|
|
4026
4046
|
* @override
|
|
4027
4047
|
*/
|
|
4028
4048
|
setCoordinates(t, e) {
|
|
4029
|
-
this.setLayout(e, t, 0), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length =
|
|
4049
|
+
this.setLayout(e, t, 0), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = ns(
|
|
4030
4050
|
this.flatCoordinates,
|
|
4031
4051
|
0,
|
|
4032
4052
|
t,
|
|
@@ -4034,7 +4054,7 @@ class z extends Z {
|
|
|
4034
4054
|
), this.changed();
|
|
4035
4055
|
}
|
|
4036
4056
|
}
|
|
4037
|
-
class
|
|
4057
|
+
class Ft extends D {
|
|
4038
4058
|
/**
|
|
4039
4059
|
* @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
|
|
4040
4060
|
* For internal use, flat coordinates in combination with `layout` are also accepted.
|
|
@@ -4066,7 +4086,7 @@ class At extends Z {
|
|
|
4066
4086
|
* @override
|
|
4067
4087
|
*/
|
|
4068
4088
|
clone() {
|
|
4069
|
-
const t = new
|
|
4089
|
+
const t = new Ft(
|
|
4070
4090
|
this.flatCoordinates.slice(),
|
|
4071
4091
|
this.layout
|
|
4072
4092
|
);
|
|
@@ -4081,11 +4101,11 @@ class At extends Z {
|
|
|
4081
4101
|
* @override
|
|
4082
4102
|
*/
|
|
4083
4103
|
closestPointXY(t, e, i, r) {
|
|
4084
|
-
if (r <
|
|
4104
|
+
if (r < K(this.getExtent(), t, e))
|
|
4085
4105
|
return r;
|
|
4086
4106
|
const s = this.flatCoordinates, o = this.stride;
|
|
4087
4107
|
for (let a = 0, l = s.length; a < l; a += o) {
|
|
4088
|
-
const h =
|
|
4108
|
+
const h = Y(
|
|
4089
4109
|
t,
|
|
4090
4110
|
e,
|
|
4091
4111
|
s[a],
|
|
@@ -4107,7 +4127,7 @@ class At extends Z {
|
|
|
4107
4127
|
* @override
|
|
4108
4128
|
*/
|
|
4109
4129
|
getCoordinates() {
|
|
4110
|
-
return
|
|
4130
|
+
return Kt(
|
|
4111
4131
|
this.flatCoordinates,
|
|
4112
4132
|
0,
|
|
4113
4133
|
this.flatCoordinates.length,
|
|
@@ -4122,7 +4142,7 @@ class At extends Z {
|
|
|
4122
4142
|
*/
|
|
4123
4143
|
getPoint(t) {
|
|
4124
4144
|
const e = this.flatCoordinates.length / this.stride;
|
|
4125
|
-
return t < 0 || e <= t ? null : new
|
|
4145
|
+
return t < 0 || e <= t ? null : new J(
|
|
4126
4146
|
this.flatCoordinates.slice(
|
|
4127
4147
|
t * this.stride,
|
|
4128
4148
|
(t + 1) * this.stride
|
|
@@ -4138,7 +4158,7 @@ class At extends Z {
|
|
|
4138
4158
|
getPoints() {
|
|
4139
4159
|
const t = this.flatCoordinates, e = this.layout, i = this.stride, r = [];
|
|
4140
4160
|
for (let s = 0, o = t.length; s < o; s += i) {
|
|
4141
|
-
const a = new
|
|
4161
|
+
const a = new J(t.slice(s, s + i), e);
|
|
4142
4162
|
r.push(a);
|
|
4143
4163
|
}
|
|
4144
4164
|
return r;
|
|
@@ -4163,7 +4183,7 @@ class At extends Z {
|
|
|
4163
4183
|
const e = this.flatCoordinates, i = this.stride;
|
|
4164
4184
|
for (let r = 0, s = e.length; r < s; r += i) {
|
|
4165
4185
|
const o = e[r], a = e[r + 1];
|
|
4166
|
-
if (
|
|
4186
|
+
if (Oi(t, o, a))
|
|
4167
4187
|
return !0;
|
|
4168
4188
|
}
|
|
4169
4189
|
return !1;
|
|
@@ -4176,7 +4196,7 @@ class At extends Z {
|
|
|
4176
4196
|
* @override
|
|
4177
4197
|
*/
|
|
4178
4198
|
setCoordinates(t, e) {
|
|
4179
|
-
this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length =
|
|
4199
|
+
this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = Wt(
|
|
4180
4200
|
this.flatCoordinates,
|
|
4181
4201
|
0,
|
|
4182
4202
|
t,
|
|
@@ -4184,7 +4204,7 @@ class At extends Z {
|
|
|
4184
4204
|
), this.changed();
|
|
4185
4205
|
}
|
|
4186
4206
|
}
|
|
4187
|
-
class
|
|
4207
|
+
class W extends D {
|
|
4188
4208
|
/**
|
|
4189
4209
|
* @param {!Array<Array<import("../coordinate.js").Coordinate>>|!Array<number>} coordinates
|
|
4190
4210
|
* Array of linear rings that define the polygon. The first linear ring of the
|
|
@@ -4222,7 +4242,7 @@ class J extends Z {
|
|
|
4222
4242
|
* @override
|
|
4223
4243
|
*/
|
|
4224
4244
|
clone() {
|
|
4225
|
-
const t = new
|
|
4245
|
+
const t = new W(
|
|
4226
4246
|
this.flatCoordinates.slice(),
|
|
4227
4247
|
this.layout,
|
|
4228
4248
|
this.ends_.slice()
|
|
@@ -4238,7 +4258,7 @@ class J extends Z {
|
|
|
4238
4258
|
* @override
|
|
4239
4259
|
*/
|
|
4240
4260
|
closestPointXY(t, e, i, r) {
|
|
4241
|
-
return r <
|
|
4261
|
+
return r < K(this.getExtent(), t, e) ? r : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(
|
|
4242
4262
|
Le(
|
|
4243
4263
|
this.flatCoordinates,
|
|
4244
4264
|
0,
|
|
@@ -4246,7 +4266,7 @@ class J extends Z {
|
|
|
4246
4266
|
this.stride,
|
|
4247
4267
|
0
|
|
4248
4268
|
)
|
|
4249
|
-
), this.maxDeltaRevision_ = this.getRevision()),
|
|
4269
|
+
), this.maxDeltaRevision_ = this.getRevision()), Te(
|
|
4250
4270
|
this.flatCoordinates,
|
|
4251
4271
|
0,
|
|
4252
4272
|
this.ends_,
|
|
@@ -4266,7 +4286,7 @@ class J extends Z {
|
|
|
4266
4286
|
* @override
|
|
4267
4287
|
*/
|
|
4268
4288
|
containsXY(t, e) {
|
|
4269
|
-
return
|
|
4289
|
+
return Se(
|
|
4270
4290
|
this.getOrientedFlatCoordinates(),
|
|
4271
4291
|
0,
|
|
4272
4292
|
this.ends_,
|
|
@@ -4281,7 +4301,7 @@ class J extends Z {
|
|
|
4281
4301
|
* @api
|
|
4282
4302
|
*/
|
|
4283
4303
|
getArea() {
|
|
4284
|
-
return
|
|
4304
|
+
return rn(
|
|
4285
4305
|
this.getOrientedFlatCoordinates(),
|
|
4286
4306
|
0,
|
|
4287
4307
|
this.ends_,
|
|
@@ -4304,7 +4324,7 @@ class J extends Z {
|
|
|
4304
4324
|
*/
|
|
4305
4325
|
getCoordinates(t) {
|
|
4306
4326
|
let e;
|
|
4307
|
-
return t !== void 0 ? (e = this.getOrientedFlatCoordinates().slice(),
|
|
4327
|
+
return t !== void 0 ? (e = this.getOrientedFlatCoordinates().slice(), Xt(e, 0, this.ends_, this.stride, t)) : e = this.flatCoordinates, Ne(e, 0, this.ends_, this.stride);
|
|
4308
4328
|
}
|
|
4309
4329
|
/**
|
|
4310
4330
|
* @return {Array<number>} Ends.
|
|
@@ -4317,8 +4337,8 @@ class J extends Z {
|
|
|
4317
4337
|
*/
|
|
4318
4338
|
getFlatInteriorPoint() {
|
|
4319
4339
|
if (this.flatInteriorPointRevision_ != this.getRevision()) {
|
|
4320
|
-
const t =
|
|
4321
|
-
this.flatInteriorPoint_ =
|
|
4340
|
+
const t = Vt(this.getExtent());
|
|
4341
|
+
this.flatInteriorPoint_ = $e(
|
|
4322
4342
|
this.getOrientedFlatCoordinates(),
|
|
4323
4343
|
0,
|
|
4324
4344
|
this.ends_,
|
|
@@ -4339,7 +4359,7 @@ class J extends Z {
|
|
|
4339
4359
|
* @api
|
|
4340
4360
|
*/
|
|
4341
4361
|
getInteriorPoint() {
|
|
4342
|
-
return new
|
|
4362
|
+
return new J(this.getFlatInteriorPoint(), "XYM");
|
|
4343
4363
|
}
|
|
4344
4364
|
/**
|
|
4345
4365
|
* Return the number of rings of the polygon, this includes the exterior
|
|
@@ -4362,7 +4382,7 @@ class J extends Z {
|
|
|
4362
4382
|
* @api
|
|
4363
4383
|
*/
|
|
4364
4384
|
getLinearRing(t) {
|
|
4365
|
-
return t < 0 || this.ends_.length <= t ? null : new
|
|
4385
|
+
return t < 0 || this.ends_.length <= t ? null : new wt(
|
|
4366
4386
|
this.flatCoordinates.slice(
|
|
4367
4387
|
t === 0 ? 0 : this.ends_[t - 1],
|
|
4368
4388
|
this.ends_[t]
|
|
@@ -4379,7 +4399,7 @@ class J extends Z {
|
|
|
4379
4399
|
const t = this.layout, e = this.flatCoordinates, i = this.ends_, r = [];
|
|
4380
4400
|
let s = 0;
|
|
4381
4401
|
for (let o = 0, a = i.length; o < a; ++o) {
|
|
4382
|
-
const l = i[o], h = new
|
|
4402
|
+
const l = i[o], h = new wt(
|
|
4383
4403
|
e.slice(s, l),
|
|
4384
4404
|
t
|
|
4385
4405
|
);
|
|
@@ -4393,7 +4413,7 @@ class J extends Z {
|
|
|
4393
4413
|
getOrientedFlatCoordinates() {
|
|
4394
4414
|
if (this.orientedRevision_ != this.getRevision()) {
|
|
4395
4415
|
const t = this.flatCoordinates;
|
|
4396
|
-
|
|
4416
|
+
Fe(t, 0, this.ends_, this.stride) ? this.orientedFlatCoordinates_ = t : (this.orientedFlatCoordinates_ = t.slice(), this.orientedFlatCoordinates_.length = Xt(
|
|
4397
4417
|
this.orientedFlatCoordinates_,
|
|
4398
4418
|
0,
|
|
4399
4419
|
this.ends_,
|
|
@@ -4413,7 +4433,7 @@ class J extends Z {
|
|
|
4413
4433
|
*/
|
|
4414
4434
|
getSimplifiedGeometryInternal(t) {
|
|
4415
4435
|
const e = [], i = [];
|
|
4416
|
-
return e.length =
|
|
4436
|
+
return e.length = Ge(
|
|
4417
4437
|
this.flatCoordinates,
|
|
4418
4438
|
0,
|
|
4419
4439
|
this.ends_,
|
|
@@ -4422,7 +4442,7 @@ class J extends Z {
|
|
|
4422
4442
|
e,
|
|
4423
4443
|
0,
|
|
4424
4444
|
i
|
|
4425
|
-
), new
|
|
4445
|
+
), new W(e, "XY", i);
|
|
4426
4446
|
}
|
|
4427
4447
|
/**
|
|
4428
4448
|
* Get the type of this geometry.
|
|
@@ -4441,7 +4461,7 @@ class J extends Z {
|
|
|
4441
4461
|
* @override
|
|
4442
4462
|
*/
|
|
4443
4463
|
intersectsExtent(t) {
|
|
4444
|
-
return
|
|
4464
|
+
return on(
|
|
4445
4465
|
this.getOrientedFlatCoordinates(),
|
|
4446
4466
|
0,
|
|
4447
4467
|
this.ends_,
|
|
@@ -4458,7 +4478,7 @@ class J extends Z {
|
|
|
4458
4478
|
*/
|
|
4459
4479
|
setCoordinates(t, e) {
|
|
4460
4480
|
this.setLayout(e, t, 2), this.flatCoordinates || (this.flatCoordinates = []);
|
|
4461
|
-
const i =
|
|
4481
|
+
const i = At(
|
|
4462
4482
|
this.flatCoordinates,
|
|
4463
4483
|
0,
|
|
4464
4484
|
t,
|
|
@@ -4468,7 +4488,7 @@ class J extends Z {
|
|
|
4468
4488
|
this.flatCoordinates.length = i.length === 0 ? 0 : i[i.length - 1], this.changed();
|
|
4469
4489
|
}
|
|
4470
4490
|
}
|
|
4471
|
-
class
|
|
4491
|
+
class bt extends D {
|
|
4472
4492
|
/**
|
|
4473
4493
|
* @param {Array<Array<Array<import("../coordinate.js").Coordinate>>|Polygon>|Array<number>} coordinates Coordinates.
|
|
4474
4494
|
* For internal use, flat coordinates in combination with `layout` and `endss` are also accepted.
|
|
@@ -4483,7 +4503,7 @@ class wt extends Z {
|
|
|
4483
4503
|
), s = [], o = [];
|
|
4484
4504
|
for (let a = 0, l = r.length; a < l; ++a) {
|
|
4485
4505
|
const h = r[a], c = s.length, u = h.getEnds();
|
|
4486
|
-
for (let d = 0,
|
|
4506
|
+
for (let d = 0, f = u.length; d < f; ++d)
|
|
4487
4507
|
u[d] += c;
|
|
4488
4508
|
A(s, h.getFlatCoordinates()), o.push(u);
|
|
4489
4509
|
}
|
|
@@ -4526,7 +4546,7 @@ class wt extends Z {
|
|
|
4526
4546
|
const t = this.endss_.length, e = new Array(t);
|
|
4527
4547
|
for (let r = 0; r < t; ++r)
|
|
4528
4548
|
e[r] = this.endss_[r].slice();
|
|
4529
|
-
const i = new
|
|
4549
|
+
const i = new bt(
|
|
4530
4550
|
this.flatCoordinates.slice(),
|
|
4531
4551
|
this.layout,
|
|
4532
4552
|
e
|
|
@@ -4542,15 +4562,15 @@ class wt extends Z {
|
|
|
4542
4562
|
* @override
|
|
4543
4563
|
*/
|
|
4544
4564
|
closestPointXY(t, e, i, r) {
|
|
4545
|
-
return r <
|
|
4546
|
-
|
|
4565
|
+
return r < K(this.getExtent(), t, e) ? r : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(
|
|
4566
|
+
ds(
|
|
4547
4567
|
this.flatCoordinates,
|
|
4548
4568
|
0,
|
|
4549
4569
|
this.endss_,
|
|
4550
4570
|
this.stride,
|
|
4551
4571
|
0
|
|
4552
4572
|
)
|
|
4553
|
-
), this.maxDeltaRevision_ = this.getRevision()),
|
|
4573
|
+
), this.maxDeltaRevision_ = this.getRevision()), fs(
|
|
4554
4574
|
this.getOrientedFlatCoordinates(),
|
|
4555
4575
|
0,
|
|
4556
4576
|
this.endss_,
|
|
@@ -4570,7 +4590,7 @@ class wt extends Z {
|
|
|
4570
4590
|
* @override
|
|
4571
4591
|
*/
|
|
4572
4592
|
containsXY(t, e) {
|
|
4573
|
-
return
|
|
4593
|
+
return ss(
|
|
4574
4594
|
this.getOrientedFlatCoordinates(),
|
|
4575
4595
|
0,
|
|
4576
4596
|
this.endss_,
|
|
@@ -4585,7 +4605,7 @@ class wt extends Z {
|
|
|
4585
4605
|
* @api
|
|
4586
4606
|
*/
|
|
4587
4607
|
getArea() {
|
|
4588
|
-
return
|
|
4608
|
+
return us(
|
|
4589
4609
|
this.getOrientedFlatCoordinates(),
|
|
4590
4610
|
0,
|
|
4591
4611
|
this.endss_,
|
|
@@ -4608,13 +4628,13 @@ class wt extends Z {
|
|
|
4608
4628
|
*/
|
|
4609
4629
|
getCoordinates(t) {
|
|
4610
4630
|
let e;
|
|
4611
|
-
return t !== void 0 ? (e = this.getOrientedFlatCoordinates().slice(),
|
|
4631
|
+
return t !== void 0 ? (e = this.getOrientedFlatCoordinates().slice(), de(
|
|
4612
4632
|
e,
|
|
4613
4633
|
0,
|
|
4614
4634
|
this.endss_,
|
|
4615
4635
|
this.stride,
|
|
4616
4636
|
t
|
|
4617
|
-
)) : e = this.flatCoordinates,
|
|
4637
|
+
)) : e = this.flatCoordinates, gs(
|
|
4618
4638
|
e,
|
|
4619
4639
|
0,
|
|
4620
4640
|
this.endss_,
|
|
@@ -4632,13 +4652,13 @@ class wt extends Z {
|
|
|
4632
4652
|
*/
|
|
4633
4653
|
getFlatInteriorPoints() {
|
|
4634
4654
|
if (this.flatInteriorPointsRevision_ != this.getRevision()) {
|
|
4635
|
-
const t =
|
|
4655
|
+
const t = Zi(
|
|
4636
4656
|
this.flatCoordinates,
|
|
4637
4657
|
0,
|
|
4638
4658
|
this.endss_,
|
|
4639
4659
|
this.stride
|
|
4640
4660
|
);
|
|
4641
|
-
this.flatInteriorPoints_ =
|
|
4661
|
+
this.flatInteriorPoints_ = Qi(
|
|
4642
4662
|
this.getOrientedFlatCoordinates(),
|
|
4643
4663
|
0,
|
|
4644
4664
|
this.endss_,
|
|
@@ -4658,7 +4678,7 @@ class wt extends Z {
|
|
|
4658
4678
|
* @api
|
|
4659
4679
|
*/
|
|
4660
4680
|
getInteriorPoints() {
|
|
4661
|
-
return new
|
|
4681
|
+
return new Ft(this.getFlatInteriorPoints().slice(), "XYM");
|
|
4662
4682
|
}
|
|
4663
4683
|
/**
|
|
4664
4684
|
* @return {Array<number>} Oriented flat coordinates.
|
|
@@ -4666,7 +4686,7 @@ class wt extends Z {
|
|
|
4666
4686
|
getOrientedFlatCoordinates() {
|
|
4667
4687
|
if (this.orientedRevision_ != this.getRevision()) {
|
|
4668
4688
|
const t = this.flatCoordinates;
|
|
4669
|
-
|
|
4689
|
+
tn(t, 0, this.endss_, this.stride) ? this.orientedFlatCoordinates_ = t : (this.orientedFlatCoordinates_ = t.slice(), this.orientedFlatCoordinates_.length = de(
|
|
4670
4690
|
this.orientedFlatCoordinates_,
|
|
4671
4691
|
0,
|
|
4672
4692
|
this.endss_,
|
|
@@ -4686,7 +4706,7 @@ class wt extends Z {
|
|
|
4686
4706
|
*/
|
|
4687
4707
|
getSimplifiedGeometryInternal(t) {
|
|
4688
4708
|
const e = [], i = [];
|
|
4689
|
-
return e.length =
|
|
4709
|
+
return e.length = cs(
|
|
4690
4710
|
this.flatCoordinates,
|
|
4691
4711
|
0,
|
|
4692
4712
|
this.endss_,
|
|
@@ -4695,7 +4715,7 @@ class wt extends Z {
|
|
|
4695
4715
|
e,
|
|
4696
4716
|
0,
|
|
4697
4717
|
i
|
|
4698
|
-
), new
|
|
4718
|
+
), new bt(e, "XY", i);
|
|
4699
4719
|
}
|
|
4700
4720
|
/**
|
|
4701
4721
|
* Return the polygon at the specified index.
|
|
@@ -4717,7 +4737,7 @@ class wt extends Z {
|
|
|
4717
4737
|
if (e !== 0)
|
|
4718
4738
|
for (let s = 0, o = i.length; s < o; ++s)
|
|
4719
4739
|
i[s] -= e;
|
|
4720
|
-
return new
|
|
4740
|
+
return new W(
|
|
4721
4741
|
this.flatCoordinates.slice(e, r),
|
|
4722
4742
|
this.layout,
|
|
4723
4743
|
i
|
|
@@ -4736,7 +4756,7 @@ class wt extends Z {
|
|
|
4736
4756
|
if (s !== 0)
|
|
4737
4757
|
for (let u = 0, d = l.length; u < d; ++u)
|
|
4738
4758
|
l[u] -= s;
|
|
4739
|
-
const c = new
|
|
4759
|
+
const c = new W(
|
|
4740
4760
|
e.slice(s, h),
|
|
4741
4761
|
t,
|
|
4742
4762
|
l
|
|
@@ -4762,7 +4782,7 @@ class wt extends Z {
|
|
|
4762
4782
|
* @override
|
|
4763
4783
|
*/
|
|
4764
4784
|
intersectsExtent(t) {
|
|
4765
|
-
return
|
|
4785
|
+
return ms(
|
|
4766
4786
|
this.getOrientedFlatCoordinates(),
|
|
4767
4787
|
0,
|
|
4768
4788
|
this.endss_,
|
|
@@ -4779,7 +4799,7 @@ class wt extends Z {
|
|
|
4779
4799
|
*/
|
|
4780
4800
|
setCoordinates(t, e) {
|
|
4781
4801
|
this.setLayout(e, t, 3), this.flatCoordinates || (this.flatCoordinates = []);
|
|
4782
|
-
const i =
|
|
4802
|
+
const i = Di(
|
|
4783
4803
|
this.flatCoordinates,
|
|
4784
4804
|
0,
|
|
4785
4805
|
t,
|
|
@@ -4795,8 +4815,8 @@ class wt extends Z {
|
|
|
4795
4815
|
this.changed();
|
|
4796
4816
|
}
|
|
4797
4817
|
}
|
|
4798
|
-
const
|
|
4799
|
-
class
|
|
4818
|
+
const _i = Ji();
|
|
4819
|
+
class q {
|
|
4800
4820
|
/**
|
|
4801
4821
|
* @param {Type} type Geometry type.
|
|
4802
4822
|
* @param {Array<number>} flatCoordinates Flat coordinates. These always need
|
|
@@ -4824,7 +4844,7 @@ class W {
|
|
|
4824
4844
|
* @api
|
|
4825
4845
|
*/
|
|
4826
4846
|
getExtent() {
|
|
4827
|
-
return this.extent_ || (this.extent_ = this.type_ === "Point" ?
|
|
4847
|
+
return this.extent_ || (this.extent_ = this.type_ === "Point" ? ji(this.flatCoordinates_) : Ce(
|
|
4828
4848
|
this.flatCoordinates_,
|
|
4829
4849
|
0,
|
|
4830
4850
|
this.flatCoordinates_.length,
|
|
@@ -4836,8 +4856,8 @@ class W {
|
|
|
4836
4856
|
*/
|
|
4837
4857
|
getFlatInteriorPoint() {
|
|
4838
4858
|
if (!this.flatInteriorPoints_) {
|
|
4839
|
-
const t =
|
|
4840
|
-
this.flatInteriorPoints_ =
|
|
4859
|
+
const t = Vt(this.getExtent());
|
|
4860
|
+
this.flatInteriorPoints_ = $e(
|
|
4841
4861
|
this.flatCoordinates_,
|
|
4842
4862
|
0,
|
|
4843
4863
|
this.ends_,
|
|
@@ -4853,8 +4873,8 @@ class W {
|
|
|
4853
4873
|
*/
|
|
4854
4874
|
getFlatInteriorPoints() {
|
|
4855
4875
|
if (!this.flatInteriorPoints_) {
|
|
4856
|
-
const t =
|
|
4857
|
-
this.flatInteriorPoints_ =
|
|
4876
|
+
const t = ls(this.flatCoordinates_, this.ends_), e = Zi(this.flatCoordinates_, 0, t, 2);
|
|
4877
|
+
this.flatInteriorPoints_ = Qi(
|
|
4858
4878
|
this.flatCoordinates_,
|
|
4859
4879
|
0,
|
|
4860
4880
|
t,
|
|
@@ -4868,7 +4888,7 @@ class W {
|
|
|
4868
4888
|
* @return {Array<number>} Flat midpoint.
|
|
4869
4889
|
*/
|
|
4870
4890
|
getFlatMidpoint() {
|
|
4871
|
-
return this.flatMidpoints_ || (this.flatMidpoints_ =
|
|
4891
|
+
return this.flatMidpoints_ || (this.flatMidpoints_ = Ut(
|
|
4872
4892
|
this.flatCoordinates_,
|
|
4873
4893
|
0,
|
|
4874
4894
|
this.flatCoordinates_.length,
|
|
@@ -4889,7 +4909,7 @@ class W {
|
|
|
4889
4909
|
this.ends_
|
|
4890
4910
|
);
|
|
4891
4911
|
for (let r = 0, s = i.length; r < s; ++r) {
|
|
4892
|
-
const o = i[r], a =
|
|
4912
|
+
const o = i[r], a = Ut(t, e, o, 2, 0.5);
|
|
4893
4913
|
A(this.flatMidpoints_, a), e = o;
|
|
4894
4914
|
}
|
|
4895
4915
|
}
|
|
@@ -4980,9 +5000,9 @@ class W {
|
|
|
4980
5000
|
t = x(t);
|
|
4981
5001
|
const e = t.getExtent(), i = t.getWorldExtent();
|
|
4982
5002
|
if (e && i) {
|
|
4983
|
-
const r =
|
|
4984
|
-
|
|
4985
|
-
|
|
5003
|
+
const r = kt(i) / kt(e);
|
|
5004
|
+
Wi(
|
|
5005
|
+
_i,
|
|
4986
5006
|
i[0],
|
|
4987
5007
|
i[3],
|
|
4988
5008
|
r,
|
|
@@ -4990,12 +5010,12 @@ class W {
|
|
|
4990
5010
|
0,
|
|
4991
5011
|
0,
|
|
4992
5012
|
0
|
|
4993
|
-
),
|
|
5013
|
+
), qi(
|
|
4994
5014
|
this.flatCoordinates_,
|
|
4995
5015
|
0,
|
|
4996
5016
|
this.flatCoordinates_.length,
|
|
4997
5017
|
2,
|
|
4998
|
-
|
|
5018
|
+
_i,
|
|
4999
5019
|
this.flatCoordinates_
|
|
5000
5020
|
);
|
|
5001
5021
|
}
|
|
@@ -5015,7 +5035,7 @@ class W {
|
|
|
5015
5035
|
*/
|
|
5016
5036
|
clone() {
|
|
5017
5037
|
var t;
|
|
5018
|
-
return new
|
|
5038
|
+
return new q(
|
|
5019
5039
|
this.type_,
|
|
5020
5040
|
this.flatCoordinates_.slice(),
|
|
5021
5041
|
(t = this.ends_) == null ? void 0 : t.slice(),
|
|
@@ -5035,7 +5055,7 @@ class W {
|
|
|
5035
5055
|
* @return {RenderFeature} This render feature.
|
|
5036
5056
|
*/
|
|
5037
5057
|
enableSimplifyTransformed() {
|
|
5038
|
-
return this.simplifyTransformed =
|
|
5058
|
+
return this.simplifyTransformed = Ii((t, e) => {
|
|
5039
5059
|
if (t === this.squaredTolerance_)
|
|
5040
5060
|
return this.simplifiedGeometry_;
|
|
5041
5061
|
this.simplifiedGeometry_ = this.clone(), e && this.simplifiedGeometry_.applyTransform(e);
|
|
@@ -5043,7 +5063,7 @@ class W {
|
|
|
5043
5063
|
let r;
|
|
5044
5064
|
switch (this.type_) {
|
|
5045
5065
|
case "LineString":
|
|
5046
|
-
i.length =
|
|
5066
|
+
i.length = qt(
|
|
5047
5067
|
i,
|
|
5048
5068
|
0,
|
|
5049
5069
|
this.simplifiedGeometry_.flatCoordinates_.length,
|
|
@@ -5054,7 +5074,7 @@ class W {
|
|
|
5054
5074
|
), r = [i.length];
|
|
5055
5075
|
break;
|
|
5056
5076
|
case "MultiLineString":
|
|
5057
|
-
r = [], i.length =
|
|
5077
|
+
r = [], i.length = en(
|
|
5058
5078
|
i,
|
|
5059
5079
|
0,
|
|
5060
5080
|
this.simplifiedGeometry_.ends_,
|
|
@@ -5066,7 +5086,7 @@ class W {
|
|
|
5066
5086
|
);
|
|
5067
5087
|
break;
|
|
5068
5088
|
case "Polygon":
|
|
5069
|
-
r = [], i.length =
|
|
5089
|
+
r = [], i.length = Ge(
|
|
5070
5090
|
i,
|
|
5071
5091
|
0,
|
|
5072
5092
|
this.simplifiedGeometry_.ends_,
|
|
@@ -5078,7 +5098,7 @@ class W {
|
|
|
5078
5098
|
);
|
|
5079
5099
|
break;
|
|
5080
5100
|
}
|
|
5081
|
-
return r && (this.simplifiedGeometry_ = new
|
|
5101
|
+
return r && (this.simplifiedGeometry_ = new q(
|
|
5082
5102
|
this.type_,
|
|
5083
5103
|
i,
|
|
5084
5104
|
r,
|
|
@@ -5089,11 +5109,11 @@ class W {
|
|
|
5089
5109
|
}), this;
|
|
5090
5110
|
}
|
|
5091
5111
|
}
|
|
5092
|
-
|
|
5093
|
-
class
|
|
5112
|
+
q.prototype.getFlatCoordinates = q.prototype.getOrientedFlatCoordinates;
|
|
5113
|
+
class ln {
|
|
5094
5114
|
constructor() {
|
|
5095
5115
|
this.dataProjection = void 0, this.defaultFeatureProjection = void 0, this.featureClass = /** @type {FeatureToFeatureClass<FeatureType>} */
|
|
5096
|
-
|
|
5116
|
+
ht, this.supportedMediaTypes = null;
|
|
5097
5117
|
}
|
|
5098
5118
|
/**
|
|
5099
5119
|
* Adds the data projection to the read options.
|
|
@@ -5215,14 +5235,14 @@ class on {
|
|
|
5215
5235
|
return y();
|
|
5216
5236
|
}
|
|
5217
5237
|
}
|
|
5218
|
-
function
|
|
5238
|
+
function Et(n, t, e) {
|
|
5219
5239
|
const i = e ? x(e.featureProjection) : null, r = e ? x(e.dataProjection) : null;
|
|
5220
5240
|
let s = n;
|
|
5221
|
-
if (i && r && !
|
|
5241
|
+
if (i && r && !Dr(i, r)) {
|
|
5222
5242
|
t && (s = /** @type {T} */
|
|
5223
5243
|
n.clone());
|
|
5224
5244
|
const o = t ? i : r, a = t ? r : i;
|
|
5225
|
-
o.getUnits() === "tile-pixels" ? s.transform(o, a) : s.applyTransform(
|
|
5245
|
+
o.getUnits() === "tile-pixels" ? s.transform(o, a) : s.applyTransform(ce(o, a));
|
|
5226
5246
|
}
|
|
5227
5247
|
if (t && e && /** @type {WriteOptions} */
|
|
5228
5248
|
e.decimals !== void 0) {
|
|
@@ -5240,32 +5260,32 @@ function bt(n, t, e) {
|
|
|
5240
5260
|
}
|
|
5241
5261
|
return s;
|
|
5242
5262
|
}
|
|
5243
|
-
const
|
|
5244
|
-
Point:
|
|
5245
|
-
LineString:
|
|
5246
|
-
Polygon:
|
|
5247
|
-
MultiPoint:
|
|
5263
|
+
const _s = {
|
|
5264
|
+
Point: J,
|
|
5265
|
+
LineString: z,
|
|
5266
|
+
Polygon: W,
|
|
5267
|
+
MultiPoint: Ft,
|
|
5248
5268
|
MultiLineString: Ct,
|
|
5249
|
-
MultiPolygon:
|
|
5269
|
+
MultiPolygon: bt
|
|
5250
5270
|
};
|
|
5251
|
-
function
|
|
5252
|
-
return Array.isArray(t[0]) ? (
|
|
5271
|
+
function vs(n, t, e) {
|
|
5272
|
+
return Array.isArray(t[0]) ? (tn(n, 0, t, e) || (n = n.slice(), de(n, 0, t, e)), n) : (Fe(n, 0, t, e) || (n = n.slice(), Xt(n, 0, t, e)), n);
|
|
5253
5273
|
}
|
|
5254
|
-
function
|
|
5274
|
+
function hn(n, t) {
|
|
5255
5275
|
var s;
|
|
5256
5276
|
const e = n.geometry;
|
|
5257
5277
|
if (!e)
|
|
5258
5278
|
return [];
|
|
5259
5279
|
if (Array.isArray(e))
|
|
5260
|
-
return e.map((o) =>
|
|
5280
|
+
return e.map((o) => hn({ ...n, geometry: o })).flat();
|
|
5261
5281
|
const i = e.type === "MultiPolygon" ? "Polygon" : e.type;
|
|
5262
5282
|
if (i === "GeometryCollection" || i === "Circle")
|
|
5263
5283
|
throw new Error("Unsupported geometry type: " + i);
|
|
5264
5284
|
const r = e.layout.length;
|
|
5265
|
-
return
|
|
5266
|
-
new
|
|
5285
|
+
return Et(
|
|
5286
|
+
new q(
|
|
5267
5287
|
i,
|
|
5268
|
-
i === "Polygon" ?
|
|
5288
|
+
i === "Polygon" ? vs(e.flatCoordinates, e.ends, r) : e.flatCoordinates,
|
|
5269
5289
|
(s = e.ends) == null ? void 0 : s.flat(),
|
|
5270
5290
|
r,
|
|
5271
5291
|
n.properties || {},
|
|
@@ -5275,23 +5295,23 @@ function an(n, t) {
|
|
|
5275
5295
|
t
|
|
5276
5296
|
);
|
|
5277
5297
|
}
|
|
5278
|
-
function
|
|
5298
|
+
function Oe(n, t) {
|
|
5279
5299
|
if (!n)
|
|
5280
5300
|
return null;
|
|
5281
5301
|
if (Array.isArray(n)) {
|
|
5282
5302
|
const i = n.map(
|
|
5283
|
-
(r) =>
|
|
5303
|
+
(r) => Oe(r, t)
|
|
5284
5304
|
);
|
|
5285
|
-
return new
|
|
5305
|
+
return new V(i);
|
|
5286
5306
|
}
|
|
5287
|
-
const e =
|
|
5288
|
-
return
|
|
5307
|
+
const e = _s[n.type];
|
|
5308
|
+
return Et(
|
|
5289
5309
|
new e(n.flatCoordinates, n.layout || "XY", n.ends),
|
|
5290
5310
|
!1,
|
|
5291
5311
|
t
|
|
5292
5312
|
);
|
|
5293
5313
|
}
|
|
5294
|
-
class
|
|
5314
|
+
class ws extends ln {
|
|
5295
5315
|
constructor() {
|
|
5296
5316
|
super();
|
|
5297
5317
|
}
|
|
@@ -5314,7 +5334,7 @@ class _s extends on {
|
|
|
5314
5334
|
*/
|
|
5315
5335
|
readFeature(t, e) {
|
|
5316
5336
|
return this.readFeatureFromObject(
|
|
5317
|
-
|
|
5337
|
+
It(t),
|
|
5318
5338
|
this.getReadOptions(t, e)
|
|
5319
5339
|
);
|
|
5320
5340
|
}
|
|
@@ -5330,7 +5350,7 @@ class _s extends on {
|
|
|
5330
5350
|
*/
|
|
5331
5351
|
readFeatures(t, e) {
|
|
5332
5352
|
return this.readFeaturesFromObject(
|
|
5333
|
-
|
|
5353
|
+
It(t),
|
|
5334
5354
|
this.getReadOptions(t, e)
|
|
5335
5355
|
);
|
|
5336
5356
|
}
|
|
@@ -5365,7 +5385,7 @@ class _s extends on {
|
|
|
5365
5385
|
*/
|
|
5366
5386
|
readGeometry(t, e) {
|
|
5367
5387
|
return this.readGeometryFromObject(
|
|
5368
|
-
|
|
5388
|
+
It(t),
|
|
5369
5389
|
this.getReadOptions(t, e)
|
|
5370
5390
|
);
|
|
5371
5391
|
}
|
|
@@ -5388,7 +5408,7 @@ class _s extends on {
|
|
|
5388
5408
|
* @override
|
|
5389
5409
|
*/
|
|
5390
5410
|
readProjection(t) {
|
|
5391
|
-
return this.readProjectionFromObject(
|
|
5411
|
+
return this.readProjectionFromObject(It(t));
|
|
5392
5412
|
}
|
|
5393
5413
|
/**
|
|
5394
5414
|
* @abstract
|
|
@@ -5463,14 +5483,14 @@ class _s extends on {
|
|
|
5463
5483
|
return y();
|
|
5464
5484
|
}
|
|
5465
5485
|
}
|
|
5466
|
-
function
|
|
5486
|
+
function It(n) {
|
|
5467
5487
|
if (typeof n == "string") {
|
|
5468
5488
|
const t = JSON.parse(n);
|
|
5469
5489
|
return t || null;
|
|
5470
5490
|
}
|
|
5471
5491
|
return n !== null ? n : null;
|
|
5472
5492
|
}
|
|
5473
|
-
class
|
|
5493
|
+
class Cs extends ws {
|
|
5474
5494
|
/**
|
|
5475
5495
|
* @param {Options<FeatureType>} [options] Options.
|
|
5476
5496
|
*/
|
|
@@ -5500,11 +5520,11 @@ class vs extends _s {
|
|
|
5500
5520
|
),
|
|
5501
5521
|
properties: null
|
|
5502
5522
|
};
|
|
5503
|
-
const r =
|
|
5504
|
-
if (this.featureClass ===
|
|
5523
|
+
const r = ke(i.geometry);
|
|
5524
|
+
if (this.featureClass === q)
|
|
5505
5525
|
return (
|
|
5506
5526
|
/** @type {FeatureType|Array<FeatureType>} */
|
|
5507
|
-
|
|
5527
|
+
hn(
|
|
5508
5528
|
{
|
|
5509
5529
|
geometry: r,
|
|
5510
5530
|
id: i.id,
|
|
@@ -5513,8 +5533,8 @@ class vs extends _s {
|
|
|
5513
5533
|
e
|
|
5514
5534
|
)
|
|
5515
5535
|
);
|
|
5516
|
-
const s = new
|
|
5517
|
-
return this.geometryName_ ? s.setGeometryName(this.geometryName_) : this.extractGeometryName_ && i.geometry_name && s.setGeometryName(i.geometry_name), s.setGeometry(
|
|
5536
|
+
const s = new ht();
|
|
5537
|
+
return this.geometryName_ ? s.setGeometryName(this.geometryName_) : this.extractGeometryName_ && i.geometry_name && s.setGeometryName(i.geometry_name), s.setGeometry(Oe(r, e)), "id" in i && s.setId(i.id), i.properties && s.setProperties(i.properties, !0), /** @type {FeatureType|Array<FeatureType>} */
|
|
5518
5538
|
s;
|
|
5519
5539
|
}
|
|
5520
5540
|
/**
|
|
@@ -5559,7 +5579,7 @@ class vs extends _s {
|
|
|
5559
5579
|
* @override
|
|
5560
5580
|
*/
|
|
5561
5581
|
readGeometryFromObject(t, e) {
|
|
5562
|
-
return
|
|
5582
|
+
return bs(t, e);
|
|
5563
5583
|
}
|
|
5564
5584
|
/**
|
|
5565
5585
|
* @param {Object} object Object.
|
|
@@ -5603,7 +5623,7 @@ class vs extends _s {
|
|
|
5603
5623
|
if (r !== void 0 && (i.id = r), !t.hasProperties())
|
|
5604
5624
|
return i;
|
|
5605
5625
|
const s = t.getProperties(), o = t.getGeometry();
|
|
5606
|
-
return o && (i.geometry =
|
|
5626
|
+
return o && (i.geometry = fe(o, e), delete s[t.getGeometryName()]), Ri(s) || (i.properties = s), i;
|
|
5607
5627
|
}
|
|
5608
5628
|
/**
|
|
5609
5629
|
* Encode an array of features as a GeoJSON object.
|
|
@@ -5634,58 +5654,58 @@ class vs extends _s {
|
|
|
5634
5654
|
* @override
|
|
5635
5655
|
*/
|
|
5636
5656
|
writeGeometryObject(t, e) {
|
|
5637
|
-
return
|
|
5657
|
+
return fe(t, this.adaptOptions(e));
|
|
5638
5658
|
}
|
|
5639
5659
|
}
|
|
5640
|
-
function
|
|
5660
|
+
function ke(n, t) {
|
|
5641
5661
|
if (!n)
|
|
5642
5662
|
return null;
|
|
5643
5663
|
let e;
|
|
5644
5664
|
switch (n.type) {
|
|
5645
5665
|
case "Point": {
|
|
5646
|
-
e =
|
|
5666
|
+
e = xs(
|
|
5647
5667
|
/** @type {GeoJSONPoint} */
|
|
5648
5668
|
n
|
|
5649
5669
|
);
|
|
5650
5670
|
break;
|
|
5651
5671
|
}
|
|
5652
5672
|
case "LineString": {
|
|
5653
|
-
e =
|
|
5673
|
+
e = Ps(
|
|
5654
5674
|
/** @type {GeoJSONLineString} */
|
|
5655
5675
|
n
|
|
5656
5676
|
);
|
|
5657
5677
|
break;
|
|
5658
5678
|
}
|
|
5659
5679
|
case "Polygon": {
|
|
5660
|
-
e =
|
|
5680
|
+
e = As(
|
|
5661
5681
|
/** @type {GeoJSONPolygon} */
|
|
5662
5682
|
n
|
|
5663
5683
|
);
|
|
5664
5684
|
break;
|
|
5665
5685
|
}
|
|
5666
5686
|
case "MultiPoint": {
|
|
5667
|
-
e =
|
|
5687
|
+
e = Ss(
|
|
5668
5688
|
/** @type {GeoJSONMultiPoint} */
|
|
5669
5689
|
n
|
|
5670
5690
|
);
|
|
5671
5691
|
break;
|
|
5672
5692
|
}
|
|
5673
5693
|
case "MultiLineString": {
|
|
5674
|
-
e =
|
|
5694
|
+
e = Ms(
|
|
5675
5695
|
/** @type {GeoJSONMultiLineString} */
|
|
5676
5696
|
n
|
|
5677
5697
|
);
|
|
5678
5698
|
break;
|
|
5679
5699
|
}
|
|
5680
5700
|
case "MultiPolygon": {
|
|
5681
|
-
e =
|
|
5701
|
+
e = $s(
|
|
5682
5702
|
/** @type {GeoJSONMultiPolygon} */
|
|
5683
5703
|
n
|
|
5684
5704
|
);
|
|
5685
5705
|
break;
|
|
5686
5706
|
}
|
|
5687
5707
|
case "GeometryCollection": {
|
|
5688
|
-
e =
|
|
5708
|
+
e = Es(
|
|
5689
5709
|
/** @type {GeoJSONGeometryCollection} */
|
|
5690
5710
|
n
|
|
5691
5711
|
);
|
|
@@ -5696,61 +5716,61 @@ function Oe(n, t) {
|
|
|
5696
5716
|
}
|
|
5697
5717
|
return e;
|
|
5698
5718
|
}
|
|
5699
|
-
function
|
|
5700
|
-
const e =
|
|
5701
|
-
return
|
|
5719
|
+
function bs(n, t) {
|
|
5720
|
+
const e = ke(n);
|
|
5721
|
+
return Oe(e, t);
|
|
5702
5722
|
}
|
|
5703
|
-
function
|
|
5723
|
+
function Es(n, t) {
|
|
5704
5724
|
return n.geometries.map(
|
|
5705
5725
|
/**
|
|
5706
5726
|
* @param {GeoJSONGeometry} geometry Geometry.
|
|
5707
5727
|
* @return {import("./Feature.js").GeometryObject} geometry Geometry.
|
|
5708
5728
|
*/
|
|
5709
5729
|
function(i) {
|
|
5710
|
-
return
|
|
5730
|
+
return ke(i);
|
|
5711
5731
|
}
|
|
5712
5732
|
);
|
|
5713
5733
|
}
|
|
5714
|
-
function
|
|
5734
|
+
function xs(n) {
|
|
5715
5735
|
const t = n.coordinates;
|
|
5716
5736
|
return {
|
|
5717
5737
|
type: "Point",
|
|
5718
5738
|
flatCoordinates: t,
|
|
5719
|
-
layout:
|
|
5739
|
+
layout: Z(t.length)
|
|
5720
5740
|
};
|
|
5721
5741
|
}
|
|
5722
|
-
function
|
|
5742
|
+
function Ps(n) {
|
|
5723
5743
|
var i;
|
|
5724
5744
|
const t = n.coordinates, e = t.flat();
|
|
5725
5745
|
return {
|
|
5726
5746
|
type: "LineString",
|
|
5727
5747
|
flatCoordinates: e,
|
|
5728
5748
|
ends: [e.length],
|
|
5729
|
-
layout:
|
|
5749
|
+
layout: Z(((i = t[0]) == null ? void 0 : i.length) || 2)
|
|
5730
5750
|
};
|
|
5731
5751
|
}
|
|
5732
|
-
function
|
|
5752
|
+
function Ms(n) {
|
|
5733
5753
|
var s, o;
|
|
5734
|
-
const t = n.coordinates, e = ((o = (s = t[0]) == null ? void 0 : s[0]) == null ? void 0 : o.length) || 2, i = [], r =
|
|
5754
|
+
const t = n.coordinates, e = ((o = (s = t[0]) == null ? void 0 : s[0]) == null ? void 0 : o.length) || 2, i = [], r = At(i, 0, t, e);
|
|
5735
5755
|
return {
|
|
5736
5756
|
type: "MultiLineString",
|
|
5737
5757
|
flatCoordinates: i,
|
|
5738
5758
|
ends: r,
|
|
5739
|
-
layout:
|
|
5759
|
+
layout: Z(e)
|
|
5740
5760
|
};
|
|
5741
5761
|
}
|
|
5742
|
-
function
|
|
5762
|
+
function Ss(n) {
|
|
5743
5763
|
var e;
|
|
5744
5764
|
const t = n.coordinates;
|
|
5745
5765
|
return {
|
|
5746
5766
|
type: "MultiPoint",
|
|
5747
5767
|
flatCoordinates: t.flat(),
|
|
5748
|
-
layout:
|
|
5768
|
+
layout: Z(((e = t[0]) == null ? void 0 : e.length) || 2)
|
|
5749
5769
|
};
|
|
5750
5770
|
}
|
|
5751
|
-
function
|
|
5771
|
+
function $s(n) {
|
|
5752
5772
|
var s, o;
|
|
5753
|
-
const t = n.coordinates, e = [], i = ((o = (s = t[0]) == null ? void 0 : s[0]) == null ? void 0 : o[0].length) || 2, r =
|
|
5773
|
+
const t = n.coordinates, e = [], i = ((o = (s = t[0]) == null ? void 0 : s[0]) == null ? void 0 : o[0].length) || 2, r = Di(
|
|
5754
5774
|
e,
|
|
5755
5775
|
0,
|
|
5756
5776
|
t,
|
|
@@ -5760,40 +5780,40 @@ function Ms(n) {
|
|
|
5760
5780
|
type: "MultiPolygon",
|
|
5761
5781
|
flatCoordinates: e,
|
|
5762
5782
|
ends: r,
|
|
5763
|
-
layout:
|
|
5783
|
+
layout: Z(i)
|
|
5764
5784
|
};
|
|
5765
5785
|
}
|
|
5766
|
-
function
|
|
5786
|
+
function As(n) {
|
|
5767
5787
|
var s, o;
|
|
5768
|
-
const t = n.coordinates, e = [], i = (o = (s = t[0]) == null ? void 0 : s[0]) == null ? void 0 : o.length, r =
|
|
5788
|
+
const t = n.coordinates, e = [], i = (o = (s = t[0]) == null ? void 0 : s[0]) == null ? void 0 : o.length, r = At(e, 0, t, i);
|
|
5769
5789
|
return {
|
|
5770
5790
|
type: "Polygon",
|
|
5771
5791
|
flatCoordinates: e,
|
|
5772
5792
|
ends: r,
|
|
5773
|
-
layout:
|
|
5793
|
+
layout: Z(i)
|
|
5774
5794
|
};
|
|
5775
5795
|
}
|
|
5776
|
-
function
|
|
5777
|
-
n =
|
|
5796
|
+
function fe(n, t) {
|
|
5797
|
+
n = Et(n, !0, t);
|
|
5778
5798
|
const e = n.getType();
|
|
5779
5799
|
let i;
|
|
5780
5800
|
switch (e) {
|
|
5781
5801
|
case "Point": {
|
|
5782
|
-
i =
|
|
5802
|
+
i = Ts(
|
|
5783
5803
|
/** @type {import("../geom/Point.js").default} */
|
|
5784
5804
|
n
|
|
5785
5805
|
);
|
|
5786
5806
|
break;
|
|
5787
5807
|
}
|
|
5788
5808
|
case "LineString": {
|
|
5789
|
-
i =
|
|
5809
|
+
i = Gs(
|
|
5790
5810
|
/** @type {import("../geom/LineString.js").default} */
|
|
5791
5811
|
n
|
|
5792
5812
|
);
|
|
5793
5813
|
break;
|
|
5794
5814
|
}
|
|
5795
5815
|
case "Polygon": {
|
|
5796
|
-
i =
|
|
5816
|
+
i = Ns(
|
|
5797
5817
|
/** @type {import("../geom/Polygon.js").default} */
|
|
5798
5818
|
n,
|
|
5799
5819
|
t
|
|
@@ -5801,21 +5821,21 @@ function de(n, t) {
|
|
|
5801
5821
|
break;
|
|
5802
5822
|
}
|
|
5803
5823
|
case "MultiPoint": {
|
|
5804
|
-
i =
|
|
5824
|
+
i = Ls(
|
|
5805
5825
|
/** @type {import("../geom/MultiPoint.js").default} */
|
|
5806
5826
|
n
|
|
5807
5827
|
);
|
|
5808
5828
|
break;
|
|
5809
5829
|
}
|
|
5810
5830
|
case "MultiLineString": {
|
|
5811
|
-
i =
|
|
5831
|
+
i = Is(
|
|
5812
5832
|
/** @type {import("../geom/MultiLineString.js").default} */
|
|
5813
5833
|
n
|
|
5814
5834
|
);
|
|
5815
5835
|
break;
|
|
5816
5836
|
}
|
|
5817
5837
|
case "MultiPolygon": {
|
|
5818
|
-
i =
|
|
5838
|
+
i = Rs(
|
|
5819
5839
|
/** @type {import("../geom/MultiPolygon.js").default} */
|
|
5820
5840
|
n,
|
|
5821
5841
|
t
|
|
@@ -5823,7 +5843,7 @@ function de(n, t) {
|
|
|
5823
5843
|
break;
|
|
5824
5844
|
}
|
|
5825
5845
|
case "GeometryCollection": {
|
|
5826
|
-
i =
|
|
5846
|
+
i = Fs(
|
|
5827
5847
|
/** @type {import("../geom/GeometryCollection.js").default} */
|
|
5828
5848
|
n,
|
|
5829
5849
|
t
|
|
@@ -5842,54 +5862,54 @@ function de(n, t) {
|
|
|
5842
5862
|
}
|
|
5843
5863
|
return i;
|
|
5844
5864
|
}
|
|
5845
|
-
function
|
|
5865
|
+
function Fs(n, t) {
|
|
5846
5866
|
return t = Object.assign({}, t), delete t.featureProjection, {
|
|
5847
5867
|
type: "GeometryCollection",
|
|
5848
5868
|
geometries: n.getGeometriesArray().map(function(i) {
|
|
5849
|
-
return
|
|
5869
|
+
return fe(i, t);
|
|
5850
5870
|
})
|
|
5851
5871
|
};
|
|
5852
5872
|
}
|
|
5853
|
-
function
|
|
5873
|
+
function Gs(n, t) {
|
|
5854
5874
|
return {
|
|
5855
5875
|
type: "LineString",
|
|
5856
5876
|
coordinates: n.getCoordinates()
|
|
5857
5877
|
};
|
|
5858
5878
|
}
|
|
5859
|
-
function
|
|
5879
|
+
function Is(n, t) {
|
|
5860
5880
|
return {
|
|
5861
5881
|
type: "MultiLineString",
|
|
5862
5882
|
coordinates: n.getCoordinates()
|
|
5863
5883
|
};
|
|
5864
5884
|
}
|
|
5865
|
-
function
|
|
5885
|
+
function Ls(n, t) {
|
|
5866
5886
|
return {
|
|
5867
5887
|
type: "MultiPoint",
|
|
5868
5888
|
coordinates: n.getCoordinates()
|
|
5869
5889
|
};
|
|
5870
5890
|
}
|
|
5871
|
-
function
|
|
5891
|
+
function Rs(n, t) {
|
|
5872
5892
|
let e;
|
|
5873
5893
|
return t && (e = t.rightHanded), {
|
|
5874
5894
|
type: "MultiPolygon",
|
|
5875
5895
|
coordinates: n.getCoordinates(e)
|
|
5876
5896
|
};
|
|
5877
5897
|
}
|
|
5878
|
-
function
|
|
5898
|
+
function Ts(n, t) {
|
|
5879
5899
|
return {
|
|
5880
5900
|
type: "Point",
|
|
5881
5901
|
coordinates: n.getCoordinates()
|
|
5882
5902
|
};
|
|
5883
5903
|
}
|
|
5884
|
-
function
|
|
5904
|
+
function Ns(n, t) {
|
|
5885
5905
|
let e;
|
|
5886
5906
|
return t && (e = t.rightHanded), {
|
|
5887
5907
|
type: "Polygon",
|
|
5888
5908
|
coordinates: n.getCoordinates(e)
|
|
5889
5909
|
};
|
|
5890
5910
|
}
|
|
5891
|
-
const
|
|
5892
|
-
class
|
|
5911
|
+
const Os = (n, t) => new Cs().writeFeaturesObject(n, t);
|
|
5912
|
+
class ks extends ln {
|
|
5893
5913
|
constructor() {
|
|
5894
5914
|
super();
|
|
5895
5915
|
}
|
|
@@ -6064,14 +6084,14 @@ class Ns extends on {
|
|
|
6064
6084
|
function Lt(n) {
|
|
6065
6085
|
return typeof n == "string" ? n : "";
|
|
6066
6086
|
}
|
|
6067
|
-
const
|
|
6068
|
-
POINT:
|
|
6069
|
-
LINESTRING:
|
|
6070
|
-
POLYGON:
|
|
6071
|
-
MULTIPOINT:
|
|
6087
|
+
const js = {
|
|
6088
|
+
POINT: J,
|
|
6089
|
+
LINESTRING: z,
|
|
6090
|
+
POLYGON: W,
|
|
6091
|
+
MULTIPOINT: Ft,
|
|
6072
6092
|
MULTILINESTRING: Ct,
|
|
6073
|
-
MULTIPOLYGON:
|
|
6074
|
-
},
|
|
6093
|
+
MULTIPOLYGON: bt
|
|
6094
|
+
}, cn = "EMPTY", un = "Z", dn = "M", Hs = "ZM", m = {
|
|
6075
6095
|
START: 0,
|
|
6076
6096
|
TEXT: 1,
|
|
6077
6097
|
LEFT_PAREN: 2,
|
|
@@ -6079,7 +6099,7 @@ const Os = {
|
|
|
6079
6099
|
NUMBER: 4,
|
|
6080
6100
|
COMMA: 5,
|
|
6081
6101
|
EOF: 6
|
|
6082
|
-
},
|
|
6102
|
+
}, Us = {
|
|
6083
6103
|
Point: "POINT",
|
|
6084
6104
|
LineString: "LINESTRING",
|
|
6085
6105
|
Polygon: "POLYGON",
|
|
@@ -6089,7 +6109,7 @@ const Os = {
|
|
|
6089
6109
|
GeometryCollection: "GEOMETRYCOLLECTION",
|
|
6090
6110
|
Circle: "CIRCLE"
|
|
6091
6111
|
};
|
|
6092
|
-
class
|
|
6112
|
+
class Xs {
|
|
6093
6113
|
/**
|
|
6094
6114
|
* @param {string} wkt WKT string.
|
|
6095
6115
|
*/
|
|
@@ -6187,7 +6207,7 @@ class Hs {
|
|
|
6187
6207
|
return this.wkt.substring(e, this.index_--).toUpperCase();
|
|
6188
6208
|
}
|
|
6189
6209
|
}
|
|
6190
|
-
class
|
|
6210
|
+
class Ys {
|
|
6191
6211
|
/**
|
|
6192
6212
|
* @param {Lexer} lexer The lexer.
|
|
6193
6213
|
*/
|
|
@@ -6238,7 +6258,7 @@ class Us {
|
|
|
6238
6258
|
const e = this.token_;
|
|
6239
6259
|
if (this.isTokenType(m.TEXT)) {
|
|
6240
6260
|
const i = e.value;
|
|
6241
|
-
i ===
|
|
6261
|
+
i === un ? t = "XYZ" : i === dn ? t = "XYM" : i === Hs && (t = "XYZM"), t !== "XY" && this.consume_();
|
|
6242
6262
|
}
|
|
6243
6263
|
return t;
|
|
6244
6264
|
}
|
|
@@ -6395,7 +6415,7 @@ class Us {
|
|
|
6395
6415
|
* @private
|
|
6396
6416
|
*/
|
|
6397
6417
|
isEmptyGeometry_() {
|
|
6398
|
-
const t = this.isTokenType(m.TEXT) && this.token_.value ==
|
|
6418
|
+
const t = this.isTokenType(m.TEXT) && this.token_.value == cn;
|
|
6399
6419
|
return t && this.consume_(), t;
|
|
6400
6420
|
}
|
|
6401
6421
|
/**
|
|
@@ -6421,11 +6441,11 @@ class Us {
|
|
|
6421
6441
|
const i = this.isEmptyGeometry_();
|
|
6422
6442
|
if (e == "GEOMETRYCOLLECTION") {
|
|
6423
6443
|
if (i)
|
|
6424
|
-
return new
|
|
6444
|
+
return new V([]);
|
|
6425
6445
|
const o = this.parseGeometryCollectionText_();
|
|
6426
|
-
return new
|
|
6446
|
+
return new V(o);
|
|
6427
6447
|
}
|
|
6428
|
-
const r =
|
|
6448
|
+
const r = js[e];
|
|
6429
6449
|
if (!r)
|
|
6430
6450
|
throw new Error("Invalid geometry type: " + e);
|
|
6431
6451
|
let s;
|
|
@@ -6463,7 +6483,7 @@ class Us {
|
|
|
6463
6483
|
throw new Error(this.formatErrorMessage_());
|
|
6464
6484
|
}
|
|
6465
6485
|
}
|
|
6466
|
-
class
|
|
6486
|
+
class Bs extends ks {
|
|
6467
6487
|
/**
|
|
6468
6488
|
* @param {Options} [options] Options.
|
|
6469
6489
|
*/
|
|
@@ -6478,8 +6498,8 @@ class Xs extends Ns {
|
|
|
6478
6498
|
* @private
|
|
6479
6499
|
*/
|
|
6480
6500
|
parse_(t) {
|
|
6481
|
-
const e = new
|
|
6482
|
-
return new
|
|
6501
|
+
const e = new Xs(t);
|
|
6502
|
+
return new Ys(e).parse();
|
|
6483
6503
|
}
|
|
6484
6504
|
/**
|
|
6485
6505
|
* @protected
|
|
@@ -6489,7 +6509,7 @@ class Xs extends Ns {
|
|
|
6489
6509
|
* @override
|
|
6490
6510
|
*/
|
|
6491
6511
|
readFeatureFromText(t, e) {
|
|
6492
|
-
const i = this.readGeometryFromText(t, e), r = new
|
|
6512
|
+
const i = this.readGeometryFromText(t, e), r = new ht();
|
|
6493
6513
|
return r.setGeometry(i), r;
|
|
6494
6514
|
}
|
|
6495
6515
|
/**
|
|
@@ -6506,7 +6526,7 @@ class Xs extends Ns {
|
|
|
6506
6526
|
r.getGeometriesArray() : i = [r];
|
|
6507
6527
|
const s = [];
|
|
6508
6528
|
for (let o = 0, a = i.length; o < a; ++o) {
|
|
6509
|
-
const l = new
|
|
6529
|
+
const l = new ht();
|
|
6510
6530
|
l.setGeometry(i[o]), s.push(l);
|
|
6511
6531
|
}
|
|
6512
6532
|
return s;
|
|
@@ -6520,7 +6540,7 @@ class Xs extends Ns {
|
|
|
6520
6540
|
*/
|
|
6521
6541
|
readGeometryFromText(t, e) {
|
|
6522
6542
|
const i = this.parse_(t);
|
|
6523
|
-
return
|
|
6543
|
+
return Et(i, !1, e);
|
|
6524
6544
|
}
|
|
6525
6545
|
/**
|
|
6526
6546
|
* @param {import("../Feature.js").default} feature Features.
|
|
@@ -6546,7 +6566,7 @@ class Xs extends Ns {
|
|
|
6546
6566
|
const i = [];
|
|
6547
6567
|
for (let s = 0, o = t.length; s < o; ++s)
|
|
6548
6568
|
i.push(t[s].getGeometry());
|
|
6549
|
-
const r = new
|
|
6569
|
+
const r = new V(i);
|
|
6550
6570
|
return this.writeGeometryText(r, e);
|
|
6551
6571
|
}
|
|
6552
6572
|
/**
|
|
@@ -6557,105 +6577,105 @@ class Xs extends Ns {
|
|
|
6557
6577
|
* @override
|
|
6558
6578
|
*/
|
|
6559
6579
|
writeGeometryText(t, e) {
|
|
6560
|
-
return
|
|
6580
|
+
return pn(Et(t, !0, e));
|
|
6561
6581
|
}
|
|
6562
6582
|
}
|
|
6563
|
-
function
|
|
6583
|
+
function fn(n) {
|
|
6564
6584
|
const t = n.getCoordinates();
|
|
6565
6585
|
return t.length === 0 ? "" : t.join(" ");
|
|
6566
6586
|
}
|
|
6567
|
-
function
|
|
6587
|
+
function Vs(n) {
|
|
6568
6588
|
const t = [], e = n.getPoints();
|
|
6569
6589
|
for (let i = 0, r = e.length; i < r; ++i)
|
|
6570
|
-
t.push("(" +
|
|
6590
|
+
t.push("(" + fn(e[i]) + ")");
|
|
6571
6591
|
return t.join(",");
|
|
6572
6592
|
}
|
|
6573
|
-
function
|
|
6593
|
+
function zs(n) {
|
|
6574
6594
|
const t = [], e = n.getGeometries();
|
|
6575
6595
|
for (let i = 0, r = e.length; i < r; ++i)
|
|
6576
|
-
t.push(
|
|
6596
|
+
t.push(pn(e[i]));
|
|
6577
6597
|
return t.join(",");
|
|
6578
6598
|
}
|
|
6579
|
-
function
|
|
6599
|
+
function je(n) {
|
|
6580
6600
|
const t = n.getCoordinates(), e = [];
|
|
6581
6601
|
for (let i = 0, r = t.length; i < r; ++i)
|
|
6582
6602
|
e.push(t[i].join(" "));
|
|
6583
6603
|
return e.join(",");
|
|
6584
6604
|
}
|
|
6585
|
-
function
|
|
6605
|
+
function Js(n) {
|
|
6586
6606
|
const t = [], e = n.getLineStrings();
|
|
6587
6607
|
for (let i = 0, r = e.length; i < r; ++i)
|
|
6588
|
-
t.push("(" +
|
|
6608
|
+
t.push("(" + je(e[i]) + ")");
|
|
6589
6609
|
return t.join(",");
|
|
6590
6610
|
}
|
|
6591
|
-
function
|
|
6611
|
+
function gn(n) {
|
|
6592
6612
|
const t = [], e = n.getLinearRings();
|
|
6593
6613
|
for (let i = 0, r = e.length; i < r; ++i)
|
|
6594
|
-
t.push("(" +
|
|
6614
|
+
t.push("(" + je(e[i]) + ")");
|
|
6595
6615
|
return t.join(",");
|
|
6596
6616
|
}
|
|
6597
|
-
function
|
|
6617
|
+
function Ws(n) {
|
|
6598
6618
|
const t = [], e = n.getPolygons();
|
|
6599
6619
|
for (let i = 0, r = e.length; i < r; ++i)
|
|
6600
|
-
t.push("(" +
|
|
6620
|
+
t.push("(" + gn(e[i]) + ")");
|
|
6601
6621
|
return t.join(",");
|
|
6602
6622
|
}
|
|
6603
|
-
function
|
|
6623
|
+
function qs(n) {
|
|
6604
6624
|
const t = n.getLayout();
|
|
6605
6625
|
let e = "";
|
|
6606
|
-
return (t === "XYZ" || t === "XYZM") && (e +=
|
|
6607
|
-
}
|
|
6608
|
-
const
|
|
6609
|
-
Point:
|
|
6610
|
-
LineString:
|
|
6611
|
-
Polygon:
|
|
6612
|
-
MultiPoint:
|
|
6613
|
-
MultiLineString:
|
|
6614
|
-
MultiPolygon:
|
|
6615
|
-
GeometryCollection:
|
|
6626
|
+
return (t === "XYZ" || t === "XYZM") && (e += un), (t === "XYM" || t === "XYZM") && (e += dn), e;
|
|
6627
|
+
}
|
|
6628
|
+
const Ks = {
|
|
6629
|
+
Point: fn,
|
|
6630
|
+
LineString: je,
|
|
6631
|
+
Polygon: gn,
|
|
6632
|
+
MultiPoint: Vs,
|
|
6633
|
+
MultiLineString: Js,
|
|
6634
|
+
MultiPolygon: Ws,
|
|
6635
|
+
GeometryCollection: zs
|
|
6616
6636
|
};
|
|
6617
|
-
function
|
|
6618
|
-
const t = n.getType(), e =
|
|
6619
|
-
let r =
|
|
6637
|
+
function pn(n) {
|
|
6638
|
+
const t = n.getType(), e = Ks[t], i = e(n);
|
|
6639
|
+
let r = Us[t];
|
|
6620
6640
|
if (typeof /** @type {?} */
|
|
6621
6641
|
n.getFlatCoordinates == "function") {
|
|
6622
|
-
const s =
|
|
6642
|
+
const s = qs(
|
|
6623
6643
|
/** @type {import("../geom/SimpleGeometry.js").default} */
|
|
6624
6644
|
n
|
|
6625
6645
|
);
|
|
6626
6646
|
s.length > 0 && (r += " " + s);
|
|
6627
6647
|
}
|
|
6628
|
-
return i.length === 0 ? r + " " +
|
|
6648
|
+
return i.length === 0 ? r + " " + cn : r + "(" + i + ")";
|
|
6629
6649
|
}
|
|
6630
|
-
const
|
|
6650
|
+
const Ds = (n, t) => new Bs().writeFeatures(n, t);
|
|
6631
6651
|
/**
|
|
6632
6652
|
* @license
|
|
6633
6653
|
* Copyright 2021 Google LLC
|
|
6634
6654
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6635
6655
|
*/
|
|
6636
|
-
function
|
|
6656
|
+
function vi(n, t, e) {
|
|
6637
6657
|
return n ? t(n) : e == null ? void 0 : e(n);
|
|
6638
6658
|
}
|
|
6639
|
-
var
|
|
6640
|
-
class
|
|
6659
|
+
var xt, Pt;
|
|
6660
|
+
class yn extends X {
|
|
6641
6661
|
constructor() {
|
|
6642
6662
|
super();
|
|
6643
6663
|
/**
|
|
6644
6664
|
* @type boolean | import("lit").nothing
|
|
6645
6665
|
*/
|
|
6646
|
-
F(this,
|
|
6666
|
+
F(this, xt, !0);
|
|
6647
6667
|
/**
|
|
6648
6668
|
* @type boolean | import("lit").nothing
|
|
6649
6669
|
*/
|
|
6650
|
-
F(this,
|
|
6670
|
+
F(this, Pt, !0);
|
|
6651
6671
|
this.multipleFeatures = !1, this.drawnFeatures = [], this.importFeatures = !1, this.showEditor = !1, this.currentlyDrawing = !1, this.drawFunc = null, this.geoJSON = "", this.unstyled = !1, this.select = !1;
|
|
6652
6672
|
}
|
|
6653
6673
|
/**
|
|
6654
6674
|
* Updates button states based on conditions
|
|
6655
6675
|
*/
|
|
6656
6676
|
updateButtonStates() {
|
|
6657
|
-
const { drawDisabled: e, discardDisabled: i } =
|
|
6658
|
-
$(this,
|
|
6677
|
+
const { drawDisabled: e, discardDisabled: i } = Qn(this);
|
|
6678
|
+
$(this, xt, e), $(this, Pt, i);
|
|
6659
6679
|
}
|
|
6660
6680
|
/**
|
|
6661
6681
|
* Overrides createRenderRoot to handle shadow DOM
|
|
@@ -6668,8 +6688,8 @@ class fn extends U {
|
|
|
6668
6688
|
const e = this.currentlyDrawing ? "drawing" : "draw";
|
|
6669
6689
|
return H`
|
|
6670
6690
|
<style>
|
|
6671
|
-
${!this.unstyled &&
|
|
6672
|
-
${!this.unstyled &&
|
|
6691
|
+
${!this.unstyled && tr}
|
|
6692
|
+
${!this.unstyled && er}
|
|
6673
6693
|
</style>
|
|
6674
6694
|
<div class="wrap-btn">
|
|
6675
6695
|
<slot></slot>
|
|
@@ -6678,7 +6698,7 @@ class fn extends U {
|
|
|
6678
6698
|
<button
|
|
6679
6699
|
data-cy="drawBtn"
|
|
6680
6700
|
class="${this.select ? "pointer" : "polygon"} icon"
|
|
6681
|
-
?disabled="${M(this,
|
|
6701
|
+
?disabled="${M(this, xt) || w}"
|
|
6682
6702
|
@click="${() => this.drawFunc.start()}"
|
|
6683
6703
|
>
|
|
6684
6704
|
${e}
|
|
@@ -6688,7 +6708,7 @@ class fn extends U {
|
|
|
6688
6708
|
<button
|
|
6689
6709
|
data-cy="discardBtn"
|
|
6690
6710
|
class="discard icon"
|
|
6691
|
-
?disabled="${M(this,
|
|
6711
|
+
?disabled="${M(this, Pt) || w}"
|
|
6692
6712
|
@click="${() => this.drawFunc.discard()}"
|
|
6693
6713
|
>
|
|
6694
6714
|
discard
|
|
@@ -6696,7 +6716,7 @@ class fn extends U {
|
|
|
6696
6716
|
</div>
|
|
6697
6717
|
|
|
6698
6718
|
<!-- Import Button -->
|
|
6699
|
-
${
|
|
6719
|
+
${vi(
|
|
6700
6720
|
this.importFeatures,
|
|
6701
6721
|
() => H`
|
|
6702
6722
|
<!-- Import Input Field : Hidden -->
|
|
@@ -6723,7 +6743,7 @@ class fn extends U {
|
|
|
6723
6743
|
</div>
|
|
6724
6744
|
|
|
6725
6745
|
<!-- Geo JSON Wrapper -->
|
|
6726
|
-
${
|
|
6746
|
+
${vi(
|
|
6727
6747
|
this.showEditor,
|
|
6728
6748
|
() => H`
|
|
6729
6749
|
<div class="json-wrapper">
|
|
@@ -6738,9 +6758,9 @@ class fn extends U {
|
|
|
6738
6758
|
<button
|
|
6739
6759
|
data-cy="copyBtn"
|
|
6740
6760
|
class="icon-copy"
|
|
6741
|
-
@click=${() =>
|
|
6761
|
+
@click=${() => ir(this.geoJSON)}
|
|
6742
6762
|
>
|
|
6743
|
-
${this.unstyled ? "copy" :
|
|
6763
|
+
${this.unstyled ? "copy" : w}
|
|
6744
6764
|
</button>
|
|
6745
6765
|
</div>
|
|
6746
6766
|
`
|
|
@@ -6748,8 +6768,8 @@ class fn extends U {
|
|
|
6748
6768
|
`;
|
|
6749
6769
|
}
|
|
6750
6770
|
}
|
|
6751
|
-
|
|
6752
|
-
R(
|
|
6771
|
+
xt = new WeakMap(), Pt = new WeakMap(), // Define properties with default values and types
|
|
6772
|
+
R(yn, "properties", {
|
|
6753
6773
|
multipleFeatures: { attribute: !1, type: Boolean },
|
|
6754
6774
|
drawnFeatures: { attribute: !1, state: !0, type: Array },
|
|
6755
6775
|
currentlyDrawing: { attribute: !1, state: !0, type: Boolean },
|
|
@@ -6760,7 +6780,7 @@ R(fn, "properties", {
|
|
|
6760
6780
|
geoJSON: { attribute: "geo-json", type: String },
|
|
6761
6781
|
unstyled: { type: Boolean }
|
|
6762
6782
|
});
|
|
6763
|
-
customElements.define("eox-drawtools-controller",
|
|
6783
|
+
customElements.define("eox-drawtools-controller", yn);
|
|
6764
6784
|
const Zs = `
|
|
6765
6785
|
button.discard:before {
|
|
6766
6786
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23FF5252' viewBox='0 0 24 24'%3E%3Ctitle%3Etrash-can-outline%3C/title%3E%3Cpath d='M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z' /%3E%3C/svg%3E")
|
|
@@ -6806,7 +6826,7 @@ const Zs = `
|
|
|
6806
6826
|
color: white;
|
|
6807
6827
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctitle%3Econtent-copy%3C/title%3E%3Cpath d='M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z' fill='white' /%3E%3C/svg%3E")
|
|
6808
6828
|
}
|
|
6809
|
-
`,
|
|
6829
|
+
`, Qs = (n) => {
|
|
6810
6830
|
(() => {
|
|
6811
6831
|
if (n.emitDrawnFeatures(), !n.multipleFeatures)
|
|
6812
6832
|
n.draw.setActive(!1), n.selectionEvents.removeSelectionEvent(), n.currentlyDrawing = !1;
|
|
@@ -6815,23 +6835,25 @@ const Zs = `
|
|
|
6815
6835
|
n.drawLayer.getSource().clear(), n.drawnFeatures = [];
|
|
6816
6836
|
else {
|
|
6817
6837
|
const i = n.drawLayer.getSource().getFeatures().at(-1);
|
|
6818
|
-
n.drawLayer.getSource().clear(),
|
|
6838
|
+
if (n.drawLayer.getSource().clear(), !i)
|
|
6839
|
+
return;
|
|
6840
|
+
n.drawLayer.getSource().addFeature(i), n.drawnFeatures = [i];
|
|
6819
6841
|
}
|
|
6820
6842
|
})(), n.requestUpdate();
|
|
6821
|
-
},
|
|
6843
|
+
}, to = (n) => {
|
|
6822
6844
|
const t = () => {
|
|
6823
6845
|
n.drawLayer.set("isDrawingEnabled", !0), n.draw.setActive(!0), n.selectionEvents.addSelectionEvent();
|
|
6824
6846
|
}, e = () => {
|
|
6825
6847
|
n.currentlyDrawing = !0, n.requestUpdate();
|
|
6826
6848
|
};
|
|
6827
6849
|
t(), e();
|
|
6828
|
-
},
|
|
6850
|
+
}, eo = (n) => {
|
|
6829
6851
|
let t;
|
|
6830
6852
|
return typeof n == "string" ? t = /** @type {HTMLElement} */
|
|
6831
6853
|
document.querySelector(n) : t = n, t;
|
|
6832
|
-
},
|
|
6854
|
+
}, wi = (n, t) => {
|
|
6833
6855
|
var s, o, a, l, h;
|
|
6834
|
-
const i =
|
|
6856
|
+
const i = eo(n.for), r = i.map;
|
|
6835
6857
|
return n.drawLayer = i.addOrUpdateLayer({
|
|
6836
6858
|
zIndex: 100,
|
|
6837
6859
|
type: "Vector",
|
|
@@ -6888,15 +6910,15 @@ const Zs = `
|
|
|
6888
6910
|
/** @type {unknown} */
|
|
6889
6911
|
i.interactions.drawInteraction, n.modify = /** @type {import("ol/interaction").Modify} */
|
|
6890
6912
|
/** @type {unknown} */
|
|
6891
|
-
i.interactions.drawInteractionmodify, ge(n, i, n.layerId), (h = n.modify) == null || h.on("modifyend", () => n.onModifyEnd()), i.addEventListener("addfeatures", () =>
|
|
6892
|
-
},
|
|
6913
|
+
i.interactions.drawInteractionmodify, ge(n, i, n.layerId), (h = n.modify) == null || h.on("modifyend", () => n.onModifyEnd()), i.addEventListener("addfeatures", () => Qs(n)), { EoxMap: i, OlMap: r };
|
|
6914
|
+
}, io = (n) => {
|
|
6893
6915
|
const t = () => {
|
|
6894
6916
|
n.drawnFeatures = [], n.draw.setActive(!1), n.selectionEvents.removeSelectionEvent(), n.drawLayer.getSource().clear(), n.geoJSON = null;
|
|
6895
6917
|
}, e = () => {
|
|
6896
6918
|
n.emitDrawnFeatures(), n.currentlyDrawing = !1, n.requestUpdate();
|
|
6897
6919
|
};
|
|
6898
6920
|
t(), e();
|
|
6899
|
-
},
|
|
6921
|
+
}, no = (n, t) => {
|
|
6900
6922
|
setTimeout(() => {
|
|
6901
6923
|
const i = n.drawLayer.getSource().getFeatures(), r = n.eoxMap.projection || "EPSG:3857", s = n.projection;
|
|
6902
6924
|
n.drawnFeatures = s ? i.map((a) => {
|
|
@@ -6907,10 +6929,10 @@ const Zs = `
|
|
|
6907
6929
|
let o;
|
|
6908
6930
|
switch (n.format) {
|
|
6909
6931
|
case "geojson":
|
|
6910
|
-
o =
|
|
6932
|
+
o = Os(n.drawnFeatures);
|
|
6911
6933
|
break;
|
|
6912
6934
|
case "wkt":
|
|
6913
|
-
o =
|
|
6935
|
+
o = Ds(n.drawnFeatures);
|
|
6914
6936
|
break;
|
|
6915
6937
|
case "feature":
|
|
6916
6938
|
o = n.drawnFeatures;
|
|
@@ -6921,7 +6943,7 @@ const Zs = `
|
|
|
6921
6943
|
}
|
|
6922
6944
|
n.updateGeoJSON(), n.requestUpdate(), t(o);
|
|
6923
6945
|
}, 0);
|
|
6924
|
-
},
|
|
6946
|
+
}, ro = (n) => {
|
|
6925
6947
|
const t = (r) => {
|
|
6926
6948
|
(r == null ? void 0 : r.detail.id) !== "SelectLayerClickInteraction" || !r.detail.feature || (n.drawLayer.getSource().addFeature(r.detail.feature), n.eoxMap.dispatchEvent(
|
|
6927
6949
|
new CustomEvent("addfeatures", { detail: r.detail })
|
|
@@ -6935,33 +6957,31 @@ const Zs = `
|
|
|
6935
6957
|
r && (r.selectedFids = [], r.setActive(!1)), n.eoxMap.removeEventListener("select", t);
|
|
6936
6958
|
} };
|
|
6937
6959
|
}, ge = (n, t, e) => {
|
|
6938
|
-
var
|
|
6960
|
+
var l, h;
|
|
6939
6961
|
if (!e || !t)
|
|
6940
6962
|
return;
|
|
6941
|
-
const i =
|
|
6942
|
-
|
|
6943
|
-
|
|
6944
|
-
|
|
6945
|
-
|
|
6946
|
-
) || null;
|
|
6947
|
-
if (!i) {
|
|
6963
|
+
const i = t.getLayerById(e), r = i ? (
|
|
6964
|
+
/** @type {import("@eox/map").EoxLayer} */
|
|
6965
|
+
JSON.parse(JSON.stringify(i.get("_jsonDefinition")))
|
|
6966
|
+
) : null;
|
|
6967
|
+
if (!r) {
|
|
6948
6968
|
console.error(`Layer with id ${e} not found`);
|
|
6949
6969
|
return;
|
|
6950
6970
|
}
|
|
6951
|
-
const
|
|
6971
|
+
const s = {
|
|
6952
6972
|
type: "select",
|
|
6953
6973
|
active: !1,
|
|
6954
6974
|
options: {
|
|
6955
6975
|
id: "SelectLayerHoverInteraction",
|
|
6956
6976
|
condition: "pointermove",
|
|
6957
6977
|
active: !1,
|
|
6958
|
-
style: ((
|
|
6978
|
+
style: ((l = n.featureStyles) == null ? void 0 : l.hover) || {
|
|
6959
6979
|
"fill-color": "rgba(0, 0, 0,0.0)",
|
|
6960
6980
|
"stroke-color": "#3399CC",
|
|
6961
6981
|
"stroke-width": 2.5
|
|
6962
6982
|
}
|
|
6963
6983
|
}
|
|
6964
|
-
},
|
|
6984
|
+
}, o = {
|
|
6965
6985
|
type: "select",
|
|
6966
6986
|
options: {
|
|
6967
6987
|
id: "SelectLayerClickInteraction",
|
|
@@ -6969,16 +6989,30 @@ const Zs = `
|
|
|
6969
6989
|
multi: n.multipleFeatures,
|
|
6970
6990
|
modify: n.allowModify,
|
|
6971
6991
|
active: !1,
|
|
6972
|
-
style: ((
|
|
6992
|
+
style: ((h = n.featureStyles) == null ? void 0 : h.click) || {
|
|
6973
6993
|
"fill-color": "rgba(0, 0, 0,0.0)",
|
|
6974
6994
|
"stroke-color": "rgba(0, 0, 0,0.0)"
|
|
6975
6995
|
}
|
|
6976
6996
|
}
|
|
6977
6997
|
};
|
|
6978
|
-
|
|
6979
|
-
const
|
|
6980
|
-
n.draw = t.selectInteractions.SelectLayerClickInteraction,
|
|
6981
|
-
}
|
|
6998
|
+
r.interactions = [s, o], t.addOrUpdateLayer(r), mn(t.layers, e, [r]);
|
|
6999
|
+
const a = n.draw;
|
|
7000
|
+
n.draw = t.selectInteractions.SelectLayerClickInteraction, a.setActive(!1), t.selectInteractions.SelectLayerClickInteraction.setActive(!1), t.selectInteractions.SelectLayerHoverInteraction.setActive(!1);
|
|
7001
|
+
};
|
|
7002
|
+
function mn(n, t, e) {
|
|
7003
|
+
const i = n.findIndex(
|
|
7004
|
+
(r) => r.properties.id === t
|
|
7005
|
+
);
|
|
7006
|
+
if (i !== -1)
|
|
7007
|
+
return n.splice(i, 1, ...e), n;
|
|
7008
|
+
for (const r of n)
|
|
7009
|
+
if (r.type === "Group") {
|
|
7010
|
+
const s = mn(r.layers, t, e);
|
|
7011
|
+
s != null && s.length && (r.layers = s);
|
|
7012
|
+
}
|
|
7013
|
+
return n;
|
|
7014
|
+
}
|
|
7015
|
+
const so = (n, t, e, i) => {
|
|
6982
7016
|
if (t) {
|
|
6983
7017
|
if (e) {
|
|
6984
7018
|
i && e !== i && Ci(n, t), ge(n, t, e);
|
|
@@ -6994,8 +7028,8 @@ function Ci(n, t) {
|
|
|
6994
7028
|
t && (n.discardDrawing(), n.selectionEvents.removeSelectionEvent(), n.draw = /** @type {import("ol/interaction").Draw} */
|
|
6995
7029
|
t.interactions.drawInteraction, t.selectInteractions.SelectLayerClickInteraction.remove(), t.selectInteractions.SelectLayerHoverInteraction.remove());
|
|
6996
7030
|
}
|
|
6997
|
-
const
|
|
6998
|
-
function
|
|
7031
|
+
const oo = ':root,:host { --spacing: 1rem; --block-spacing-vertical: calc(var(--spacing) * 2); --block-spacing-horizontal: var(--spacing); --background-color: var(--eox-background-color, transparent); --color: var(--eox-color, #2c3d49); --h-color: var(--eox-h-color, var(--color)); --hover-transparency: var(--eox-hover-transparency, 20%); --bg-hover-transparency: var(--eox-bg-hover-transparency, 40%); --btn-hover-transparency: var(--eox-btn-hover-transparency, 80%); --primary-color: var(--eox-primary-color, #004170); --primary-color-hover: color-mix( in srgb, var(--primary-color) var(--hover-transparency), transparent ); --primary-bg-color-hover: color-mix( in srgb, var(--primary-color) var(--bg-hover-transparency), transparent ); --primary-btn-color-hover: color-mix( in srgb, var(--primary-color) var(--btn-hover-transparency), transparent ); --secondary-color: var(--eox-secondary-color, #c6d4df); --secondary-color-hover: color-mix( in srgb, var(--secondary-color) var(--hover-transparency), transparent ); --secondary-bg-color-hover: color-mix( in srgb, var(--secondary-color) var(--bg-hover-transparency), transparent ); --secondary-btn-color-hover: color-mix( in srgb, var(--secondary-color) var(--btn-hover-transparency), transparent ); --success: var(--eox-success, #26cc0f); --warning: var(--eox-warning, #f18e32); --error: var(--eox-error, #ff5252); --header-font-family: var(--eox-header-font-family, "Roboto", sans-serif); --body-font-family: var(--eox-body-font-family, "Roboto", sans-serif);}* { font-size: normal; font-family: var(--body-font-family); color: var(--eox-color);}h1,h2,h3,h4,h5,h6 { font-family: var(--header-font-family);}span,p,div,main,label { font-family: var(--body-font-family);}@media (min-width: 576px) { .container { max-width: 510px; padding-right: 0; padding-left: 0; --block-spacing-vertical: calc(var(--spacing) * 2.5); }}@media (min-width: 768px) { .container { max-width: 700px; --block-spacing-vertical: calc(var(--spacing) * 3); }}@media (min-width: 992px) { .container { max-width: 920px; --block-spacing-vertical: calc(var(--spacing) * 3.5); }}@media (min-width: 1200px) { .container { max-width: 1130px; --block-spacing-vertical: calc(var(--spacing) * 4); }}.container { width: 100%; margin-right: auto; margin-left: auto; display: block; padding: var(--block-spacing-vertical) var(--block-spacing-horizontal);}h1,h2,h3 { line-height: 120%; margin-top: 0.8rem; margin-bottom: 0.8rem;}p { --font-size: 1rem; font-weight: 400; line-height: 170%; margin-top: 0.8rem; margin-bottom: 1.6rem; font-size: var(--font-size);}body { padding: 0; margin: 0;}.sb-show-main.sb-main-padded { padding: 0;}h1,h2,h3,h4,h5,h6 { --font-weight: 700;}h1 { --font-size: 3rem; --typography-spacing-vertical: 0.5rem;}h2 { --font-size: 2rem; --typography-spacing-vertical: 0.5rem;}h3 { --font-size: 1.75rem; --typography-spacing-vertical: 0.5rem;}h4 { --font-size: 1.5rem; --typography-spacing-vertical: 0.5rem;}h5 { --font-size: 1.25rem; --typography-spacing-vertical: 0.5rem;}h1,h2,h3,h4,h5,h6 { margin-top: 0; margin-bottom: var(--typography-spacing-vertical); color: var(--h-color); font-weight: var(--font-weight); font-size: var(--font-size); font-family: var(--header-font-family);}pre { position: relative; border-radius: 4px; z-index: 1; margin: 0; padding: 20px 0; background: transparent; background: var(--code-bg-color, #8e96aa24); overflow: auto;}code { display: block; padding: 0 24px; width: fit-content; min-width: 100%; line-height: var(--code-line-height, 1.7); font-family: var(--code-font-family, monospace); font-size: var(--code-font-size, var(--font-size)); color: var(--code-color, #004170);}:not(pre) > code { display: inline; border-radius: 4px; background: var(--code-bg-color, #8e96aa24); padding: var(--code-padding, 3px 6px);}';
|
|
7032
|
+
function ao(n, t) {
|
|
6999
7033
|
function e(s) {
|
|
7000
7034
|
s.preventDefault(), s.stopPropagation();
|
|
7001
7035
|
}
|
|
@@ -7007,50 +7041,50 @@ function so(n, t) {
|
|
|
7007
7041
|
}
|
|
7008
7042
|
["dragenter", "dragover", "dragleave", "drop"].forEach((s) => {
|
|
7009
7043
|
t.addEventListener(s, e, !1), ["dragenter", "dragover"].includes(s) ? t.addEventListener(s, i, !1) : t.addEventListener(s, r, !1);
|
|
7010
|
-
}), t.addEventListener("drop", (s) =>
|
|
7044
|
+
}), t.addEventListener("drop", (s) => _n(s, n), !1);
|
|
7011
7045
|
}
|
|
7012
|
-
function
|
|
7046
|
+
function lo(n) {
|
|
7013
7047
|
n.preventDefault(), n.stopPropagation();
|
|
7014
7048
|
}
|
|
7015
|
-
function
|
|
7016
|
-
|
|
7049
|
+
function _n(n, t) {
|
|
7050
|
+
lo(n);
|
|
7017
7051
|
const e = n.dataTransfer ? n.dataTransfer.files : (
|
|
7018
7052
|
/**@type {HTMLInputElement}*/
|
|
7019
7053
|
n.target.files
|
|
7020
7054
|
);
|
|
7021
|
-
Array.from(e).forEach((i) =>
|
|
7055
|
+
Array.from(e).forEach((i) => ho(i, t));
|
|
7022
7056
|
}
|
|
7023
|
-
function
|
|
7057
|
+
function ho(n, t) {
|
|
7024
7058
|
const e = new FileReader();
|
|
7025
7059
|
e.readAsText(n), e.onloadend = function() {
|
|
7026
7060
|
typeof e.result == "string" && t.handleFeatureChange(e.result);
|
|
7027
7061
|
};
|
|
7028
7062
|
}
|
|
7029
|
-
var
|
|
7030
|
-
class
|
|
7063
|
+
var rt, st, Mt, ot, St;
|
|
7064
|
+
class co extends X {
|
|
7031
7065
|
constructor() {
|
|
7032
7066
|
super();
|
|
7033
7067
|
/**
|
|
7034
7068
|
* @type import("@eox/map").EOxMap
|
|
7035
7069
|
*/
|
|
7036
|
-
F(this,
|
|
7070
|
+
F(this, rt);
|
|
7037
7071
|
/**
|
|
7038
7072
|
* @type import("ol").Map
|
|
7039
7073
|
*/
|
|
7040
|
-
F(this,
|
|
7074
|
+
F(this, st);
|
|
7041
7075
|
/**
|
|
7042
7076
|
* @type string
|
|
7043
7077
|
*/
|
|
7044
|
-
F(this,
|
|
7078
|
+
F(this, Mt);
|
|
7045
7079
|
/**
|
|
7046
7080
|
* @type string
|
|
7047
7081
|
*/
|
|
7048
|
-
F(this,
|
|
7082
|
+
F(this, ot);
|
|
7049
7083
|
/**
|
|
7050
7084
|
* @type boolean
|
|
7051
7085
|
*/
|
|
7052
|
-
F(this,
|
|
7053
|
-
this.allowModify = !1, this.for = "eox-map", this.currentlyDrawing = !1, this.draw = null, this.drawLayer = null, this.layerId = "", this.drawnFeatures = [], this.featureName = "Feature", this.featureStyles = null, this.modify = null, this.multipleFeatures = !1, this.importFeatures = !1, this.showEditor = !1, this.showList = !1, this.projection = "EPSG:4326", this.type = "Polygon", this.selectionEvents = null, this.format = "feature", this.unstyled = !1, this.noShadow = !1;
|
|
7086
|
+
F(this, St);
|
|
7087
|
+
this.allowModify = !1, this.for = "eox-map", this.currentlyDrawing = !1, this.draw = null, this.drawLayer = null, this.layerId = "", this.drawnFeatures = [], this.featureName = "Feature", this.featureNameKey = null, this.featureStyles = null, this.modify = null, this.multipleFeatures = !1, this.importFeatures = !1, this.showEditor = !1, this.showList = !1, this.projection = "EPSG:4326", this.type = "Polygon", this.selectionEvents = null, this.format = "feature", this.unstyled = !1, this.noShadow = !1;
|
|
7054
7088
|
}
|
|
7055
7089
|
// Define properties with defaults and types
|
|
7056
7090
|
static get properties() {
|
|
@@ -7063,6 +7097,7 @@ class lo extends U {
|
|
|
7063
7097
|
drawLayer: { attribute: !1, state: !0 },
|
|
7064
7098
|
drawnFeatures: { attribute: !1, state: !0, type: Array },
|
|
7065
7099
|
featureName: { attribute: "feature-name", type: String },
|
|
7100
|
+
featureNameKey: { attribute: "feature-name-key", type: String },
|
|
7066
7101
|
layerId: { attribute: "layer-id", type: String },
|
|
7067
7102
|
featureStyles: { attribute: !1 },
|
|
7068
7103
|
modify: { attribute: !1, state: !0 },
|
|
@@ -7083,33 +7118,33 @@ class lo extends U {
|
|
|
7083
7118
|
* @type {boolean}
|
|
7084
7119
|
*/
|
|
7085
7120
|
set continuous(e) {
|
|
7086
|
-
$(this,
|
|
7121
|
+
$(this, St, e), e && (this.multipleFeatures = !0);
|
|
7087
7122
|
}
|
|
7088
7123
|
get continuous() {
|
|
7089
|
-
return M(this,
|
|
7124
|
+
return M(this, St);
|
|
7090
7125
|
}
|
|
7091
7126
|
/**
|
|
7092
7127
|
* Enables selection mode for the passed layer
|
|
7093
7128
|
* @type {string}
|
|
7094
7129
|
*/
|
|
7095
7130
|
set layerId(e) {
|
|
7096
|
-
|
|
7131
|
+
so(this, this.eoxMap, e, M(this, ot)), $(this, ot, e);
|
|
7097
7132
|
}
|
|
7098
7133
|
get layerId() {
|
|
7099
|
-
return M(this,
|
|
7134
|
+
return M(this, ot);
|
|
7100
7135
|
}
|
|
7101
7136
|
/**
|
|
7102
7137
|
* @onClick Event handler triggered to start drawing on the map.
|
|
7103
7138
|
*/
|
|
7104
7139
|
startDrawing() {
|
|
7105
|
-
|
|
7140
|
+
to(this);
|
|
7106
7141
|
}
|
|
7107
7142
|
/**
|
|
7108
7143
|
* @onClick Event handler triggered to discard/stop drawing
|
|
7109
7144
|
* on the map and delete the drawn shapes.
|
|
7110
7145
|
*/
|
|
7111
7146
|
discardDrawing() {
|
|
7112
|
-
|
|
7147
|
+
io(this);
|
|
7113
7148
|
}
|
|
7114
7149
|
/**
|
|
7115
7150
|
* @param {string} text - The string representation of the features to be parsed.
|
|
@@ -7118,7 +7153,7 @@ class lo extends U {
|
|
|
7118
7153
|
*/
|
|
7119
7154
|
handleFeatureChange(e, i = !1, r = !0) {
|
|
7120
7155
|
this.eoxMap.parseTextToFeature(
|
|
7121
|
-
e || JSON.stringify(
|
|
7156
|
+
e || JSON.stringify(ei),
|
|
7122
7157
|
this.drawLayer,
|
|
7123
7158
|
this.eoxMap,
|
|
7124
7159
|
i,
|
|
@@ -7133,7 +7168,7 @@ class lo extends U {
|
|
|
7133
7168
|
* @param {DragEvent} evt - The event object from the file input interaction.
|
|
7134
7169
|
*/
|
|
7135
7170
|
handleFilesChange(e) {
|
|
7136
|
-
|
|
7171
|
+
_n(e, this);
|
|
7137
7172
|
}
|
|
7138
7173
|
/**
|
|
7139
7174
|
* @event onModifyEnd triggered when the modification of a shape is completed.
|
|
@@ -7145,8 +7180,8 @@ class lo extends U {
|
|
|
7145
7180
|
* Update #geoJSON with stringify feature.
|
|
7146
7181
|
*/
|
|
7147
7182
|
updateGeoJSON() {
|
|
7148
|
-
$(this,
|
|
7149
|
-
this.eoxMap.parseFeature(this.drawnFeatures) ||
|
|
7183
|
+
$(this, Mt, JSON.stringify(
|
|
7184
|
+
this.eoxMap.parseFeature(this.drawnFeatures) || ei,
|
|
7150
7185
|
void 0,
|
|
7151
7186
|
2
|
|
7152
7187
|
));
|
|
@@ -7155,7 +7190,7 @@ class lo extends U {
|
|
|
7155
7190
|
* Triggers different events when the drawing of a shape is completed.
|
|
7156
7191
|
*/
|
|
7157
7192
|
emitDrawnFeatures() {
|
|
7158
|
-
|
|
7193
|
+
no(this, (i) => {
|
|
7159
7194
|
this.dispatchEvent(new CustomEvent("drawupdate", { detail: i }));
|
|
7160
7195
|
});
|
|
7161
7196
|
}
|
|
@@ -7171,21 +7206,21 @@ class lo extends U {
|
|
|
7171
7206
|
* It then calls requestUpdate to trigger a re-render.
|
|
7172
7207
|
*/
|
|
7173
7208
|
firstUpdated() {
|
|
7174
|
-
const { EoxMap: e, OlMap: i } =
|
|
7175
|
-
this.eoxMap = e, $(this,
|
|
7209
|
+
const { EoxMap: e, OlMap: i } = wi(this, this.multipleFeatures);
|
|
7210
|
+
this.eoxMap = e, $(this, st, i), this.selectionEvents = ro(this), this.importFeatures && ao(this, this.eoxMap), this.updateGeoJSON(), this.requestUpdate();
|
|
7176
7211
|
}
|
|
7177
7212
|
updated(e) {
|
|
7178
7213
|
if (e.has("for")) {
|
|
7179
|
-
const { EoxMap: i, OlMap: r } =
|
|
7180
|
-
this.eoxMap = i, $(this,
|
|
7214
|
+
const { EoxMap: i, OlMap: r } = wi(this, this.multipleFeatures);
|
|
7215
|
+
this.eoxMap = i, $(this, st, r);
|
|
7181
7216
|
}
|
|
7182
7217
|
}
|
|
7183
7218
|
get eoxMap() {
|
|
7184
|
-
return M(this,
|
|
7219
|
+
return M(this, rt);
|
|
7185
7220
|
}
|
|
7186
7221
|
set eoxMap(e) {
|
|
7187
|
-
const i = M(this,
|
|
7188
|
-
$(this,
|
|
7222
|
+
const i = M(this, rt);
|
|
7223
|
+
$(this, rt, e), this.requestUpdate("eoxMap", i);
|
|
7189
7224
|
}
|
|
7190
7225
|
disconnectedCallback() {
|
|
7191
7226
|
var e;
|
|
@@ -7197,7 +7232,7 @@ class lo extends U {
|
|
|
7197
7232
|
return H`
|
|
7198
7233
|
<style>
|
|
7199
7234
|
:host { display: block; }
|
|
7200
|
-
${!this.unstyled &&
|
|
7235
|
+
${!this.unstyled && oo}
|
|
7201
7236
|
${!this.unstyled && Zs}
|
|
7202
7237
|
</style>
|
|
7203
7238
|
|
|
@@ -7216,29 +7251,30 @@ class lo extends U {
|
|
|
7216
7251
|
.multipleFeatures=${this.multipleFeatures}
|
|
7217
7252
|
.importFeatures=${this.importFeatures}
|
|
7218
7253
|
.showEditor=${this.showEditor}
|
|
7219
|
-
.geoJSON=${M(this,
|
|
7254
|
+
.geoJSON=${M(this, Mt)}
|
|
7220
7255
|
></eox-drawtools-controller>
|
|
7221
7256
|
|
|
7222
7257
|
<!-- List Component -->
|
|
7223
7258
|
${this.showList && ((e = this.drawnFeatures) != null && e.length) ? H`<eox-drawtools-list
|
|
7224
7259
|
.eoxDrawTools=${this}
|
|
7225
7260
|
.eoxMap=${this.eoxMap}
|
|
7226
|
-
.olMap=${M(this,
|
|
7261
|
+
.olMap=${M(this, st)}
|
|
7227
7262
|
.draw=${this.draw}
|
|
7228
7263
|
.drawLayer=${this.drawLayer}
|
|
7229
7264
|
.drawnFeatures=${this.drawnFeatures}
|
|
7230
7265
|
.featureName=${this.featureName}
|
|
7266
|
+
.featureNameKey=${this.featureNameKey}
|
|
7231
7267
|
.modify=${this.modify}
|
|
7232
7268
|
.unstyled=${this.unstyled}
|
|
7233
7269
|
@changed=${() => {
|
|
7234
7270
|
this.updateGeoJSON(), this.requestUpdate();
|
|
7235
7271
|
}}
|
|
7236
|
-
></eox-drawtools-list>` :
|
|
7272
|
+
></eox-drawtools-list>` : w}
|
|
7237
7273
|
`;
|
|
7238
7274
|
}
|
|
7239
7275
|
}
|
|
7240
|
-
|
|
7241
|
-
customElements.define("eox-drawtools",
|
|
7276
|
+
rt = new WeakMap(), st = new WeakMap(), Mt = new WeakMap(), ot = new WeakMap(), St = new WeakMap();
|
|
7277
|
+
customElements.define("eox-drawtools", co);
|
|
7242
7278
|
export {
|
|
7243
|
-
|
|
7279
|
+
co as EOxDrawTools
|
|
7244
7280
|
};
|