@hybridcore/ui 1.5.29 → 1.5.31
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/{Source-CnCcu5UP.js → Source-BESIjd9X.js} +770 -761
- package/dist/{Text-BT5kPHOo.js → Text-Cl1H4b0h.js} +47 -43
- package/dist/components/geometry-picker/coordinate/index.js +1 -1
- package/dist/components/geometry-picker/edit/index.js +42 -57
- package/dist/components/geometry-picker/geometry/index.js +1 -1
- package/dist/components/geometry-picker/geometry/map-overlay.js +1 -1
- package/dist/components/geometry-picker/index.js +27 -28
- package/dist/components/geometry-picker/kml/index.js +7 -7
- package/dist/components/geometry-picker/map/logic.js +2025 -680
- package/dist/components/geometry-picker/map/style.js +1 -1
- package/dist/components/geometry-picker/parser/coordinate-input/index.js +2 -2
- package/dist/components/geometry-picker/parser/coordinate-input/logic.js +122 -135
- package/dist/components/map/helpers/mapbox.js +1 -1
- package/dist/components/map/helpers/ol.js +6 -6
- package/dist/components/map/logic.js +3 -3
- package/dist/components/map/styled.js +31 -41
- package/dist/components/property-mapping/index.js +1 -1
- package/dist/components/tabs/index.js +2119 -55
- package/dist/components/tabs/styled.js +11 -3
- package/dist/{has-9_asnBxn.js → has-DNclCIDV.js} +99 -81
- package/dist/main.d.ts +3 -2
- package/dist/{ol-9hySGI6D.js → ol-lGwSyEIV.js} +331 -322
- package/package.json +2 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as S, q as W, p as K, W as _e, B as H, c as p, d as E, m as Lt, r as Re, s as j, v as me, w as ye, x as Me, f as Ce, V as Ee, u as nt, j as it, E as Ct } from "./has-DNclCIDV.js";
|
|
2
2
|
const vt = {
|
|
3
3
|
// use the radius of the Normal sphere
|
|
4
4
|
radians: 6370997 / (2 * Math.PI),
|
|
@@ -7,7 +7,7 @@ const vt = {
|
|
|
7
7
|
m: 1,
|
|
8
8
|
"us-ft": 1200 / 3937
|
|
9
9
|
};
|
|
10
|
-
class
|
|
10
|
+
class Ut {
|
|
11
11
|
/**
|
|
12
12
|
* @param {Options} options Projection options.
|
|
13
13
|
*/
|
|
@@ -140,8 +140,8 @@ class Yt {
|
|
|
140
140
|
return this.getPointResolutionFunc_;
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
|
-
const
|
|
144
|
-
class
|
|
143
|
+
const Y = 6378137, Z = Math.PI * Y, Ie = [-Z, -Z, Z, Z], Se = [-180, -85, 180, 85], z = Y * Math.log(Math.tan(Math.PI / 2));
|
|
144
|
+
class F extends Ut {
|
|
145
145
|
/**
|
|
146
146
|
* @param {string} code Code.
|
|
147
147
|
*/
|
|
@@ -149,42 +149,42 @@ class x extends Yt {
|
|
|
149
149
|
super({
|
|
150
150
|
code: t,
|
|
151
151
|
units: "m",
|
|
152
|
-
extent:
|
|
152
|
+
extent: Ie,
|
|
153
153
|
global: !0,
|
|
154
|
-
worldExtent:
|
|
154
|
+
worldExtent: Se,
|
|
155
155
|
getPointResolution: function(e, i) {
|
|
156
|
-
return e / Math.cosh(i[1] /
|
|
156
|
+
return e / Math.cosh(i[1] / Y);
|
|
157
157
|
}
|
|
158
158
|
});
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
const Et = [
|
|
162
|
-
new
|
|
163
|
-
new
|
|
164
|
-
new
|
|
165
|
-
new
|
|
166
|
-
new
|
|
167
|
-
new
|
|
162
|
+
new F("EPSG:3857"),
|
|
163
|
+
new F("EPSG:102100"),
|
|
164
|
+
new F("EPSG:102113"),
|
|
165
|
+
new F("EPSG:900913"),
|
|
166
|
+
new F("http://www.opengis.net/def/crs/EPSG/0/3857"),
|
|
167
|
+
new F("http://www.opengis.net/gml/srs/epsg.xml#3857")
|
|
168
168
|
];
|
|
169
|
-
function
|
|
169
|
+
function pe(n, t, e) {
|
|
170
170
|
const i = n.length;
|
|
171
171
|
e = e > 1 ? e : 2, t === void 0 && (e > 2 ? t = n.slice() : t = new Array(i));
|
|
172
|
-
for (let
|
|
173
|
-
t[
|
|
174
|
-
let
|
|
175
|
-
|
|
172
|
+
for (let s = 0; s < i; s += e) {
|
|
173
|
+
t[s] = Z * n[s] / 180;
|
|
174
|
+
let r = Y * Math.log(Math.tan(Math.PI * (+n[s + 1] + 90) / 360));
|
|
175
|
+
r > z ? r = z : r < -z && (r = -z), t[s + 1] = r;
|
|
176
176
|
}
|
|
177
177
|
return t;
|
|
178
178
|
}
|
|
179
|
-
function
|
|
179
|
+
function Ae(n, t, e) {
|
|
180
180
|
const i = n.length;
|
|
181
181
|
e = e > 1 ? e : 2, t === void 0 && (e > 2 ? t = n.slice() : t = new Array(i));
|
|
182
|
-
for (let
|
|
183
|
-
t[
|
|
182
|
+
for (let s = 0; s < i; s += e)
|
|
183
|
+
t[s] = 180 * n[s] / Z, t[s + 1] = 360 * Math.atan(Math.exp(n[s + 1] / Y)) / Math.PI - 90;
|
|
184
184
|
return t;
|
|
185
185
|
}
|
|
186
|
-
const
|
|
187
|
-
class N extends
|
|
186
|
+
const we = 6378137, It = [-180, -90, 180, 90], Te = Math.PI * we / 180;
|
|
187
|
+
class N extends Ut {
|
|
188
188
|
/**
|
|
189
189
|
* @param {string} code Code.
|
|
190
190
|
* @param {string} [axisOrientation] Axis orientation.
|
|
@@ -196,7 +196,7 @@ class N extends Yt {
|
|
|
196
196
|
extent: It,
|
|
197
197
|
axisOrientation: e,
|
|
198
198
|
global: !0,
|
|
199
|
-
metersPerUnit:
|
|
199
|
+
metersPerUnit: Te,
|
|
200
200
|
worldExtent: It
|
|
201
201
|
});
|
|
202
202
|
}
|
|
@@ -211,18 +211,18 @@ const St = [
|
|
|
211
211
|
new N("http://www.opengis.net/def/crs/EPSG/0/4326", "neu")
|
|
212
212
|
];
|
|
213
213
|
let ot = {};
|
|
214
|
-
function
|
|
214
|
+
function Pe(n) {
|
|
215
215
|
return ot[n] || ot[n.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/, "EPSG:$3")] || null;
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function Ne(n, t) {
|
|
218
218
|
ot[n] = t;
|
|
219
219
|
}
|
|
220
220
|
let b = {};
|
|
221
221
|
function k(n, t, e) {
|
|
222
|
-
const i = n.getCode(),
|
|
223
|
-
i in b || (b[i] = {}), b[i][
|
|
222
|
+
const i = n.getCode(), s = t.getCode();
|
|
223
|
+
i in b || (b[i] = {}), b[i][s] = e;
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function Oe(n, t) {
|
|
226
226
|
let e;
|
|
227
227
|
return n in b && t in b[n] && (e = b[n][t]), e;
|
|
228
228
|
}
|
|
@@ -237,12 +237,12 @@ const C = {
|
|
|
237
237
|
function Gn(n) {
|
|
238
238
|
const t = $();
|
|
239
239
|
for (let e = 0, i = n.length; e < i; ++e)
|
|
240
|
-
|
|
240
|
+
Xe(t, n[e]);
|
|
241
241
|
return t;
|
|
242
242
|
}
|
|
243
|
-
function
|
|
244
|
-
const i = Math.min.apply(null, n),
|
|
245
|
-
return J(i,
|
|
243
|
+
function Fe(n, t, e) {
|
|
244
|
+
const i = Math.min.apply(null, n), s = Math.min.apply(null, t), r = Math.max.apply(null, n), o = Math.max.apply(null, t);
|
|
245
|
+
return J(i, s, r, o, e);
|
|
246
246
|
}
|
|
247
247
|
function jn(n, t, e) {
|
|
248
248
|
return e ? (e[0] = n[0] - t, e[1] = n[1] - t, e[2] = n[2] + t, e[3] = n[3] + t, e) : [
|
|
@@ -255,92 +255,96 @@ function jn(n, t, e) {
|
|
|
255
255
|
function Ln(n, t) {
|
|
256
256
|
return t ? (t[0] = n[0], t[1] = n[1], t[2] = n[2], t[3] = n[3], t) : n.slice();
|
|
257
257
|
}
|
|
258
|
-
function
|
|
259
|
-
let i,
|
|
260
|
-
return t < n[0] ? i = n[0] - t : n[2] < t ? i = t - n[2] : i = 0, e < n[1] ?
|
|
258
|
+
function Yt(n, t, e) {
|
|
259
|
+
let i, s;
|
|
260
|
+
return t < n[0] ? i = n[0] - t : n[2] < t ? i = t - n[2] : i = 0, e < n[1] ? s = n[1] - e : n[3] < e ? s = e - n[3] : s = 0, i * i + s * s;
|
|
261
261
|
}
|
|
262
262
|
function vn(n, t) {
|
|
263
|
-
return
|
|
263
|
+
return zt(n, t[0], t[1]);
|
|
264
264
|
}
|
|
265
|
-
function
|
|
265
|
+
function xe(n, t) {
|
|
266
266
|
return n[0] <= t[0] && t[2] <= n[2] && n[1] <= t[1] && t[3] <= n[3];
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function zt(n, t, e) {
|
|
269
269
|
return n[0] <= t && t <= n[2] && n[1] <= e && e <= n[3];
|
|
270
270
|
}
|
|
271
271
|
function pt(n, t) {
|
|
272
|
-
const e = n[0], i = n[1],
|
|
272
|
+
const e = n[0], i = n[1], s = n[2], r = n[3], o = t[0], u = t[1];
|
|
273
273
|
let a = C.UNKNOWN;
|
|
274
|
-
return o < e ? a = a | C.LEFT : o >
|
|
274
|
+
return o < e ? a = a | C.LEFT : o > s && (a = a | C.RIGHT), u < i ? a = a | C.BELOW : u > r && (a = a | C.ABOVE), a === C.UNKNOWN && (a = C.INTERSECTING), a;
|
|
275
275
|
}
|
|
276
276
|
function $() {
|
|
277
277
|
return [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
278
278
|
}
|
|
279
|
-
function J(n, t, e, i,
|
|
280
|
-
return
|
|
279
|
+
function J(n, t, e, i, s) {
|
|
280
|
+
return s ? (s[0] = n, s[1] = t, s[2] = e, s[3] = i, s) : [n, t, e, i];
|
|
281
281
|
}
|
|
282
282
|
function Q(n) {
|
|
283
283
|
return J(1 / 0, 1 / 0, -1 / 0, -1 / 0, n);
|
|
284
284
|
}
|
|
285
|
-
function
|
|
285
|
+
function Ze(n, t) {
|
|
286
286
|
const e = n[0], i = n[1];
|
|
287
287
|
return J(e, i, e, i, t);
|
|
288
288
|
}
|
|
289
|
-
function
|
|
290
|
-
const
|
|
291
|
-
return Vt(
|
|
289
|
+
function be(n, t, e, i, s) {
|
|
290
|
+
const r = Q(s);
|
|
291
|
+
return Vt(r, n, t, e, i);
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function Un(n, t) {
|
|
294
294
|
return n[0] == t[0] && n[2] == t[2] && n[1] == t[1] && n[3] == t[3];
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function Yn(n, t) {
|
|
297
297
|
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;
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function Xe(n, t) {
|
|
300
300
|
t[0] < n[0] && (n[0] = t[0]), t[0] > n[2] && (n[2] = t[0]), t[1] < n[1] && (n[1] = t[1]), t[1] > n[3] && (n[3] = t[1]);
|
|
301
301
|
}
|
|
302
|
-
function Vt(n, t, e, i,
|
|
303
|
-
for (; e < i; e +=
|
|
304
|
-
|
|
302
|
+
function Vt(n, t, e, i, s) {
|
|
303
|
+
for (; e < i; e += s)
|
|
304
|
+
Ge(n, t[e], t[e + 1]);
|
|
305
305
|
return n;
|
|
306
306
|
}
|
|
307
|
-
function
|
|
307
|
+
function Ge(n, t, e) {
|
|
308
308
|
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);
|
|
309
309
|
}
|
|
310
|
-
function
|
|
310
|
+
function je(n, t) {
|
|
311
311
|
let e;
|
|
312
|
-
return e = t(
|
|
312
|
+
return e = t(Dt(n)), e || (e = t(Wt(n)), e) || (e = t(kt(n)), e) || (e = t(Kt(n)), e) ? e : !1;
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function zn(n) {
|
|
315
315
|
let t = 0;
|
|
316
316
|
return tt(n) || (t = A(n) * X(n)), t;
|
|
317
317
|
}
|
|
318
|
-
function
|
|
318
|
+
function Dt(n) {
|
|
319
319
|
return [n[0], n[1]];
|
|
320
320
|
}
|
|
321
|
-
function
|
|
321
|
+
function Wt(n) {
|
|
322
322
|
return [n[2], n[1]];
|
|
323
323
|
}
|
|
324
324
|
function L(n) {
|
|
325
325
|
return [(n[0] + n[2]) / 2, (n[1] + n[3]) / 2];
|
|
326
326
|
}
|
|
327
|
-
function
|
|
328
|
-
|
|
327
|
+
function Vn(n, t) {
|
|
328
|
+
let e;
|
|
329
|
+
return t === "bottom-left" ? e = Dt(n) : t === "bottom-right" ? e = Wt(n) : t === "top-left" ? e = Kt(n) : t === "top-right" ? e = kt(n) : S(!1, 13), e;
|
|
330
|
+
}
|
|
331
|
+
function Le(n, t, e, i, s) {
|
|
332
|
+
const [r, o, u, a, h, l, c, g] = ve(
|
|
329
333
|
n,
|
|
330
334
|
t,
|
|
331
335
|
e,
|
|
332
336
|
i
|
|
333
337
|
);
|
|
334
338
|
return J(
|
|
335
|
-
Math.min(
|
|
339
|
+
Math.min(r, u, h, c),
|
|
336
340
|
Math.min(o, a, l, g),
|
|
337
|
-
Math.max(
|
|
341
|
+
Math.max(r, u, h, c),
|
|
338
342
|
Math.max(o, a, l, g),
|
|
339
|
-
|
|
343
|
+
s
|
|
340
344
|
);
|
|
341
345
|
}
|
|
342
|
-
function
|
|
343
|
-
const
|
|
346
|
+
function ve(n, t, e, i) {
|
|
347
|
+
const s = t * i[0] / 2, r = t * i[1] / 2, o = Math.cos(e), u = Math.sin(e), a = s * o, h = s * u, l = r * o, c = r * u, g = n[0], f = n[1];
|
|
344
348
|
return [
|
|
345
349
|
g - a + c,
|
|
346
350
|
f - h - l,
|
|
@@ -357,14 +361,14 @@ function je(n, t, e, i) {
|
|
|
357
361
|
function X(n) {
|
|
358
362
|
return n[3] - n[1];
|
|
359
363
|
}
|
|
360
|
-
function
|
|
364
|
+
function Dn(n, t, e) {
|
|
361
365
|
const i = e || $();
|
|
362
366
|
return lt(n, t) ? (n[0] > t[0] ? i[0] = n[0] : i[0] = t[0], n[1] > t[1] ? i[1] = n[1] : i[1] = t[1], n[2] < t[2] ? i[2] = n[2] : i[2] = t[2], n[3] < t[3] ? i[3] = n[3] : i[3] = t[3]) : Q(i), i;
|
|
363
367
|
}
|
|
364
|
-
function
|
|
368
|
+
function Kt(n) {
|
|
365
369
|
return [n[0], n[3]];
|
|
366
370
|
}
|
|
367
|
-
function
|
|
371
|
+
function kt(n) {
|
|
368
372
|
return [n[2], n[3]];
|
|
369
373
|
}
|
|
370
374
|
function A(n) {
|
|
@@ -376,26 +380,26 @@ function lt(n, t) {
|
|
|
376
380
|
function tt(n) {
|
|
377
381
|
return n[2] < n[0] || n[3] < n[1];
|
|
378
382
|
}
|
|
379
|
-
function
|
|
383
|
+
function Ue(n, t) {
|
|
380
384
|
return t ? (t[0] = n[0], t[1] = n[1], t[2] = n[2], t[3] = n[3], t) : n;
|
|
381
385
|
}
|
|
382
|
-
function
|
|
386
|
+
function Ye(n, t, e) {
|
|
383
387
|
let i = !1;
|
|
384
|
-
const
|
|
385
|
-
if (
|
|
388
|
+
const s = pt(n, t), r = pt(n, e);
|
|
389
|
+
if (s === C.INTERSECTING || r === C.INTERSECTING)
|
|
386
390
|
i = !0;
|
|
387
391
|
else {
|
|
388
392
|
const o = n[0], u = n[1], a = n[2], h = n[3], l = t[0], c = t[1], g = e[0], f = e[1], d = (f - c) / (g - l);
|
|
389
|
-
let
|
|
390
|
-
|
|
393
|
+
let _, R;
|
|
394
|
+
r & C.ABOVE && !(s & C.ABOVE) && (_ = g - (f - h) / d, i = _ >= o && _ <= a), !i && r & C.RIGHT && !(s & C.RIGHT) && (R = f - (g - a) * d, i = R >= u && R <= h), !i && r & C.BELOW && !(s & C.BELOW) && (_ = g - (f - u) / d, i = _ >= o && _ <= a), !i && r & C.LEFT && !(s & C.LEFT) && (R = f - (g - o) * d, i = R >= u && R <= h);
|
|
391
395
|
}
|
|
392
396
|
return i;
|
|
393
397
|
}
|
|
394
|
-
function
|
|
398
|
+
function ze(n, t, e, i) {
|
|
395
399
|
if (tt(n))
|
|
396
400
|
return Q(e);
|
|
397
|
-
let
|
|
398
|
-
|
|
401
|
+
let s = [];
|
|
402
|
+
s = [
|
|
399
403
|
n[0],
|
|
400
404
|
n[1],
|
|
401
405
|
n[2],
|
|
@@ -404,23 +408,23 @@ function Ue(n, t, e, i) {
|
|
|
404
408
|
n[3],
|
|
405
409
|
n[0],
|
|
406
410
|
n[3]
|
|
407
|
-
], t(
|
|
408
|
-
const
|
|
409
|
-
for (let u = 0, a =
|
|
410
|
-
|
|
411
|
-
return
|
|
411
|
+
], t(s, s, 2);
|
|
412
|
+
const r = [], o = [];
|
|
413
|
+
for (let u = 0, a = s.length; u < a; u += 2)
|
|
414
|
+
r.push(s[u]), o.push(s[u + 1]);
|
|
415
|
+
return Fe(r, o, e);
|
|
412
416
|
}
|
|
413
417
|
function Ve(n, t) {
|
|
414
418
|
const e = t.getExtent(), i = L(n);
|
|
415
419
|
if (t.canWrapX() && (i[0] < e[0] || i[0] >= e[2])) {
|
|
416
|
-
const
|
|
417
|
-
(i[0] - e[0]) /
|
|
418
|
-
) *
|
|
420
|
+
const s = A(e), o = Math.floor(
|
|
421
|
+
(i[0] - e[0]) / s
|
|
422
|
+
) * s;
|
|
419
423
|
n[0] -= o, n[2] -= o;
|
|
420
424
|
}
|
|
421
425
|
return n;
|
|
422
426
|
}
|
|
423
|
-
function
|
|
427
|
+
function Wn(n, t) {
|
|
424
428
|
if (t.canWrapX()) {
|
|
425
429
|
const e = t.getExtent();
|
|
426
430
|
if (!isFinite(n[0]) || !isFinite(n[2]))
|
|
@@ -445,16 +449,16 @@ function Dn(n, t) {
|
|
|
445
449
|
function De(n, t) {
|
|
446
450
|
return n[0] += +t[0], n[1] += +t[1], n;
|
|
447
451
|
}
|
|
448
|
-
function
|
|
449
|
-
const e = t.getRadius(), i = t.getCenter(),
|
|
450
|
-
let a = o -
|
|
451
|
-
const h = u -
|
|
452
|
+
function Kn(n, t) {
|
|
453
|
+
const e = t.getRadius(), i = t.getCenter(), s = i[0], r = i[1], o = n[0], u = n[1];
|
|
454
|
+
let a = o - s;
|
|
455
|
+
const h = u - r;
|
|
452
456
|
a === 0 && h === 0 && (a = 1);
|
|
453
|
-
const l = Math.sqrt(a * a + h * h), c =
|
|
457
|
+
const l = Math.sqrt(a * a + h * h), c = s + e * a / l, g = r + e * h / l;
|
|
454
458
|
return [c, g];
|
|
455
459
|
}
|
|
456
460
|
function We(n, t) {
|
|
457
|
-
const e = n[0], i = n[1],
|
|
461
|
+
const e = n[0], i = n[1], s = t[0], r = t[1], o = s[0], u = s[1], a = r[0], h = r[1], l = a - o, c = h - u, g = l === 0 && c === 0 ? 0 : (l * (e - o) + c * (i - u)) / (l * l + c * c || 0);
|
|
458
462
|
let f, d;
|
|
459
463
|
return g <= 0 ? (f = o, d = u) : g >= 1 ? (f = a, d = h) : (f = o + g * l, d = u + g * c), [f, d];
|
|
460
464
|
}
|
|
@@ -468,23 +472,23 @@ function B(n, t) {
|
|
|
468
472
|
return e;
|
|
469
473
|
}
|
|
470
474
|
function Ke(n, t) {
|
|
471
|
-
const e = Math.cos(t), i = Math.sin(t),
|
|
472
|
-
return n[0] =
|
|
475
|
+
const e = Math.cos(t), i = Math.sin(t), s = n[0] * e - n[1] * i, r = n[1] * e + n[0] * i;
|
|
476
|
+
return n[0] = s, n[1] = r, n;
|
|
473
477
|
}
|
|
474
|
-
function
|
|
478
|
+
function kn(n, t) {
|
|
475
479
|
return n[0] *= t, n[1] *= t, n;
|
|
476
480
|
}
|
|
477
|
-
function
|
|
481
|
+
function Bt(n, t) {
|
|
478
482
|
const e = n[0] - t[0], i = n[1] - t[1];
|
|
479
483
|
return e * e + i * i;
|
|
480
484
|
}
|
|
481
|
-
function kn(n, t) {
|
|
482
|
-
return Math.sqrt(Dt(n, t));
|
|
483
|
-
}
|
|
484
485
|
function Bn(n, t) {
|
|
485
|
-
return
|
|
486
|
+
return Math.sqrt(Bt(n, t));
|
|
486
487
|
}
|
|
487
488
|
function qn(n, t) {
|
|
489
|
+
return Bt(n, We(n, t));
|
|
490
|
+
}
|
|
491
|
+
function Hn(n, t) {
|
|
488
492
|
if (t.canWrapX()) {
|
|
489
493
|
const e = A(t.getExtent()), i = ke(n, t, e);
|
|
490
494
|
i && (n[0] -= i * e);
|
|
@@ -493,22 +497,22 @@ function qn(n, t) {
|
|
|
493
497
|
}
|
|
494
498
|
function ke(n, t, e) {
|
|
495
499
|
const i = t.getExtent();
|
|
496
|
-
let
|
|
497
|
-
return t.canWrapX() && (n[0] < i[0] || n[0] > i[2]) && (e = e || A(i),
|
|
500
|
+
let s = 0;
|
|
501
|
+
return t.canWrapX() && (n[0] < i[0] || n[0] > i[2]) && (e = e || A(i), s = Math.floor(
|
|
498
502
|
(n[0] - i[0]) / e
|
|
499
|
-
)),
|
|
503
|
+
)), s;
|
|
500
504
|
}
|
|
501
505
|
const Be = 63710088e-1;
|
|
502
506
|
function At(n, t, e) {
|
|
503
507
|
e = e || Be;
|
|
504
|
-
const i = W(n[1]),
|
|
508
|
+
const i = W(n[1]), s = W(t[1]), r = (s - i) / 2, o = W(t[0] - n[0]) / 2, u = Math.sin(r) * Math.sin(r) + Math.sin(o) * Math.sin(o) * Math.cos(i) * Math.cos(s);
|
|
505
509
|
return 2 * e * Math.atan2(Math.sqrt(u), Math.sqrt(1 - u));
|
|
506
510
|
}
|
|
507
511
|
function qe(...n) {
|
|
508
512
|
console.warn(...n);
|
|
509
513
|
}
|
|
510
514
|
let at = !0;
|
|
511
|
-
function
|
|
515
|
+
function qt(n) {
|
|
512
516
|
at = !1;
|
|
513
517
|
}
|
|
514
518
|
function ht(n, t) {
|
|
@@ -520,7 +524,7 @@ function ht(n, t) {
|
|
|
520
524
|
t = n.slice();
|
|
521
525
|
return t;
|
|
522
526
|
}
|
|
523
|
-
function
|
|
527
|
+
function Ht(n, t) {
|
|
524
528
|
if (t !== void 0 && n !== t) {
|
|
525
529
|
for (let e = 0, i = n.length; e < i; ++e)
|
|
526
530
|
t[e] = n[e];
|
|
@@ -529,13 +533,13 @@ function Kt(n, t) {
|
|
|
529
533
|
return n;
|
|
530
534
|
}
|
|
531
535
|
function He(n) {
|
|
532
|
-
|
|
536
|
+
Ne(n.getCode(), n), k(n, n, ht);
|
|
533
537
|
}
|
|
534
538
|
function $e(n) {
|
|
535
539
|
n.forEach(He);
|
|
536
540
|
}
|
|
537
|
-
function
|
|
538
|
-
return typeof n == "string" ?
|
|
541
|
+
function P(n) {
|
|
542
|
+
return typeof n == "string" ? Pe(
|
|
539
543
|
/** @type {string} */
|
|
540
544
|
n
|
|
541
545
|
) : (
|
|
@@ -543,23 +547,23 @@ function T(n) {
|
|
|
543
547
|
n || null
|
|
544
548
|
);
|
|
545
549
|
}
|
|
546
|
-
function
|
|
547
|
-
n =
|
|
548
|
-
let
|
|
549
|
-
const
|
|
550
|
-
if (
|
|
551
|
-
|
|
550
|
+
function $n(n, t, e, i) {
|
|
551
|
+
n = P(n);
|
|
552
|
+
let s;
|
|
553
|
+
const r = n.getPointResolutionFunc();
|
|
554
|
+
if (r)
|
|
555
|
+
s = r(t, e);
|
|
552
556
|
else {
|
|
553
557
|
const o = n.getUnits();
|
|
554
558
|
if (o == "degrees" && !i || i == "degrees")
|
|
555
|
-
|
|
559
|
+
s = t;
|
|
556
560
|
else {
|
|
557
561
|
const u = gt(
|
|
558
562
|
n,
|
|
559
|
-
|
|
563
|
+
P("EPSG:4326")
|
|
560
564
|
);
|
|
561
|
-
if (u ===
|
|
562
|
-
|
|
565
|
+
if (u === Ht && o !== "degrees")
|
|
566
|
+
s = t * n.getMetersPerUnit();
|
|
563
567
|
else {
|
|
564
568
|
let h = [
|
|
565
569
|
e[0] - t / 2,
|
|
@@ -573,13 +577,13 @@ function Hn(n, t, e, i) {
|
|
|
573
577
|
];
|
|
574
578
|
h = u(h, h, 2);
|
|
575
579
|
const l = At(h.slice(0, 2), h.slice(2, 4)), c = At(h.slice(4, 6), h.slice(6, 8));
|
|
576
|
-
|
|
580
|
+
s = (l + c) / 2;
|
|
577
581
|
}
|
|
578
582
|
const a = n.getMetersPerUnit();
|
|
579
|
-
a !== void 0 && (
|
|
583
|
+
a !== void 0 && (s /= a);
|
|
580
584
|
}
|
|
581
585
|
}
|
|
582
|
-
return
|
|
586
|
+
return s;
|
|
583
587
|
}
|
|
584
588
|
function wt(n) {
|
|
585
589
|
$e(n), n.forEach(function(t) {
|
|
@@ -589,34 +593,34 @@ function wt(n) {
|
|
|
589
593
|
});
|
|
590
594
|
}
|
|
591
595
|
function Je(n, t, e, i) {
|
|
592
|
-
n.forEach(function(
|
|
593
|
-
t.forEach(function(
|
|
594
|
-
k(
|
|
596
|
+
n.forEach(function(s) {
|
|
597
|
+
t.forEach(function(r) {
|
|
598
|
+
k(s, r, e), k(r, s, i);
|
|
595
599
|
});
|
|
596
600
|
});
|
|
597
601
|
}
|
|
598
602
|
function ct(n, t) {
|
|
599
|
-
return n ? typeof n == "string" ?
|
|
603
|
+
return n ? typeof n == "string" ? P(n) : (
|
|
600
604
|
/** @type {Projection} */
|
|
601
605
|
n
|
|
602
|
-
) :
|
|
606
|
+
) : P(t);
|
|
603
607
|
}
|
|
604
|
-
function
|
|
605
|
-
return
|
|
608
|
+
function Jn(n, t) {
|
|
609
|
+
return qt(), $t(
|
|
606
610
|
n,
|
|
607
611
|
"EPSG:4326",
|
|
608
612
|
"EPSG:3857"
|
|
609
613
|
);
|
|
610
614
|
}
|
|
611
|
-
function
|
|
612
|
-
const e =
|
|
615
|
+
function Qn(n, t) {
|
|
616
|
+
const e = $t(
|
|
613
617
|
n,
|
|
614
618
|
"EPSG:3857",
|
|
615
619
|
"EPSG:4326"
|
|
616
620
|
), i = e[0];
|
|
617
621
|
return (i < -180 || i > 180) && (e[0] = K(i + 180, 360) - 180), e;
|
|
618
622
|
}
|
|
619
|
-
function
|
|
623
|
+
function ti(n, t) {
|
|
620
624
|
if (n === t)
|
|
621
625
|
return !0;
|
|
622
626
|
const e = n.getUnits() === t.getUnits();
|
|
@@ -624,21 +628,21 @@ function Qn(n, t) {
|
|
|
624
628
|
}
|
|
625
629
|
function gt(n, t) {
|
|
626
630
|
const e = n.getCode(), i = t.getCode();
|
|
627
|
-
let
|
|
628
|
-
return
|
|
631
|
+
let s = Oe(e, i);
|
|
632
|
+
return s || (s = Ht), s;
|
|
629
633
|
}
|
|
630
634
|
function q(n, t) {
|
|
631
|
-
const e =
|
|
635
|
+
const e = P(n), i = P(t);
|
|
632
636
|
return gt(e, i);
|
|
633
637
|
}
|
|
634
|
-
function
|
|
638
|
+
function $t(n, t, e) {
|
|
635
639
|
return q(t, e)(n, void 0, n.length);
|
|
636
640
|
}
|
|
637
|
-
function
|
|
638
|
-
const
|
|
639
|
-
return
|
|
641
|
+
function ei(n, t, e, i) {
|
|
642
|
+
const s = q(t, e);
|
|
643
|
+
return ze(n, s, void 0);
|
|
640
644
|
}
|
|
641
|
-
function
|
|
645
|
+
function Tt(n, t) {
|
|
642
646
|
return n;
|
|
643
647
|
}
|
|
644
648
|
function w(n, t) {
|
|
@@ -656,8 +660,8 @@ function tn() {
|
|
|
656
660
|
wt(Et), wt(St), Je(
|
|
657
661
|
St,
|
|
658
662
|
Et,
|
|
659
|
-
|
|
660
|
-
|
|
663
|
+
pe,
|
|
664
|
+
Ae
|
|
661
665
|
);
|
|
662
666
|
}
|
|
663
667
|
tn();
|
|
@@ -665,38 +669,38 @@ new Array(6);
|
|
|
665
669
|
function en() {
|
|
666
670
|
return [1, 0, 0, 1, 0, 0];
|
|
667
671
|
}
|
|
668
|
-
function nn(n, t, e, i,
|
|
669
|
-
return n[0] = t, n[1] = e, n[2] = i, n[3] =
|
|
672
|
+
function nn(n, t, e, i, s, r, o) {
|
|
673
|
+
return n[0] = t, n[1] = e, n[2] = i, n[3] = s, n[4] = r, n[5] = o, n;
|
|
670
674
|
}
|
|
671
|
-
function
|
|
675
|
+
function ni(n, t) {
|
|
672
676
|
return n[0] = t[0], n[1] = t[1], n[2] = t[2], n[3] = t[3], n[4] = t[4], n[5] = t[5], n;
|
|
673
677
|
}
|
|
674
|
-
function
|
|
678
|
+
function ii(n, t) {
|
|
675
679
|
const e = t[0], i = t[1];
|
|
676
680
|
return t[0] = n[0] * e + n[2] * i + n[4], t[1] = n[1] * e + n[3] * i + n[5], t;
|
|
677
681
|
}
|
|
678
|
-
function
|
|
682
|
+
function si(n, t, e) {
|
|
679
683
|
return nn(n, t, 0, 0, e, 0, 0);
|
|
680
684
|
}
|
|
681
|
-
function
|
|
682
|
-
const a = Math.sin(
|
|
683
|
-
return n[0] = i * h, n[1] =
|
|
685
|
+
function sn(n, t, e, i, s, r, o, u) {
|
|
686
|
+
const a = Math.sin(r), h = Math.cos(r);
|
|
687
|
+
return n[0] = i * h, n[1] = s * a, n[2] = -i * a, n[3] = s * h, n[4] = o * i * h - u * i * a + t, n[5] = o * s * a + u * s * h + e, n;
|
|
684
688
|
}
|
|
685
689
|
function ri(n, t) {
|
|
686
|
-
const e =
|
|
687
|
-
|
|
688
|
-
const i = t[0],
|
|
689
|
-
return n[0] = o / e, n[1] = -
|
|
690
|
+
const e = rn(t);
|
|
691
|
+
S(e !== 0, 32);
|
|
692
|
+
const i = t[0], s = t[1], r = t[2], o = t[3], u = t[4], a = t[5];
|
|
693
|
+
return n[0] = o / e, n[1] = -s / e, n[2] = -r / e, n[3] = i / e, n[4] = (r * a - o * u) / e, n[5] = -(i * a - s * u) / e, n;
|
|
690
694
|
}
|
|
691
|
-
function
|
|
695
|
+
function rn(n) {
|
|
692
696
|
return n[0] * n[3] - n[1] * n[2];
|
|
693
697
|
}
|
|
694
|
-
let
|
|
695
|
-
function
|
|
698
|
+
let Pt;
|
|
699
|
+
function oi(n) {
|
|
696
700
|
const t = "matrix(" + n.join(", ") + ")";
|
|
697
|
-
if (
|
|
701
|
+
if (_e)
|
|
698
702
|
return t;
|
|
699
|
-
const e =
|
|
703
|
+
const e = Pt || (Pt = document.createElement("div"));
|
|
700
704
|
return e.style.transform = t, e.style.transform;
|
|
701
705
|
}
|
|
702
706
|
const m = {
|
|
@@ -718,7 +722,7 @@ class on extends H {
|
|
|
718
722
|
constructor(t) {
|
|
719
723
|
super(), this.on, this.once, this.un, this.background_ = t.background;
|
|
720
724
|
const e = Object.assign({}, t);
|
|
721
|
-
typeof t.properties == "object" && (delete e.properties, Object.assign(e, t.properties)), e[m.OPACITY] = t.opacity !== void 0 ? t.opacity : 1,
|
|
725
|
+
typeof t.properties == "object" && (delete e.properties, Object.assign(e, t.properties)), e[m.OPACITY] = t.opacity !== void 0 ? t.opacity : 1, S(typeof e[m.OPACITY] == "number", 64), e[m.VISIBLE] = t.visible !== void 0 ? t.visible : !0, e[m.Z_INDEX] = t.zIndex, e[m.MAX_RESOLUTION] = t.maxResolution !== void 0 ? t.maxResolution : 1 / 0, e[m.MIN_RESOLUTION] = t.minResolution !== void 0 ? t.minResolution : 0, e[m.MIN_ZOOM] = t.minZoom !== void 0 ? t.minZoom : -1 / 0, e[m.MAX_ZOOM] = t.maxZoom !== void 0 ? t.maxZoom : 1 / 0, this.className_ = e.className !== void 0 ? e.className : "ol-layer", delete e.className, this.setProperties(e), this.state_ = null;
|
|
722
726
|
}
|
|
723
727
|
/**
|
|
724
728
|
* Get the background for this layer.
|
|
@@ -746,7 +750,7 @@ class on extends H {
|
|
|
746
750
|
layer: this,
|
|
747
751
|
managed: t === void 0 ? !0 : t
|
|
748
752
|
}, i = this.getZIndex();
|
|
749
|
-
return e.opacity =
|
|
753
|
+
return e.opacity = p(Math.round(this.getOpacity() * 100) / 100, 0, 1), e.visible = this.getVisible(), e.extent = this.getExtent(), e.zIndex = i === void 0 && !e.managed ? 1 / 0 : i, e.maxResolution = this.getMaxResolution(), e.minResolution = Math.max(this.getMinResolution(), 0), e.minZoom = this.getMinZoom(), e.maxZoom = this.getMaxZoom(), this.state_ = e, e;
|
|
750
754
|
}
|
|
751
755
|
/**
|
|
752
756
|
* @abstract
|
|
@@ -936,7 +940,7 @@ class on extends H {
|
|
|
936
940
|
* @api
|
|
937
941
|
*/
|
|
938
942
|
setOpacity(t) {
|
|
939
|
-
|
|
943
|
+
S(typeof t == "number", 64), this.set(m.OPACITY, t);
|
|
940
944
|
}
|
|
941
945
|
/**
|
|
942
946
|
* Set the visibility of the layer (`true` or `false`).
|
|
@@ -1001,14 +1005,14 @@ const an = {
|
|
|
1001
1005
|
* @api
|
|
1002
1006
|
*/
|
|
1003
1007
|
RENDERCOMPLETE: "rendercomplete"
|
|
1004
|
-
},
|
|
1008
|
+
}, T = {
|
|
1005
1009
|
ANIMATING: 0,
|
|
1006
1010
|
INTERACTING: 1
|
|
1007
1011
|
}, I = {
|
|
1008
1012
|
CENTER: "center",
|
|
1009
1013
|
RESOLUTION: "resolution",
|
|
1010
1014
|
ROTATION: "rotation"
|
|
1011
|
-
}, un = 256;
|
|
1015
|
+
}, ai = 42, un = 256;
|
|
1012
1016
|
function Nt(n, t, e) {
|
|
1013
1017
|
return (
|
|
1014
1018
|
/**
|
|
@@ -1019,20 +1023,20 @@ function Nt(n, t, e) {
|
|
|
1019
1023
|
* @param {Array<number>} [centerShift] Shift between map center and viewport center.
|
|
1020
1024
|
* @return {import("./coordinate.js").Coordinate|undefined} Center.
|
|
1021
1025
|
*/
|
|
1022
|
-
function(i,
|
|
1026
|
+
function(i, s, r, o, u) {
|
|
1023
1027
|
if (!i)
|
|
1024
1028
|
return;
|
|
1025
|
-
if (!
|
|
1029
|
+
if (!s && !t)
|
|
1026
1030
|
return i;
|
|
1027
|
-
const a = t ? 0 :
|
|
1028
|
-
let g = n[0] + a / 2 + l, f = n[2] - a / 2 + l, d = n[1] + h / 2 + c,
|
|
1029
|
-
g > f && (g = (f + g) / 2, f = g), d >
|
|
1030
|
-
let
|
|
1031
|
-
if (o && e &&
|
|
1032
|
-
const y = 30 *
|
|
1033
|
-
|
|
1031
|
+
const a = t ? 0 : r[0] * s, h = t ? 0 : r[1] * s, l = u ? u[0] : 0, c = u ? u[1] : 0;
|
|
1032
|
+
let g = n[0] + a / 2 + l, f = n[2] - a / 2 + l, d = n[1] + h / 2 + c, _ = n[3] - h / 2 + c;
|
|
1033
|
+
g > f && (g = (f + g) / 2, f = g), d > _ && (d = (_ + d) / 2, _ = d);
|
|
1034
|
+
let R = p(i[0], g, f), M = p(i[1], d, _);
|
|
1035
|
+
if (o && e && s) {
|
|
1036
|
+
const y = 30 * s;
|
|
1037
|
+
R += -y * Math.log(1 + Math.max(0, g - i[0]) / y) + y * Math.log(1 + Math.max(0, i[0] - f) / y), M += -y * Math.log(1 + Math.max(0, d - i[1]) / y) + y * Math.log(1 + Math.max(0, i[1] - _) / y);
|
|
1034
1038
|
}
|
|
1035
|
-
return [
|
|
1039
|
+
return [R, M];
|
|
1036
1040
|
}
|
|
1037
1041
|
);
|
|
1038
1042
|
}
|
|
@@ -1040,13 +1044,13 @@ function ln(n) {
|
|
|
1040
1044
|
return n;
|
|
1041
1045
|
}
|
|
1042
1046
|
function ft(n, t, e, i) {
|
|
1043
|
-
const
|
|
1044
|
-
return i ? Math.min(n, Math.max(
|
|
1047
|
+
const s = A(t) / e[0], r = X(t) / e[1];
|
|
1048
|
+
return i ? Math.min(n, Math.max(s, r)) : Math.min(n, Math.min(s, r));
|
|
1045
1049
|
}
|
|
1046
1050
|
function dt(n, t, e) {
|
|
1047
1051
|
let i = Math.min(n, t);
|
|
1048
|
-
const
|
|
1049
|
-
return i *= Math.log(1 +
|
|
1052
|
+
const s = 50;
|
|
1053
|
+
return i *= Math.log(1 + s * Math.max(0, n / t - 1)) / s + 1, e && (i = Math.max(i, e), i /= Math.log(1 + s * Math.max(0, e / n - 1)) / s + 1), p(i, e / 2, t * 2);
|
|
1050
1054
|
}
|
|
1051
1055
|
function hn(n, t, e, i) {
|
|
1052
1056
|
return t = t !== void 0 ? t : !0, /**
|
|
@@ -1056,8 +1060,8 @@ function hn(n, t, e, i) {
|
|
|
1056
1060
|
* @param {boolean} [isMoving] True if an interaction or animation is in progress.
|
|
1057
1061
|
* @return {number|undefined} Resolution.
|
|
1058
1062
|
*/
|
|
1059
|
-
function(
|
|
1060
|
-
if (
|
|
1063
|
+
function(s, r, o, u) {
|
|
1064
|
+
if (s !== void 0) {
|
|
1061
1065
|
const a = n[0], h = n[n.length - 1], l = e ? ft(
|
|
1062
1066
|
a,
|
|
1063
1067
|
e,
|
|
@@ -1066,16 +1070,16 @@ function hn(n, t, e, i) {
|
|
|
1066
1070
|
) : a;
|
|
1067
1071
|
if (u)
|
|
1068
1072
|
return t ? dt(
|
|
1069
|
-
|
|
1073
|
+
s,
|
|
1070
1074
|
l,
|
|
1071
1075
|
h
|
|
1072
|
-
) :
|
|
1073
|
-
const c = Math.min(l,
|
|
1076
|
+
) : p(s, h, l);
|
|
1077
|
+
const c = Math.min(l, s), g = Math.floor(Lt(n, c, r));
|
|
1074
1078
|
return n[g] > l && g < n.length - 1 ? n[g + 1] : n[g];
|
|
1075
1079
|
}
|
|
1076
1080
|
};
|
|
1077
1081
|
}
|
|
1078
|
-
function cn(n, t, e, i,
|
|
1082
|
+
function cn(n, t, e, i, s, r) {
|
|
1079
1083
|
return i = i !== void 0 ? i : !0, e = e !== void 0 ? e : 0, /**
|
|
1080
1084
|
* @param {number|undefined} resolution Resolution.
|
|
1081
1085
|
* @param {number} direction Direction.
|
|
@@ -1085,28 +1089,28 @@ function cn(n, t, e, i, r, s) {
|
|
|
1085
1089
|
*/
|
|
1086
1090
|
function(o, u, a, h) {
|
|
1087
1091
|
if (o !== void 0) {
|
|
1088
|
-
const l =
|
|
1092
|
+
const l = s ? ft(
|
|
1089
1093
|
t,
|
|
1090
|
-
|
|
1094
|
+
s,
|
|
1091
1095
|
a,
|
|
1092
|
-
|
|
1096
|
+
r
|
|
1093
1097
|
) : t;
|
|
1094
1098
|
if (h)
|
|
1095
1099
|
return i ? dt(
|
|
1096
1100
|
o,
|
|
1097
1101
|
l,
|
|
1098
1102
|
e
|
|
1099
|
-
) :
|
|
1103
|
+
) : p(o, e, l);
|
|
1100
1104
|
const c = 1e-9, g = Math.ceil(
|
|
1101
1105
|
Math.log(t / l) / Math.log(n) - c
|
|
1102
|
-
), f = -u * (0.5 - c) + 0.5, d = Math.min(l, o),
|
|
1106
|
+
), f = -u * (0.5 - c) + 0.5, d = Math.min(l, o), _ = Math.floor(
|
|
1103
1107
|
Math.log(t / d) / Math.log(n) + f
|
|
1104
|
-
),
|
|
1105
|
-
return
|
|
1108
|
+
), R = Math.max(g, _), M = t / Math.pow(n, R);
|
|
1109
|
+
return p(M, e, l);
|
|
1106
1110
|
}
|
|
1107
1111
|
};
|
|
1108
1112
|
}
|
|
1109
|
-
function Ot(n, t, e, i,
|
|
1113
|
+
function Ot(n, t, e, i, s) {
|
|
1110
1114
|
return e = e !== void 0 ? e : !0, /**
|
|
1111
1115
|
* @param {number|undefined} resolution Resolution.
|
|
1112
1116
|
* @param {number} direction Direction.
|
|
@@ -1114,16 +1118,16 @@ function Ot(n, t, e, i, r) {
|
|
|
1114
1118
|
* @param {boolean} [isMoving] True if an interaction or animation is in progress.
|
|
1115
1119
|
* @return {number|undefined} Resolution.
|
|
1116
1120
|
*/
|
|
1117
|
-
function(
|
|
1118
|
-
if (
|
|
1121
|
+
function(r, o, u, a) {
|
|
1122
|
+
if (r !== void 0) {
|
|
1119
1123
|
const h = i ? ft(
|
|
1120
1124
|
n,
|
|
1121
1125
|
i,
|
|
1122
1126
|
u,
|
|
1123
|
-
|
|
1127
|
+
s
|
|
1124
1128
|
) : n;
|
|
1125
|
-
return !e || !a ?
|
|
1126
|
-
|
|
1129
|
+
return !e || !a ? p(r, t, h) : dt(
|
|
1130
|
+
r,
|
|
1127
1131
|
h,
|
|
1128
1132
|
t
|
|
1129
1133
|
);
|
|
@@ -1134,7 +1138,7 @@ function gn(n) {
|
|
|
1134
1138
|
if (n !== void 0)
|
|
1135
1139
|
return 0;
|
|
1136
1140
|
}
|
|
1137
|
-
function
|
|
1141
|
+
function Ft(n) {
|
|
1138
1142
|
if (n !== void 0)
|
|
1139
1143
|
return n;
|
|
1140
1144
|
}
|
|
@@ -1167,69 +1171,69 @@ function dn(n) {
|
|
|
1167
1171
|
return Math.abs(t) <= n ? 0 : t;
|
|
1168
1172
|
};
|
|
1169
1173
|
}
|
|
1170
|
-
function
|
|
1174
|
+
function _n(n) {
|
|
1171
1175
|
return Math.pow(n, 3);
|
|
1172
1176
|
}
|
|
1173
|
-
function
|
|
1174
|
-
return 1 -
|
|
1177
|
+
function Rn(n) {
|
|
1178
|
+
return 1 - _n(1 - n);
|
|
1175
1179
|
}
|
|
1176
1180
|
function mn(n) {
|
|
1177
1181
|
return 3 * n * n - 2 * n * n * n;
|
|
1178
1182
|
}
|
|
1179
|
-
function
|
|
1183
|
+
function ui(n) {
|
|
1180
1184
|
return n;
|
|
1181
1185
|
}
|
|
1182
|
-
function
|
|
1183
|
-
|
|
1186
|
+
function Jt(n, t, e, i, s, r) {
|
|
1187
|
+
r = r || [];
|
|
1184
1188
|
let o = 0;
|
|
1185
1189
|
for (let u = t; u < e; u += i) {
|
|
1186
1190
|
const a = n[u], h = n[u + 1];
|
|
1187
|
-
|
|
1191
|
+
r[o++] = s[0] * a + s[2] * h + s[4], r[o++] = s[1] * a + s[3] * h + s[5];
|
|
1188
1192
|
}
|
|
1189
|
-
return
|
|
1193
|
+
return r && r.length != o && (r.length = o), r;
|
|
1190
1194
|
}
|
|
1191
|
-
function yn(n, t, e, i,
|
|
1195
|
+
function yn(n, t, e, i, s, r, o) {
|
|
1192
1196
|
o = o || [];
|
|
1193
|
-
const u = Math.cos(
|
|
1197
|
+
const u = Math.cos(s), a = Math.sin(s), h = r[0], l = r[1];
|
|
1194
1198
|
let c = 0;
|
|
1195
1199
|
for (let g = t; g < e; g += i) {
|
|
1196
1200
|
const f = n[g] - h, d = n[g + 1] - l;
|
|
1197
1201
|
o[c++] = h + f * u - d * a, o[c++] = l + f * a + d * u;
|
|
1198
|
-
for (let
|
|
1199
|
-
o[c++] = n[
|
|
1202
|
+
for (let _ = g + 2; _ < g + i; ++_)
|
|
1203
|
+
o[c++] = n[_];
|
|
1200
1204
|
}
|
|
1201
1205
|
return o && o.length != c && (o.length = c), o;
|
|
1202
1206
|
}
|
|
1203
|
-
function Mn(n, t, e, i,
|
|
1207
|
+
function Mn(n, t, e, i, s, r, o, u) {
|
|
1204
1208
|
u = u || [];
|
|
1205
1209
|
const a = o[0], h = o[1];
|
|
1206
1210
|
let l = 0;
|
|
1207
1211
|
for (let c = t; c < e; c += i) {
|
|
1208
1212
|
const g = n[c] - a, f = n[c + 1] - h;
|
|
1209
|
-
u[l++] = a +
|
|
1213
|
+
u[l++] = a + s * g, u[l++] = h + r * f;
|
|
1210
1214
|
for (let d = c + 2; d < c + i; ++d)
|
|
1211
1215
|
u[l++] = n[d];
|
|
1212
1216
|
}
|
|
1213
1217
|
return u && u.length != l && (u.length = l), u;
|
|
1214
1218
|
}
|
|
1215
|
-
function Cn(n, t, e, i,
|
|
1219
|
+
function Cn(n, t, e, i, s, r, o) {
|
|
1216
1220
|
o = o || [];
|
|
1217
1221
|
let u = 0;
|
|
1218
1222
|
for (let a = t; a < e; a += i) {
|
|
1219
|
-
o[u++] = n[a] +
|
|
1223
|
+
o[u++] = n[a] + s, o[u++] = n[a + 1] + r;
|
|
1220
1224
|
for (let h = a + 2; h < a + i; ++h)
|
|
1221
1225
|
o[u++] = n[h];
|
|
1222
1226
|
}
|
|
1223
1227
|
return o && o.length != u && (o.length = u), o;
|
|
1224
1228
|
}
|
|
1225
|
-
const
|
|
1229
|
+
const xt = en();
|
|
1226
1230
|
class En extends H {
|
|
1227
1231
|
constructor() {
|
|
1228
|
-
super(), this.extent_ = $(), this.extentRevision_ = -1, this.simplifiedGeometryMaxMinSquaredTolerance = 0, this.simplifiedGeometryRevision = 0, this.simplifyTransformedInternal =
|
|
1232
|
+
super(), this.extent_ = $(), this.extentRevision_ = -1, this.simplifiedGeometryMaxMinSquaredTolerance = 0, this.simplifiedGeometryRevision = 0, this.simplifyTransformedInternal = Re(function(t, e, i) {
|
|
1229
1233
|
if (!i)
|
|
1230
1234
|
return this.getSimplifiedGeometry(e);
|
|
1231
|
-
const
|
|
1232
|
-
return
|
|
1235
|
+
const s = this.clone();
|
|
1236
|
+
return s.applyTransform(i), s.getSimplifiedGeometry(e);
|
|
1233
1237
|
});
|
|
1234
1238
|
}
|
|
1235
1239
|
/**
|
|
@@ -1262,7 +1266,7 @@ class En extends H {
|
|
|
1262
1266
|
* @param {number} minSquaredDistance Minimum squared distance.
|
|
1263
1267
|
* @return {number} Minimum squared distance.
|
|
1264
1268
|
*/
|
|
1265
|
-
closestPointXY(t, e, i,
|
|
1269
|
+
closestPointXY(t, e, i, s) {
|
|
1266
1270
|
return E();
|
|
1267
1271
|
}
|
|
1268
1272
|
/**
|
|
@@ -1315,7 +1319,7 @@ class En extends H {
|
|
|
1315
1319
|
const e = this.computeExtent(this.extent_);
|
|
1316
1320
|
(isNaN(e[0]) || isNaN(e[1])) && Q(e), this.extentRevision_ = this.getRevision();
|
|
1317
1321
|
}
|
|
1318
|
-
return
|
|
1322
|
+
return Ue(this.extent_, t);
|
|
1319
1323
|
}
|
|
1320
1324
|
/**
|
|
1321
1325
|
* Rotate the geometry around a given coordinate. This modifies the geometry
|
|
@@ -1420,10 +1424,10 @@ class En extends H {
|
|
|
1420
1424
|
* @api
|
|
1421
1425
|
*/
|
|
1422
1426
|
transform(t, e) {
|
|
1423
|
-
const i =
|
|
1427
|
+
const i = P(t), s = i.getUnits() == "tile-pixels" ? function(r, o, u) {
|
|
1424
1428
|
const a = i.getExtent(), h = i.getWorldExtent(), l = X(h) / X(a);
|
|
1425
|
-
return
|
|
1426
|
-
|
|
1429
|
+
return sn(
|
|
1430
|
+
xt,
|
|
1427
1431
|
h[0],
|
|
1428
1432
|
h[3],
|
|
1429
1433
|
l,
|
|
@@ -1431,23 +1435,23 @@ class En extends H {
|
|
|
1431
1435
|
0,
|
|
1432
1436
|
0,
|
|
1433
1437
|
0
|
|
1434
|
-
),
|
|
1435
|
-
|
|
1438
|
+
), Jt(
|
|
1439
|
+
r,
|
|
1436
1440
|
0,
|
|
1437
|
-
|
|
1441
|
+
r.length,
|
|
1438
1442
|
u,
|
|
1439
|
-
|
|
1443
|
+
xt,
|
|
1440
1444
|
o
|
|
1441
1445
|
), q(i, e)(
|
|
1442
|
-
|
|
1446
|
+
r,
|
|
1443
1447
|
o,
|
|
1444
1448
|
u
|
|
1445
1449
|
);
|
|
1446
1450
|
} : q(i, e);
|
|
1447
|
-
return this.applyTransform(
|
|
1451
|
+
return this.applyTransform(s), this;
|
|
1448
1452
|
}
|
|
1449
1453
|
}
|
|
1450
|
-
class
|
|
1454
|
+
class _t extends En {
|
|
1451
1455
|
constructor() {
|
|
1452
1456
|
super(), this.layout = "XY", this.stride = 2, this.flatCoordinates = null;
|
|
1453
1457
|
}
|
|
@@ -1457,7 +1461,7 @@ class Rt extends En {
|
|
|
1457
1461
|
* @return {import("../extent.js").Extent} extent Extent.
|
|
1458
1462
|
*/
|
|
1459
1463
|
computeExtent(t) {
|
|
1460
|
-
return
|
|
1464
|
+
return be(
|
|
1461
1465
|
this.flatCoordinates,
|
|
1462
1466
|
0,
|
|
1463
1467
|
this.flatCoordinates.length,
|
|
@@ -1551,11 +1555,11 @@ class Rt extends En {
|
|
|
1551
1555
|
* @protected
|
|
1552
1556
|
*/
|
|
1553
1557
|
setLayout(t, e, i) {
|
|
1554
|
-
let
|
|
1558
|
+
let s;
|
|
1555
1559
|
if (t)
|
|
1556
|
-
|
|
1560
|
+
s = Zt(t);
|
|
1557
1561
|
else {
|
|
1558
|
-
for (let
|
|
1562
|
+
for (let r = 0; r < i; ++r) {
|
|
1559
1563
|
if (e.length === 0) {
|
|
1560
1564
|
this.layout = "XY", this.stride = 2;
|
|
1561
1565
|
return;
|
|
@@ -1563,9 +1567,9 @@ class Rt extends En {
|
|
|
1563
1567
|
e = /** @type {Array} */
|
|
1564
1568
|
e[0];
|
|
1565
1569
|
}
|
|
1566
|
-
|
|
1570
|
+
s = e.length, t = In(s);
|
|
1567
1571
|
}
|
|
1568
|
-
this.layout = t, this.stride =
|
|
1572
|
+
this.layout = t, this.stride = s;
|
|
1569
1573
|
}
|
|
1570
1574
|
/**
|
|
1571
1575
|
* Apply a transform function to the coordinates of the geometry.
|
|
@@ -1589,12 +1593,12 @@ class Rt extends En {
|
|
|
1589
1593
|
rotate(t, e) {
|
|
1590
1594
|
const i = this.getFlatCoordinates();
|
|
1591
1595
|
if (i) {
|
|
1592
|
-
const
|
|
1596
|
+
const s = this.getStride();
|
|
1593
1597
|
yn(
|
|
1594
1598
|
i,
|
|
1595
1599
|
0,
|
|
1596
1600
|
i.length,
|
|
1597
|
-
|
|
1601
|
+
s,
|
|
1598
1602
|
t,
|
|
1599
1603
|
e,
|
|
1600
1604
|
i
|
|
@@ -1612,18 +1616,18 @@ class Rt extends En {
|
|
|
1612
1616
|
*/
|
|
1613
1617
|
scale(t, e, i) {
|
|
1614
1618
|
e === void 0 && (e = t), i || (i = L(this.getExtent()));
|
|
1615
|
-
const
|
|
1616
|
-
if (
|
|
1617
|
-
const
|
|
1619
|
+
const s = this.getFlatCoordinates();
|
|
1620
|
+
if (s) {
|
|
1621
|
+
const r = this.getStride();
|
|
1618
1622
|
Mn(
|
|
1619
|
-
r,
|
|
1620
|
-
0,
|
|
1621
|
-
r.length,
|
|
1622
1623
|
s,
|
|
1624
|
+
0,
|
|
1625
|
+
s.length,
|
|
1626
|
+
r,
|
|
1623
1627
|
t,
|
|
1624
1628
|
e,
|
|
1625
1629
|
i,
|
|
1626
|
-
|
|
1630
|
+
s
|
|
1627
1631
|
), this.changed();
|
|
1628
1632
|
}
|
|
1629
1633
|
}
|
|
@@ -1637,12 +1641,12 @@ class Rt extends En {
|
|
|
1637
1641
|
translate(t, e) {
|
|
1638
1642
|
const i = this.getFlatCoordinates();
|
|
1639
1643
|
if (i) {
|
|
1640
|
-
const
|
|
1644
|
+
const s = this.getStride();
|
|
1641
1645
|
Cn(
|
|
1642
1646
|
i,
|
|
1643
1647
|
0,
|
|
1644
1648
|
i.length,
|
|
1645
|
-
|
|
1649
|
+
s,
|
|
1646
1650
|
t,
|
|
1647
1651
|
e,
|
|
1648
1652
|
i
|
|
@@ -1660,32 +1664,32 @@ function Zt(n) {
|
|
|
1660
1664
|
return n == "XY" ? t = 2 : n == "XYZ" || n == "XYM" ? t = 3 : n == "XYZM" && (t = 4), /** @type {number} */
|
|
1661
1665
|
t;
|
|
1662
1666
|
}
|
|
1663
|
-
function
|
|
1667
|
+
function li(n, t, e) {
|
|
1664
1668
|
const i = n.getFlatCoordinates();
|
|
1665
1669
|
if (!i)
|
|
1666
1670
|
return null;
|
|
1667
|
-
const
|
|
1668
|
-
return
|
|
1671
|
+
const s = n.getStride();
|
|
1672
|
+
return Jt(
|
|
1669
1673
|
i,
|
|
1670
1674
|
0,
|
|
1671
1675
|
i.length,
|
|
1672
|
-
|
|
1676
|
+
s,
|
|
1673
1677
|
t,
|
|
1674
1678
|
e
|
|
1675
1679
|
);
|
|
1676
1680
|
}
|
|
1677
|
-
function bt(n, t, e, i,
|
|
1681
|
+
function bt(n, t, e, i, s, r, o) {
|
|
1678
1682
|
const u = n[t], a = n[t + 1], h = n[e] - u, l = n[e + 1] - a;
|
|
1679
1683
|
let c;
|
|
1680
1684
|
if (h === 0 && l === 0)
|
|
1681
1685
|
c = t;
|
|
1682
1686
|
else {
|
|
1683
|
-
const g = ((
|
|
1687
|
+
const g = ((s - u) * h + (r - a) * l) / (h * h + l * l);
|
|
1684
1688
|
if (g > 1)
|
|
1685
1689
|
c = e;
|
|
1686
1690
|
else if (g > 0) {
|
|
1687
1691
|
for (let f = 0; f < i; ++f)
|
|
1688
|
-
o[f] =
|
|
1692
|
+
o[f] = me(
|
|
1689
1693
|
n[t + f],
|
|
1690
1694
|
n[e + f],
|
|
1691
1695
|
g
|
|
@@ -1699,33 +1703,33 @@ function bt(n, t, e, i, r, s, o) {
|
|
|
1699
1703
|
o[g] = n[c + g];
|
|
1700
1704
|
o.length = i;
|
|
1701
1705
|
}
|
|
1702
|
-
function
|
|
1703
|
-
let
|
|
1706
|
+
function Qt(n, t, e, i, s) {
|
|
1707
|
+
let r = n[t], o = n[t + 1];
|
|
1704
1708
|
for (t += i; t < e; t += i) {
|
|
1705
|
-
const u = n[t], a = n[t + 1], h = j(
|
|
1706
|
-
h >
|
|
1709
|
+
const u = n[t], a = n[t + 1], h = j(r, o, u, a);
|
|
1710
|
+
h > s && (s = h), r = u, o = a;
|
|
1707
1711
|
}
|
|
1708
|
-
return
|
|
1712
|
+
return s;
|
|
1709
1713
|
}
|
|
1710
|
-
function
|
|
1711
|
-
for (let
|
|
1712
|
-
const u = e[
|
|
1713
|
-
|
|
1714
|
+
function te(n, t, e, i, s) {
|
|
1715
|
+
for (let r = 0, o = e.length; r < o; ++r) {
|
|
1716
|
+
const u = e[r];
|
|
1717
|
+
s = Qt(n, t, u, i, s), t = u;
|
|
1714
1718
|
}
|
|
1715
|
-
return
|
|
1719
|
+
return s;
|
|
1716
1720
|
}
|
|
1717
|
-
function
|
|
1718
|
-
for (let
|
|
1719
|
-
const u = e[
|
|
1720
|
-
|
|
1721
|
+
function hi(n, t, e, i, s) {
|
|
1722
|
+
for (let r = 0, o = e.length; r < o; ++r) {
|
|
1723
|
+
const u = e[r];
|
|
1724
|
+
s = te(n, t, u, i, s), t = u[u.length - 1];
|
|
1721
1725
|
}
|
|
1722
|
-
return
|
|
1726
|
+
return s;
|
|
1723
1727
|
}
|
|
1724
|
-
function
|
|
1728
|
+
function ee(n, t, e, i, s, r, o, u, a, h, l) {
|
|
1725
1729
|
if (t == e)
|
|
1726
1730
|
return h;
|
|
1727
1731
|
let c, g;
|
|
1728
|
-
if (
|
|
1732
|
+
if (s === 0) {
|
|
1729
1733
|
if (g = j(
|
|
1730
1734
|
o,
|
|
1731
1735
|
u,
|
|
@@ -1755,10 +1759,10 @@ function $t(n, t, e, i, r, s, o, u, a, h, l) {
|
|
|
1755
1759
|
a.length = i, f += i;
|
|
1756
1760
|
} else
|
|
1757
1761
|
f += i * Math.max(
|
|
1758
|
-
(Math.sqrt(g) - Math.sqrt(h)) /
|
|
1762
|
+
(Math.sqrt(g) - Math.sqrt(h)) / s | 0,
|
|
1759
1763
|
1
|
|
1760
1764
|
);
|
|
1761
|
-
if (
|
|
1765
|
+
if (r && (bt(
|
|
1762
1766
|
n,
|
|
1763
1767
|
e - i,
|
|
1764
1768
|
t,
|
|
@@ -1773,17 +1777,17 @@ function $t(n, t, e, i, r, s, o, u, a, h, l) {
|
|
|
1773
1777
|
}
|
|
1774
1778
|
return h;
|
|
1775
1779
|
}
|
|
1776
|
-
function
|
|
1780
|
+
function ne(n, t, e, i, s, r, o, u, a, h, l) {
|
|
1777
1781
|
l = l || [NaN, NaN];
|
|
1778
1782
|
for (let c = 0, g = e.length; c < g; ++c) {
|
|
1779
1783
|
const f = e[c];
|
|
1780
|
-
h =
|
|
1784
|
+
h = ee(
|
|
1781
1785
|
n,
|
|
1782
1786
|
t,
|
|
1783
1787
|
f,
|
|
1784
1788
|
i,
|
|
1785
|
-
r,
|
|
1786
1789
|
s,
|
|
1790
|
+
r,
|
|
1787
1791
|
o,
|
|
1788
1792
|
u,
|
|
1789
1793
|
a,
|
|
@@ -1793,17 +1797,17 @@ function Jt(n, t, e, i, r, s, o, u, a, h, l) {
|
|
|
1793
1797
|
}
|
|
1794
1798
|
return h;
|
|
1795
1799
|
}
|
|
1796
|
-
function
|
|
1800
|
+
function ci(n, t, e, i, s, r, o, u, a, h, l) {
|
|
1797
1801
|
l = l || [NaN, NaN];
|
|
1798
1802
|
for (let c = 0, g = e.length; c < g; ++c) {
|
|
1799
1803
|
const f = e[c];
|
|
1800
|
-
h =
|
|
1804
|
+
h = ne(
|
|
1801
1805
|
n,
|
|
1802
1806
|
t,
|
|
1803
1807
|
f,
|
|
1804
1808
|
i,
|
|
1805
|
-
r,
|
|
1806
1809
|
s,
|
|
1810
|
+
r,
|
|
1807
1811
|
o,
|
|
1808
1812
|
u,
|
|
1809
1813
|
a,
|
|
@@ -1814,52 +1818,52 @@ function li(n, t, e, i, r, s, o, u, a, h, l) {
|
|
|
1814
1818
|
return h;
|
|
1815
1819
|
}
|
|
1816
1820
|
function Sn(n, t, e, i) {
|
|
1817
|
-
for (let
|
|
1818
|
-
n[t++] = e[
|
|
1821
|
+
for (let s = 0, r = e.length; s < r; ++s)
|
|
1822
|
+
n[t++] = e[s];
|
|
1819
1823
|
return t;
|
|
1820
1824
|
}
|
|
1821
|
-
function
|
|
1822
|
-
for (let
|
|
1823
|
-
const o = e[
|
|
1825
|
+
function ie(n, t, e, i) {
|
|
1826
|
+
for (let s = 0, r = e.length; s < r; ++s) {
|
|
1827
|
+
const o = e[s];
|
|
1824
1828
|
for (let u = 0; u < i; ++u)
|
|
1825
1829
|
n[t++] = o[u];
|
|
1826
1830
|
}
|
|
1827
1831
|
return t;
|
|
1828
1832
|
}
|
|
1829
|
-
function
|
|
1830
|
-
|
|
1831
|
-
let
|
|
1833
|
+
function se(n, t, e, i, s) {
|
|
1834
|
+
s = s || [];
|
|
1835
|
+
let r = 0;
|
|
1832
1836
|
for (let o = 0, u = e.length; o < u; ++o) {
|
|
1833
|
-
const a =
|
|
1837
|
+
const a = ie(
|
|
1834
1838
|
n,
|
|
1835
1839
|
t,
|
|
1836
1840
|
e[o],
|
|
1837
1841
|
i
|
|
1838
1842
|
);
|
|
1839
|
-
r
|
|
1843
|
+
s[r++] = a, t = a;
|
|
1840
1844
|
}
|
|
1841
|
-
return
|
|
1845
|
+
return s.length = r, s;
|
|
1842
1846
|
}
|
|
1843
|
-
function
|
|
1844
|
-
|
|
1845
|
-
let
|
|
1847
|
+
function gi(n, t, e, i, s) {
|
|
1848
|
+
s = s || [];
|
|
1849
|
+
let r = 0;
|
|
1846
1850
|
for (let o = 0, u = e.length; o < u; ++o) {
|
|
1847
|
-
const a =
|
|
1851
|
+
const a = se(
|
|
1848
1852
|
n,
|
|
1849
1853
|
t,
|
|
1850
1854
|
e[o],
|
|
1851
1855
|
i,
|
|
1852
|
-
r
|
|
1856
|
+
s[r]
|
|
1853
1857
|
);
|
|
1854
|
-
a.length === 0 && (a[0] = t), r
|
|
1858
|
+
a.length === 0 && (a[0] = t), s[r++] = a, t = a[a.length - 1];
|
|
1855
1859
|
}
|
|
1856
|
-
return
|
|
1860
|
+
return s.length = r, s;
|
|
1857
1861
|
}
|
|
1858
|
-
function
|
|
1862
|
+
function re(n, t, e, i, s, r, o) {
|
|
1859
1863
|
const u = (e - t) / i;
|
|
1860
1864
|
if (u < 3) {
|
|
1861
1865
|
for (; t < e; t += i)
|
|
1862
|
-
|
|
1866
|
+
r[o++] = n[t], r[o++] = n[t + 1];
|
|
1863
1867
|
return o;
|
|
1864
1868
|
}
|
|
1865
1869
|
const a = new Array(u);
|
|
@@ -1869,59 +1873,59 @@ function ee(n, t, e, i, r, s, o) {
|
|
|
1869
1873
|
for (; h.length > 0; ) {
|
|
1870
1874
|
const c = h.pop(), g = h.pop();
|
|
1871
1875
|
let f = 0;
|
|
1872
|
-
const d = n[g],
|
|
1876
|
+
const d = n[g], _ = n[g + 1], R = n[c], M = n[c + 1];
|
|
1873
1877
|
for (let y = g + i; y < c; y += i) {
|
|
1874
|
-
const et = n[y], G = n[y + 1], Mt =
|
|
1878
|
+
const et = n[y], G = n[y + 1], Mt = ye(et, G, d, _, R, M);
|
|
1875
1879
|
Mt > f && (l = y, f = Mt);
|
|
1876
1880
|
}
|
|
1877
|
-
f >
|
|
1881
|
+
f > s && (a[(l - t) / i] = 1, g + i < l && h.push(g, l), l + i < c && h.push(l, c));
|
|
1878
1882
|
}
|
|
1879
1883
|
for (let c = 0; c < u; ++c)
|
|
1880
|
-
a[c] && (
|
|
1884
|
+
a[c] && (r[o++] = n[t + c * i], r[o++] = n[t + c * i + 1]);
|
|
1881
1885
|
return o;
|
|
1882
1886
|
}
|
|
1883
|
-
function
|
|
1887
|
+
function fi(n, t, e, i, s, r, o, u) {
|
|
1884
1888
|
for (let a = 0, h = e.length; a < h; ++a) {
|
|
1885
1889
|
const l = e[a];
|
|
1886
|
-
o =
|
|
1890
|
+
o = re(
|
|
1887
1891
|
n,
|
|
1888
1892
|
t,
|
|
1889
1893
|
l,
|
|
1890
1894
|
i,
|
|
1891
|
-
r,
|
|
1892
1895
|
s,
|
|
1896
|
+
r,
|
|
1893
1897
|
o
|
|
1894
1898
|
), u.push(o), t = l;
|
|
1895
1899
|
}
|
|
1896
1900
|
return o;
|
|
1897
1901
|
}
|
|
1898
|
-
function
|
|
1902
|
+
function x(n, t) {
|
|
1899
1903
|
return t * Math.round(n / t);
|
|
1900
1904
|
}
|
|
1901
|
-
function pn(n, t, e, i,
|
|
1905
|
+
function pn(n, t, e, i, s, r, o) {
|
|
1902
1906
|
if (t == e)
|
|
1903
1907
|
return o;
|
|
1904
|
-
let u =
|
|
1905
|
-
t += i,
|
|
1908
|
+
let u = x(n[t], s), a = x(n[t + 1], s);
|
|
1909
|
+
t += i, r[o++] = u, r[o++] = a;
|
|
1906
1910
|
let h, l;
|
|
1907
1911
|
do
|
|
1908
|
-
if (h =
|
|
1909
|
-
return
|
|
1912
|
+
if (h = x(n[t], s), l = x(n[t + 1], s), t += i, t == e)
|
|
1913
|
+
return r[o++] = h, r[o++] = l, o;
|
|
1910
1914
|
while (h == u && l == a);
|
|
1911
1915
|
for (; t < e; ) {
|
|
1912
|
-
const c =
|
|
1916
|
+
const c = x(n[t], s), g = x(n[t + 1], s);
|
|
1913
1917
|
if (t += i, c == h && g == l)
|
|
1914
1918
|
continue;
|
|
1915
|
-
const f = h - u, d = l - a,
|
|
1916
|
-
if (f *
|
|
1919
|
+
const f = h - u, d = l - a, _ = c - u, R = g - a;
|
|
1920
|
+
if (f * R == d * _ && (f < 0 && _ < f || f == _ || f > 0 && _ > f) && (d < 0 && R < d || d == R || d > 0 && R > d)) {
|
|
1917
1921
|
h = c, l = g;
|
|
1918
1922
|
continue;
|
|
1919
1923
|
}
|
|
1920
|
-
|
|
1924
|
+
r[o++] = h, r[o++] = l, u = h, a = l, h = c, l = g;
|
|
1921
1925
|
}
|
|
1922
|
-
return
|
|
1926
|
+
return r[o++] = h, r[o++] = l, o;
|
|
1923
1927
|
}
|
|
1924
|
-
function
|
|
1928
|
+
function oe(n, t, e, i, s, r, o, u) {
|
|
1925
1929
|
for (let a = 0, h = e.length; a < h; ++a) {
|
|
1926
1930
|
const l = e[a];
|
|
1927
1931
|
o = pn(
|
|
@@ -1929,91 +1933,91 @@ function ne(n, t, e, i, r, s, o, u) {
|
|
|
1929
1933
|
t,
|
|
1930
1934
|
l,
|
|
1931
1935
|
i,
|
|
1932
|
-
r,
|
|
1933
1936
|
s,
|
|
1937
|
+
r,
|
|
1934
1938
|
o
|
|
1935
1939
|
), u.push(o), t = l;
|
|
1936
1940
|
}
|
|
1937
1941
|
return o;
|
|
1938
1942
|
}
|
|
1939
|
-
function
|
|
1943
|
+
function di(n, t, e, i, s, r, o, u) {
|
|
1940
1944
|
for (let a = 0, h = e.length; a < h; ++a) {
|
|
1941
1945
|
const l = e[a], c = [];
|
|
1942
|
-
o =
|
|
1946
|
+
o = oe(
|
|
1943
1947
|
n,
|
|
1944
1948
|
t,
|
|
1945
1949
|
l,
|
|
1946
1950
|
i,
|
|
1947
|
-
r,
|
|
1948
1951
|
s,
|
|
1952
|
+
r,
|
|
1949
1953
|
o,
|
|
1950
1954
|
c
|
|
1951
1955
|
), u.push(c), t = l[l.length - 1];
|
|
1952
1956
|
}
|
|
1953
1957
|
return o;
|
|
1954
1958
|
}
|
|
1955
|
-
function
|
|
1956
|
-
|
|
1957
|
-
let
|
|
1959
|
+
function ae(n, t, e, i, s) {
|
|
1960
|
+
s = s !== void 0 ? s : [];
|
|
1961
|
+
let r = 0;
|
|
1958
1962
|
for (let o = t; o < e; o += i)
|
|
1959
|
-
r
|
|
1960
|
-
return
|
|
1963
|
+
s[r++] = n.slice(o, o + i);
|
|
1964
|
+
return s.length = r, s;
|
|
1961
1965
|
}
|
|
1962
|
-
function
|
|
1963
|
-
|
|
1964
|
-
let
|
|
1966
|
+
function ue(n, t, e, i, s) {
|
|
1967
|
+
s = s !== void 0 ? s : [];
|
|
1968
|
+
let r = 0;
|
|
1965
1969
|
for (let o = 0, u = e.length; o < u; ++o) {
|
|
1966
1970
|
const a = e[o];
|
|
1967
|
-
r
|
|
1971
|
+
s[r++] = ae(
|
|
1968
1972
|
n,
|
|
1969
1973
|
t,
|
|
1970
1974
|
a,
|
|
1971
1975
|
i,
|
|
1972
|
-
r
|
|
1976
|
+
s[r]
|
|
1973
1977
|
), t = a;
|
|
1974
1978
|
}
|
|
1975
|
-
return
|
|
1979
|
+
return s.length = r, s;
|
|
1976
1980
|
}
|
|
1977
|
-
function
|
|
1978
|
-
|
|
1979
|
-
let
|
|
1981
|
+
function _i(n, t, e, i, s) {
|
|
1982
|
+
s = s !== void 0 ? s : [];
|
|
1983
|
+
let r = 0;
|
|
1980
1984
|
for (let o = 0, u = e.length; o < u; ++o) {
|
|
1981
1985
|
const a = e[o];
|
|
1982
|
-
r
|
|
1986
|
+
s[r++] = a.length === 1 && a[0] === t ? [] : ue(
|
|
1983
1987
|
n,
|
|
1984
1988
|
t,
|
|
1985
1989
|
a,
|
|
1986
1990
|
i,
|
|
1987
|
-
r
|
|
1991
|
+
s[r]
|
|
1988
1992
|
), t = a[a.length - 1];
|
|
1989
1993
|
}
|
|
1990
|
-
return
|
|
1994
|
+
return s.length = r, s;
|
|
1991
1995
|
}
|
|
1992
|
-
function
|
|
1993
|
-
let
|
|
1996
|
+
function le(n, t, e, i) {
|
|
1997
|
+
let s = 0, r = n[e - i], o = n[e - i + 1];
|
|
1994
1998
|
for (; t < e; t += i) {
|
|
1995
1999
|
const u = n[t], a = n[t + 1];
|
|
1996
|
-
|
|
2000
|
+
s += o * u - r * a, r = u, o = a;
|
|
1997
2001
|
}
|
|
1998
|
-
return
|
|
2002
|
+
return s / 2;
|
|
1999
2003
|
}
|
|
2000
|
-
function
|
|
2001
|
-
let
|
|
2002
|
-
for (let
|
|
2003
|
-
const u = e[
|
|
2004
|
-
|
|
2004
|
+
function he(n, t, e, i) {
|
|
2005
|
+
let s = 0;
|
|
2006
|
+
for (let r = 0, o = e.length; r < o; ++r) {
|
|
2007
|
+
const u = e[r];
|
|
2008
|
+
s += le(n, t, u, i), t = u;
|
|
2005
2009
|
}
|
|
2006
|
-
return
|
|
2010
|
+
return s;
|
|
2007
2011
|
}
|
|
2008
|
-
function
|
|
2009
|
-
let
|
|
2010
|
-
for (let
|
|
2011
|
-
const u = e[
|
|
2012
|
-
|
|
2012
|
+
function Ri(n, t, e, i) {
|
|
2013
|
+
let s = 0;
|
|
2014
|
+
for (let r = 0, o = e.length; r < o; ++r) {
|
|
2015
|
+
const u = e[r];
|
|
2016
|
+
s += he(n, t, u, i), t = u[u.length - 1];
|
|
2013
2017
|
}
|
|
2014
|
-
return
|
|
2018
|
+
return s;
|
|
2015
2019
|
}
|
|
2016
|
-
class v extends
|
|
2020
|
+
class v extends _t {
|
|
2017
2021
|
/**
|
|
2018
2022
|
* @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
|
|
2019
2023
|
* For internal use, flat coordinates in combination with `layout` are also accepted.
|
|
@@ -2045,16 +2049,16 @@ class v extends Rt {
|
|
|
2045
2049
|
* @param {number} minSquaredDistance Minimum squared distance.
|
|
2046
2050
|
* @return {number} Minimum squared distance.
|
|
2047
2051
|
*/
|
|
2048
|
-
closestPointXY(t, e, i,
|
|
2049
|
-
return
|
|
2050
|
-
|
|
2052
|
+
closestPointXY(t, e, i, s) {
|
|
2053
|
+
return s < Yt(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(
|
|
2054
|
+
Qt(
|
|
2051
2055
|
this.flatCoordinates,
|
|
2052
2056
|
0,
|
|
2053
2057
|
this.flatCoordinates.length,
|
|
2054
2058
|
this.stride,
|
|
2055
2059
|
0
|
|
2056
2060
|
)
|
|
2057
|
-
), this.maxDeltaRevision_ = this.getRevision()),
|
|
2061
|
+
), this.maxDeltaRevision_ = this.getRevision()), ee(
|
|
2058
2062
|
this.flatCoordinates,
|
|
2059
2063
|
0,
|
|
2060
2064
|
this.flatCoordinates.length,
|
|
@@ -2064,7 +2068,7 @@ class v extends Rt {
|
|
|
2064
2068
|
t,
|
|
2065
2069
|
e,
|
|
2066
2070
|
i,
|
|
2067
|
-
|
|
2071
|
+
s
|
|
2068
2072
|
));
|
|
2069
2073
|
}
|
|
2070
2074
|
/**
|
|
@@ -2073,7 +2077,7 @@ class v extends Rt {
|
|
|
2073
2077
|
* @api
|
|
2074
2078
|
*/
|
|
2075
2079
|
getArea() {
|
|
2076
|
-
return
|
|
2080
|
+
return le(
|
|
2077
2081
|
this.flatCoordinates,
|
|
2078
2082
|
0,
|
|
2079
2083
|
this.flatCoordinates.length,
|
|
@@ -2086,7 +2090,7 @@ class v extends Rt {
|
|
|
2086
2090
|
* @api
|
|
2087
2091
|
*/
|
|
2088
2092
|
getCoordinates() {
|
|
2089
|
-
return
|
|
2093
|
+
return ae(
|
|
2090
2094
|
this.flatCoordinates,
|
|
2091
2095
|
0,
|
|
2092
2096
|
this.flatCoordinates.length,
|
|
@@ -2100,7 +2104,7 @@ class v extends Rt {
|
|
|
2100
2104
|
*/
|
|
2101
2105
|
getSimplifiedGeometryInternal(t) {
|
|
2102
2106
|
const e = [];
|
|
2103
|
-
return e.length =
|
|
2107
|
+
return e.length = re(
|
|
2104
2108
|
this.flatCoordinates,
|
|
2105
2109
|
0,
|
|
2106
2110
|
this.flatCoordinates.length,
|
|
@@ -2134,7 +2138,7 @@ class v extends Rt {
|
|
|
2134
2138
|
* @api
|
|
2135
2139
|
*/
|
|
2136
2140
|
setCoordinates(t, e) {
|
|
2137
|
-
this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length =
|
|
2141
|
+
this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = ie(
|
|
2138
2142
|
this.flatCoordinates,
|
|
2139
2143
|
0,
|
|
2140
2144
|
t,
|
|
@@ -2142,7 +2146,7 @@ class v extends Rt {
|
|
|
2142
2146
|
), this.changed();
|
|
2143
2147
|
}
|
|
2144
2148
|
}
|
|
2145
|
-
class
|
|
2149
|
+
class Rt extends _t {
|
|
2146
2150
|
/**
|
|
2147
2151
|
* @param {import("../coordinate.js").Coordinate} coordinates Coordinates.
|
|
2148
2152
|
* @param {import("./Geometry.js").GeometryLayout} [layout] Layout.
|
|
@@ -2156,7 +2160,7 @@ class _t extends Rt {
|
|
|
2156
2160
|
* @api
|
|
2157
2161
|
*/
|
|
2158
2162
|
clone() {
|
|
2159
|
-
const t = new
|
|
2163
|
+
const t = new Rt(this.flatCoordinates.slice(), this.layout);
|
|
2160
2164
|
return t.applyProperties(this), t;
|
|
2161
2165
|
}
|
|
2162
2166
|
/**
|
|
@@ -2166,20 +2170,20 @@ class _t extends Rt {
|
|
|
2166
2170
|
* @param {number} minSquaredDistance Minimum squared distance.
|
|
2167
2171
|
* @return {number} Minimum squared distance.
|
|
2168
2172
|
*/
|
|
2169
|
-
closestPointXY(t, e, i,
|
|
2170
|
-
const
|
|
2173
|
+
closestPointXY(t, e, i, s) {
|
|
2174
|
+
const r = this.flatCoordinates, o = j(
|
|
2171
2175
|
t,
|
|
2172
2176
|
e,
|
|
2173
|
-
|
|
2174
|
-
|
|
2177
|
+
r[0],
|
|
2178
|
+
r[1]
|
|
2175
2179
|
);
|
|
2176
|
-
if (o <
|
|
2180
|
+
if (o < s) {
|
|
2177
2181
|
const u = this.stride;
|
|
2178
2182
|
for (let a = 0; a < u; ++a)
|
|
2179
|
-
i[a] =
|
|
2183
|
+
i[a] = r[a];
|
|
2180
2184
|
return i.length = u, o;
|
|
2181
2185
|
}
|
|
2182
|
-
return
|
|
2186
|
+
return s;
|
|
2183
2187
|
}
|
|
2184
2188
|
/**
|
|
2185
2189
|
* Return the coordinate of the point.
|
|
@@ -2195,7 +2199,7 @@ class _t extends Rt {
|
|
|
2195
2199
|
* @return {import("../extent.js").Extent} extent Extent.
|
|
2196
2200
|
*/
|
|
2197
2201
|
computeExtent(t) {
|
|
2198
|
-
return
|
|
2202
|
+
return Ze(this.flatCoordinates, t);
|
|
2199
2203
|
}
|
|
2200
2204
|
/**
|
|
2201
2205
|
* Get the type of this geometry.
|
|
@@ -2212,7 +2216,7 @@ class _t extends Rt {
|
|
|
2212
2216
|
* @api
|
|
2213
2217
|
*/
|
|
2214
2218
|
intersectsExtent(t) {
|
|
2215
|
-
return
|
|
2219
|
+
return zt(t, this.flatCoordinates[0], this.flatCoordinates[1]);
|
|
2216
2220
|
}
|
|
2217
2221
|
/**
|
|
2218
2222
|
* @param {!Array<*>} coordinates Coordinates.
|
|
@@ -2228,9 +2232,9 @@ class _t extends Rt {
|
|
|
2228
2232
|
), this.changed();
|
|
2229
2233
|
}
|
|
2230
2234
|
}
|
|
2231
|
-
function An(n, t, e, i,
|
|
2232
|
-
return !
|
|
2233
|
-
|
|
2235
|
+
function An(n, t, e, i, s) {
|
|
2236
|
+
return !je(
|
|
2237
|
+
s,
|
|
2234
2238
|
/**
|
|
2235
2239
|
* @param {import("../../coordinate.js").Coordinate} coordinate Coordinate.
|
|
2236
2240
|
* @return {boolean} Contains (x, y).
|
|
@@ -2247,84 +2251,84 @@ function An(n, t, e, i, r) {
|
|
|
2247
2251
|
}
|
|
2248
2252
|
);
|
|
2249
2253
|
}
|
|
2250
|
-
function O(n, t, e, i,
|
|
2254
|
+
function O(n, t, e, i, s, r) {
|
|
2251
2255
|
let o = 0, u = n[e - i], a = n[e - i + 1];
|
|
2252
2256
|
for (; t < e; t += i) {
|
|
2253
2257
|
const h = n[t], l = n[t + 1];
|
|
2254
|
-
a <=
|
|
2258
|
+
a <= r ? l > r && (h - u) * (r - a) - (s - u) * (l - a) > 0 && o++ : l <= r && (h - u) * (r - a) - (s - u) * (l - a) < 0 && o--, u = h, a = l;
|
|
2255
2259
|
}
|
|
2256
2260
|
return o !== 0;
|
|
2257
2261
|
}
|
|
2258
|
-
function mt(n, t, e, i,
|
|
2259
|
-
if (e.length === 0 || !O(n, t, e[0], i,
|
|
2262
|
+
function mt(n, t, e, i, s, r) {
|
|
2263
|
+
if (e.length === 0 || !O(n, t, e[0], i, s, r))
|
|
2260
2264
|
return !1;
|
|
2261
2265
|
for (let o = 1, u = e.length; o < u; ++o)
|
|
2262
|
-
if (O(n, e[o - 1], e[o], i,
|
|
2266
|
+
if (O(n, e[o - 1], e[o], i, s, r))
|
|
2263
2267
|
return !1;
|
|
2264
2268
|
return !0;
|
|
2265
2269
|
}
|
|
2266
|
-
function
|
|
2270
|
+
function mi(n, t, e, i, s, r) {
|
|
2267
2271
|
if (e.length === 0)
|
|
2268
2272
|
return !1;
|
|
2269
2273
|
for (let o = 0, u = e.length; o < u; ++o) {
|
|
2270
2274
|
const a = e[o];
|
|
2271
|
-
if (mt(n, t, a, i,
|
|
2275
|
+
if (mt(n, t, a, i, s, r))
|
|
2272
2276
|
return !0;
|
|
2273
2277
|
t = a[a.length - 1];
|
|
2274
2278
|
}
|
|
2275
2279
|
return !1;
|
|
2276
2280
|
}
|
|
2277
|
-
function
|
|
2281
|
+
function ce(n, t, e, i, s, r, o) {
|
|
2278
2282
|
let u, a, h, l, c, g, f;
|
|
2279
|
-
const d = r
|
|
2283
|
+
const d = s[r + 1], _ = [];
|
|
2280
2284
|
for (let y = 0, et = e.length; y < et; ++y) {
|
|
2281
2285
|
const G = e[y];
|
|
2282
2286
|
for (l = n[G - i], g = n[G - i + 1], u = t; u < G; u += i)
|
|
2283
|
-
c = n[u], f = n[u + 1], (d <= g && f <= d || g <= d && d <= f) && (h = (d - g) / (f - g) * (c - l) + l,
|
|
2287
|
+
c = n[u], f = n[u + 1], (d <= g && f <= d || g <= d && d <= f) && (h = (d - g) / (f - g) * (c - l) + l, _.push(h)), l = c, g = f;
|
|
2284
2288
|
}
|
|
2285
|
-
let
|
|
2286
|
-
for (
|
|
2287
|
-
c =
|
|
2289
|
+
let R = NaN, M = -1 / 0;
|
|
2290
|
+
for (_.sort(Me), l = _[0], u = 1, a = _.length; u < a; ++u) {
|
|
2291
|
+
c = _[u];
|
|
2288
2292
|
const y = Math.abs(c - l);
|
|
2289
|
-
y > M && (h = (l + c) / 2, mt(n, t, e, i, h, d) && (
|
|
2293
|
+
y > M && (h = (l + c) / 2, mt(n, t, e, i, h, d) && (R = h, M = y)), l = c;
|
|
2290
2294
|
}
|
|
2291
|
-
return isNaN(
|
|
2295
|
+
return isNaN(R) && (R = s[r]), o ? (o.push(R, d, M), o) : [R, d, M];
|
|
2292
2296
|
}
|
|
2293
|
-
function
|
|
2294
|
-
let
|
|
2297
|
+
function yi(n, t, e, i, s) {
|
|
2298
|
+
let r = [];
|
|
2295
2299
|
for (let o = 0, u = e.length; o < u; ++o) {
|
|
2296
2300
|
const a = e[o];
|
|
2297
|
-
|
|
2301
|
+
r = ce(
|
|
2298
2302
|
n,
|
|
2299
2303
|
t,
|
|
2300
2304
|
a,
|
|
2301
2305
|
i,
|
|
2302
|
-
|
|
2306
|
+
s,
|
|
2303
2307
|
2 * o,
|
|
2304
|
-
|
|
2308
|
+
r
|
|
2305
2309
|
), t = a[a.length - 1];
|
|
2306
2310
|
}
|
|
2307
|
-
return
|
|
2311
|
+
return r;
|
|
2308
2312
|
}
|
|
2309
|
-
function wn(n, t, e, i,
|
|
2310
|
-
let
|
|
2313
|
+
function wn(n, t, e, i, s) {
|
|
2314
|
+
let r;
|
|
2311
2315
|
for (t += i; t < e; t += i)
|
|
2312
|
-
if (
|
|
2316
|
+
if (r = s(
|
|
2313
2317
|
n.slice(t - i, t),
|
|
2314
2318
|
n.slice(t, t + i)
|
|
2315
|
-
),
|
|
2316
|
-
return
|
|
2319
|
+
), r)
|
|
2320
|
+
return r;
|
|
2317
2321
|
return !1;
|
|
2318
2322
|
}
|
|
2319
|
-
function yt(n, t, e, i,
|
|
2320
|
-
const
|
|
2323
|
+
function yt(n, t, e, i, s) {
|
|
2324
|
+
const r = Vt(
|
|
2321
2325
|
$(),
|
|
2322
2326
|
n,
|
|
2323
2327
|
t,
|
|
2324
2328
|
e,
|
|
2325
2329
|
i
|
|
2326
2330
|
);
|
|
2327
|
-
return lt(
|
|
2331
|
+
return lt(s, r) ? xe(s, r) || r[0] >= s[0] && r[2] <= s[2] || r[1] >= s[1] && r[3] <= s[3] ? !0 : wn(
|
|
2328
2332
|
n,
|
|
2329
2333
|
t,
|
|
2330
2334
|
e,
|
|
@@ -2336,149 +2340,149 @@ function yt(n, t, e, i, r) {
|
|
|
2336
2340
|
* `false` otherwise.
|
|
2337
2341
|
*/
|
|
2338
2342
|
function(o, u) {
|
|
2339
|
-
return
|
|
2343
|
+
return Ye(s, o, u);
|
|
2340
2344
|
}
|
|
2341
2345
|
) : !1;
|
|
2342
2346
|
}
|
|
2343
|
-
function
|
|
2344
|
-
for (let
|
|
2345
|
-
if (yt(n, t, e[
|
|
2347
|
+
function Mi(n, t, e, i, s) {
|
|
2348
|
+
for (let r = 0, o = e.length; r < o; ++r) {
|
|
2349
|
+
if (yt(n, t, e[r], i, s))
|
|
2346
2350
|
return !0;
|
|
2347
|
-
t = e[
|
|
2351
|
+
t = e[r];
|
|
2348
2352
|
}
|
|
2349
2353
|
return !1;
|
|
2350
2354
|
}
|
|
2351
|
-
function
|
|
2352
|
-
return !!(yt(n, t, e, i,
|
|
2355
|
+
function Tn(n, t, e, i, s) {
|
|
2356
|
+
return !!(yt(n, t, e, i, s) || O(
|
|
2353
2357
|
n,
|
|
2354
2358
|
t,
|
|
2355
2359
|
e,
|
|
2356
2360
|
i,
|
|
2357
|
-
|
|
2358
|
-
|
|
2361
|
+
s[0],
|
|
2362
|
+
s[1]
|
|
2359
2363
|
) || O(
|
|
2360
2364
|
n,
|
|
2361
2365
|
t,
|
|
2362
2366
|
e,
|
|
2363
2367
|
i,
|
|
2364
|
-
|
|
2365
|
-
|
|
2368
|
+
s[0],
|
|
2369
|
+
s[3]
|
|
2366
2370
|
) || O(
|
|
2367
2371
|
n,
|
|
2368
2372
|
t,
|
|
2369
2373
|
e,
|
|
2370
2374
|
i,
|
|
2371
|
-
|
|
2372
|
-
|
|
2375
|
+
s[2],
|
|
2376
|
+
s[1]
|
|
2373
2377
|
) || O(
|
|
2374
2378
|
n,
|
|
2375
2379
|
t,
|
|
2376
2380
|
e,
|
|
2377
2381
|
i,
|
|
2378
|
-
|
|
2379
|
-
|
|
2382
|
+
s[2],
|
|
2383
|
+
s[3]
|
|
2380
2384
|
));
|
|
2381
2385
|
}
|
|
2382
|
-
function
|
|
2383
|
-
if (!
|
|
2386
|
+
function ge(n, t, e, i, s) {
|
|
2387
|
+
if (!Tn(n, t, e[0], i, s))
|
|
2384
2388
|
return !1;
|
|
2385
2389
|
if (e.length === 1)
|
|
2386
2390
|
return !0;
|
|
2387
|
-
for (let
|
|
2391
|
+
for (let r = 1, o = e.length; r < o; ++r)
|
|
2388
2392
|
if (An(
|
|
2389
2393
|
n,
|
|
2390
|
-
e[
|
|
2391
|
-
e[
|
|
2394
|
+
e[r - 1],
|
|
2395
|
+
e[r],
|
|
2392
2396
|
i,
|
|
2393
|
-
|
|
2397
|
+
s
|
|
2394
2398
|
) && !yt(
|
|
2395
2399
|
n,
|
|
2396
|
-
e[
|
|
2397
|
-
e[
|
|
2400
|
+
e[r - 1],
|
|
2401
|
+
e[r],
|
|
2398
2402
|
i,
|
|
2399
|
-
|
|
2403
|
+
s
|
|
2400
2404
|
))
|
|
2401
2405
|
return !1;
|
|
2402
2406
|
return !0;
|
|
2403
2407
|
}
|
|
2404
|
-
function
|
|
2405
|
-
for (let
|
|
2406
|
-
const u = e[
|
|
2407
|
-
if (
|
|
2408
|
+
function Ci(n, t, e, i, s) {
|
|
2409
|
+
for (let r = 0, o = e.length; r < o; ++r) {
|
|
2410
|
+
const u = e[r];
|
|
2411
|
+
if (ge(n, t, u, i, s))
|
|
2408
2412
|
return !0;
|
|
2409
2413
|
t = u[u.length - 1];
|
|
2410
2414
|
}
|
|
2411
2415
|
return !1;
|
|
2412
2416
|
}
|
|
2413
|
-
function
|
|
2417
|
+
function Pn(n, t, e, i) {
|
|
2414
2418
|
for (; t < e - i; ) {
|
|
2415
|
-
for (let
|
|
2416
|
-
const
|
|
2417
|
-
n[t +
|
|
2419
|
+
for (let s = 0; s < i; ++s) {
|
|
2420
|
+
const r = n[t + s];
|
|
2421
|
+
n[t + s] = n[e - i + s], n[e - i + s] = r;
|
|
2418
2422
|
}
|
|
2419
2423
|
t += i, e -= i;
|
|
2420
2424
|
}
|
|
2421
2425
|
}
|
|
2422
|
-
function
|
|
2423
|
-
let
|
|
2426
|
+
function fe(n, t, e, i) {
|
|
2427
|
+
let s = 0, r = n[e - i], o = n[e - i + 1];
|
|
2424
2428
|
for (; t < e; t += i) {
|
|
2425
2429
|
const u = n[t], a = n[t + 1];
|
|
2426
|
-
|
|
2430
|
+
s += (u - r) * (a + o), r = u, o = a;
|
|
2427
2431
|
}
|
|
2428
|
-
return
|
|
2432
|
+
return s === 0 ? void 0 : s > 0;
|
|
2429
2433
|
}
|
|
2430
|
-
function
|
|
2431
|
-
|
|
2432
|
-
for (let
|
|
2433
|
-
const u = e[
|
|
2434
|
+
function de(n, t, e, i, s) {
|
|
2435
|
+
s = s !== void 0 ? s : !1;
|
|
2436
|
+
for (let r = 0, o = e.length; r < o; ++r) {
|
|
2437
|
+
const u = e[r], a = fe(
|
|
2434
2438
|
n,
|
|
2435
2439
|
t,
|
|
2436
2440
|
u,
|
|
2437
2441
|
i
|
|
2438
2442
|
);
|
|
2439
|
-
if (
|
|
2440
|
-
if (
|
|
2443
|
+
if (r === 0) {
|
|
2444
|
+
if (s && a || !s && !a)
|
|
2441
2445
|
return !1;
|
|
2442
|
-
} else if (
|
|
2446
|
+
} else if (s && !a || !s && a)
|
|
2443
2447
|
return !1;
|
|
2444
2448
|
t = u;
|
|
2445
2449
|
}
|
|
2446
2450
|
return !0;
|
|
2447
2451
|
}
|
|
2448
|
-
function
|
|
2449
|
-
for (let
|
|
2450
|
-
const u = e[
|
|
2451
|
-
if (!
|
|
2452
|
+
function Ei(n, t, e, i, s) {
|
|
2453
|
+
for (let r = 0, o = e.length; r < o; ++r) {
|
|
2454
|
+
const u = e[r];
|
|
2455
|
+
if (!de(n, t, u, i, s))
|
|
2452
2456
|
return !1;
|
|
2453
2457
|
u.length && (t = u[u.length - 1]);
|
|
2454
2458
|
}
|
|
2455
2459
|
return !0;
|
|
2456
2460
|
}
|
|
2457
|
-
function ut(n, t, e, i,
|
|
2458
|
-
|
|
2459
|
-
for (let
|
|
2460
|
-
const u = e[
|
|
2461
|
+
function ut(n, t, e, i, s) {
|
|
2462
|
+
s = s !== void 0 ? s : !1;
|
|
2463
|
+
for (let r = 0, o = e.length; r < o; ++r) {
|
|
2464
|
+
const u = e[r], a = fe(
|
|
2461
2465
|
n,
|
|
2462
2466
|
t,
|
|
2463
2467
|
u,
|
|
2464
2468
|
i
|
|
2465
2469
|
);
|
|
2466
|
-
(
|
|
2470
|
+
(r === 0 ? s && a || !s && !a : s && !a || !s && a) && Pn(n, t, u, i), t = u;
|
|
2467
2471
|
}
|
|
2468
2472
|
return t;
|
|
2469
2473
|
}
|
|
2470
|
-
function
|
|
2471
|
-
for (let
|
|
2474
|
+
function Ii(n, t, e, i, s) {
|
|
2475
|
+
for (let r = 0, o = e.length; r < o; ++r)
|
|
2472
2476
|
t = ut(
|
|
2473
2477
|
n,
|
|
2474
2478
|
t,
|
|
2475
|
-
e[
|
|
2479
|
+
e[r],
|
|
2476
2480
|
i,
|
|
2477
|
-
|
|
2481
|
+
s
|
|
2478
2482
|
);
|
|
2479
2483
|
return t;
|
|
2480
2484
|
}
|
|
2481
|
-
class
|
|
2485
|
+
class U extends _t {
|
|
2482
2486
|
/**
|
|
2483
2487
|
* @param {!Array<Array<import("../coordinate.js").Coordinate>>|!Array<number>} coordinates
|
|
2484
2488
|
* Array of linear rings that define the polygon. The first linear ring of the
|
|
@@ -2507,7 +2511,7 @@ class Y extends Rt {
|
|
|
2507
2511
|
* @api
|
|
2508
2512
|
*/
|
|
2509
2513
|
appendLinearRing(t) {
|
|
2510
|
-
this.flatCoordinates ?
|
|
2514
|
+
this.flatCoordinates ? Ce(this.flatCoordinates, t.getFlatCoordinates()) : this.flatCoordinates = t.getFlatCoordinates().slice(), this.ends_.push(this.flatCoordinates.length), this.changed();
|
|
2511
2515
|
}
|
|
2512
2516
|
/**
|
|
2513
2517
|
* Make a complete copy of the geometry.
|
|
@@ -2515,7 +2519,7 @@ class Y extends Rt {
|
|
|
2515
2519
|
* @api
|
|
2516
2520
|
*/
|
|
2517
2521
|
clone() {
|
|
2518
|
-
const t = new
|
|
2522
|
+
const t = new U(
|
|
2519
2523
|
this.flatCoordinates.slice(),
|
|
2520
2524
|
this.layout,
|
|
2521
2525
|
this.ends_.slice()
|
|
@@ -2529,16 +2533,16 @@ class Y extends Rt {
|
|
|
2529
2533
|
* @param {number} minSquaredDistance Minimum squared distance.
|
|
2530
2534
|
* @return {number} Minimum squared distance.
|
|
2531
2535
|
*/
|
|
2532
|
-
closestPointXY(t, e, i,
|
|
2533
|
-
return
|
|
2534
|
-
|
|
2536
|
+
closestPointXY(t, e, i, s) {
|
|
2537
|
+
return s < Yt(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(
|
|
2538
|
+
te(
|
|
2535
2539
|
this.flatCoordinates,
|
|
2536
2540
|
0,
|
|
2537
2541
|
this.ends_,
|
|
2538
2542
|
this.stride,
|
|
2539
2543
|
0
|
|
2540
2544
|
)
|
|
2541
|
-
), this.maxDeltaRevision_ = this.getRevision()),
|
|
2545
|
+
), this.maxDeltaRevision_ = this.getRevision()), ne(
|
|
2542
2546
|
this.flatCoordinates,
|
|
2543
2547
|
0,
|
|
2544
2548
|
this.ends_,
|
|
@@ -2548,7 +2552,7 @@ class Y extends Rt {
|
|
|
2548
2552
|
t,
|
|
2549
2553
|
e,
|
|
2550
2554
|
i,
|
|
2551
|
-
|
|
2555
|
+
s
|
|
2552
2556
|
));
|
|
2553
2557
|
}
|
|
2554
2558
|
/**
|
|
@@ -2572,7 +2576,7 @@ class Y extends Rt {
|
|
|
2572
2576
|
* @api
|
|
2573
2577
|
*/
|
|
2574
2578
|
getArea() {
|
|
2575
|
-
return
|
|
2579
|
+
return he(
|
|
2576
2580
|
this.getOrientedFlatCoordinates(),
|
|
2577
2581
|
0,
|
|
2578
2582
|
this.ends_,
|
|
@@ -2594,7 +2598,7 @@ class Y extends Rt {
|
|
|
2594
2598
|
*/
|
|
2595
2599
|
getCoordinates(t) {
|
|
2596
2600
|
let e;
|
|
2597
|
-
return t !== void 0 ? (e = this.getOrientedFlatCoordinates().slice(), ut(e, 0, this.ends_, this.stride, t)) : e = this.flatCoordinates,
|
|
2601
|
+
return t !== void 0 ? (e = this.getOrientedFlatCoordinates().slice(), ut(e, 0, this.ends_, this.stride, t)) : e = this.flatCoordinates, ue(e, 0, this.ends_, this.stride);
|
|
2598
2602
|
}
|
|
2599
2603
|
/**
|
|
2600
2604
|
* @return {Array<number>} Ends.
|
|
@@ -2608,7 +2612,7 @@ class Y extends Rt {
|
|
|
2608
2612
|
getFlatInteriorPoint() {
|
|
2609
2613
|
if (this.flatInteriorPointRevision_ != this.getRevision()) {
|
|
2610
2614
|
const t = L(this.getExtent());
|
|
2611
|
-
this.flatInteriorPoint_ =
|
|
2615
|
+
this.flatInteriorPoint_ = ce(
|
|
2612
2616
|
this.getOrientedFlatCoordinates(),
|
|
2613
2617
|
0,
|
|
2614
2618
|
this.ends_,
|
|
@@ -2626,7 +2630,7 @@ class Y extends Rt {
|
|
|
2626
2630
|
* @api
|
|
2627
2631
|
*/
|
|
2628
2632
|
getInteriorPoint() {
|
|
2629
|
-
return new
|
|
2633
|
+
return new Rt(this.getFlatInteriorPoint(), "XYM");
|
|
2630
2634
|
}
|
|
2631
2635
|
/**
|
|
2632
2636
|
* Return the number of rings of the polygon, this includes the exterior
|
|
@@ -2663,16 +2667,16 @@ class Y extends Rt {
|
|
|
2663
2667
|
* @api
|
|
2664
2668
|
*/
|
|
2665
2669
|
getLinearRings() {
|
|
2666
|
-
const t = this.layout, e = this.flatCoordinates, i = this.ends_,
|
|
2667
|
-
let
|
|
2670
|
+
const t = this.layout, e = this.flatCoordinates, i = this.ends_, s = [];
|
|
2671
|
+
let r = 0;
|
|
2668
2672
|
for (let o = 0, u = i.length; o < u; ++o) {
|
|
2669
2673
|
const a = i[o], h = new v(
|
|
2670
|
-
e.slice(
|
|
2674
|
+
e.slice(r, a),
|
|
2671
2675
|
t
|
|
2672
2676
|
);
|
|
2673
|
-
|
|
2677
|
+
s.push(h), r = a;
|
|
2674
2678
|
}
|
|
2675
|
-
return
|
|
2679
|
+
return s;
|
|
2676
2680
|
}
|
|
2677
2681
|
/**
|
|
2678
2682
|
* @return {Array<number>} Oriented flat coordinates.
|
|
@@ -2680,7 +2684,7 @@ class Y extends Rt {
|
|
|
2680
2684
|
getOrientedFlatCoordinates() {
|
|
2681
2685
|
if (this.orientedRevision_ != this.getRevision()) {
|
|
2682
2686
|
const t = this.flatCoordinates;
|
|
2683
|
-
|
|
2687
|
+
de(t, 0, this.ends_, this.stride) ? this.orientedFlatCoordinates_ = t : (this.orientedFlatCoordinates_ = t.slice(), this.orientedFlatCoordinates_.length = ut(
|
|
2684
2688
|
this.orientedFlatCoordinates_,
|
|
2685
2689
|
0,
|
|
2686
2690
|
this.ends_,
|
|
@@ -2696,7 +2700,7 @@ class Y extends Rt {
|
|
|
2696
2700
|
*/
|
|
2697
2701
|
getSimplifiedGeometryInternal(t) {
|
|
2698
2702
|
const e = [], i = [];
|
|
2699
|
-
return e.length =
|
|
2703
|
+
return e.length = oe(
|
|
2700
2704
|
this.flatCoordinates,
|
|
2701
2705
|
0,
|
|
2702
2706
|
this.ends_,
|
|
@@ -2705,7 +2709,7 @@ class Y extends Rt {
|
|
|
2705
2709
|
e,
|
|
2706
2710
|
0,
|
|
2707
2711
|
i
|
|
2708
|
-
), new
|
|
2712
|
+
), new U(e, "XY", i);
|
|
2709
2713
|
}
|
|
2710
2714
|
/**
|
|
2711
2715
|
* Get the type of this geometry.
|
|
@@ -2722,7 +2726,7 @@ class Y extends Rt {
|
|
|
2722
2726
|
* @api
|
|
2723
2727
|
*/
|
|
2724
2728
|
intersectsExtent(t) {
|
|
2725
|
-
return
|
|
2729
|
+
return ge(
|
|
2726
2730
|
this.getOrientedFlatCoordinates(),
|
|
2727
2731
|
0,
|
|
2728
2732
|
this.ends_,
|
|
@@ -2738,7 +2742,7 @@ class Y extends Rt {
|
|
|
2738
2742
|
*/
|
|
2739
2743
|
setCoordinates(t, e) {
|
|
2740
2744
|
this.setLayout(e, t, 2), this.flatCoordinates || (this.flatCoordinates = []);
|
|
2741
|
-
const i =
|
|
2745
|
+
const i = se(
|
|
2742
2746
|
this.flatCoordinates,
|
|
2743
2747
|
0,
|
|
2744
2748
|
t,
|
|
@@ -2751,46 +2755,46 @@ class Y extends Rt {
|
|
|
2751
2755
|
function Xt(n) {
|
|
2752
2756
|
if (tt(n))
|
|
2753
2757
|
throw new Error("Cannot create polygon from empty extent");
|
|
2754
|
-
const t = n[0], e = n[1], i = n[2],
|
|
2758
|
+
const t = n[0], e = n[1], i = n[2], s = n[3], r = [
|
|
2755
2759
|
t,
|
|
2756
2760
|
e,
|
|
2757
2761
|
t,
|
|
2758
|
-
|
|
2762
|
+
s,
|
|
2759
2763
|
i,
|
|
2760
|
-
|
|
2764
|
+
s,
|
|
2761
2765
|
i,
|
|
2762
2766
|
e,
|
|
2763
2767
|
t,
|
|
2764
2768
|
e
|
|
2765
2769
|
];
|
|
2766
|
-
return new
|
|
2770
|
+
return new U(r, "XY", [r.length]);
|
|
2767
2771
|
}
|
|
2768
|
-
function
|
|
2772
|
+
function Si(n, t, e) {
|
|
2769
2773
|
t = t || 32;
|
|
2770
|
-
const i = n.getStride(),
|
|
2774
|
+
const i = n.getStride(), s = n.getLayout(), r = n.getCenter(), o = i * (t + 1), u = new Array(o);
|
|
2771
2775
|
for (let l = 0; l < o; l += i) {
|
|
2772
2776
|
u[l] = 0, u[l + 1] = 0;
|
|
2773
2777
|
for (let c = 2; c < i; c++)
|
|
2774
|
-
u[l + c] =
|
|
2778
|
+
u[l + c] = r[c];
|
|
2775
2779
|
}
|
|
2776
|
-
const a = [u.length], h = new
|
|
2777
|
-
return Nn(h,
|
|
2780
|
+
const a = [u.length], h = new U(u, s, a);
|
|
2781
|
+
return Nn(h, r, n.getRadius()), h;
|
|
2778
2782
|
}
|
|
2779
2783
|
function Nn(n, t, e, i) {
|
|
2780
|
-
const
|
|
2784
|
+
const s = n.getFlatCoordinates(), r = n.getStride(), o = s.length / r - 1, u = 0;
|
|
2781
2785
|
for (let a = 0; a <= o; ++a) {
|
|
2782
|
-
const h = a *
|
|
2783
|
-
|
|
2786
|
+
const h = a * r, l = u + K(a, o) * 2 * Math.PI / o;
|
|
2787
|
+
s[h] = t[0] + e * Math.cos(l), s[h + 1] = t[1] + e * Math.sin(l);
|
|
2784
2788
|
}
|
|
2785
2789
|
n.changed();
|
|
2786
2790
|
}
|
|
2787
|
-
const
|
|
2791
|
+
const st = 0;
|
|
2788
2792
|
class Gt extends H {
|
|
2789
2793
|
/**
|
|
2790
2794
|
* @param {ViewOptions} [options] View options.
|
|
2791
2795
|
*/
|
|
2792
2796
|
constructor(t) {
|
|
2793
|
-
super(), this.on, this.once, this.un, t = Object.assign({}, t), this.hints_ = [0, 0], this.animations_ = [], this.updateAnimationKey_, this.projection_ = ct(t.projection, "EPSG:3857"), this.viewportSize_ = [100, 100], this.targetCenter_ = null, this.targetResolution_, this.targetRotation_, this.nextCenter_ = null, this.nextResolution_, this.nextRotation_, this.cancelAnchor_ = void 0, t.projection &&
|
|
2797
|
+
super(), this.on, this.once, this.un, t = Object.assign({}, t), this.hints_ = [0, 0], this.animations_ = [], this.updateAnimationKey_, this.projection_ = ct(t.projection, "EPSG:3857"), this.viewportSize_ = [100, 100], this.targetCenter_ = null, this.targetResolution_, this.targetRotation_, this.nextCenter_ = null, this.nextResolution_, this.nextRotation_, this.cancelAnchor_ = void 0, t.projection && qt(), t.center && (t.center = w(t.center, this.projection_)), t.extent && (t.extent = V(t.extent, this.projection_)), this.applyOptions_(t);
|
|
2794
2798
|
}
|
|
2795
2799
|
/**
|
|
2796
2800
|
* Set up the view with the given options.
|
|
@@ -2801,12 +2805,12 @@ class Gt extends H {
|
|
|
2801
2805
|
for (const u in I)
|
|
2802
2806
|
delete e[u];
|
|
2803
2807
|
this.setProperties(e, !0);
|
|
2804
|
-
const i =
|
|
2808
|
+
const i = Fn(t);
|
|
2805
2809
|
this.maxResolution_ = i.maxResolution, this.minResolution_ = i.minResolution, this.zoomFactor_ = i.zoomFactor, this.resolutions_ = t.resolutions, this.padding_ = t.padding, this.minZoom_ = i.minZoom;
|
|
2806
|
-
const
|
|
2810
|
+
const s = On(t), r = i.constraint, o = xn(t);
|
|
2807
2811
|
this.constraints_ = {
|
|
2808
|
-
center:
|
|
2809
|
-
resolution:
|
|
2812
|
+
center: s,
|
|
2813
|
+
resolution: r,
|
|
2810
2814
|
rotation: o
|
|
2811
2815
|
}, this.setRotation(t.rotation !== void 0 ? t.rotation : 0), this.setCenterInternal(
|
|
2812
2816
|
t.center !== void 0 ? t.center : null
|
|
@@ -2829,9 +2833,9 @@ class Gt extends H {
|
|
|
2829
2833
|
this.padding_ = t;
|
|
2830
2834
|
const i = this.getCenterInternal();
|
|
2831
2835
|
if (i) {
|
|
2832
|
-
const
|
|
2836
|
+
const s = t || [0, 0, 0, 0];
|
|
2833
2837
|
e = e || [0, 0, 0, 0];
|
|
2834
|
-
const
|
|
2838
|
+
const r = this.getResolution(), o = r / 2 * (s[3] - e[3] + e[1] - s[1]), u = r / 2 * (s[0] - e[0] + e[2] - s[2]);
|
|
2835
2839
|
this.setCenterInternal([i[0] + o, i[1] - u]);
|
|
2836
2840
|
}
|
|
2837
2841
|
}
|
|
@@ -2884,14 +2888,14 @@ class Gt extends H {
|
|
|
2884
2888
|
this.isDef() && !this.getAnimating() && this.resolveConstraints(0);
|
|
2885
2889
|
const e = new Array(arguments.length);
|
|
2886
2890
|
for (let i = 0; i < e.length; ++i) {
|
|
2887
|
-
let
|
|
2888
|
-
|
|
2889
|
-
|
|
2891
|
+
let s = arguments[i];
|
|
2892
|
+
s.center && (s = Object.assign({}, s), s.center = w(
|
|
2893
|
+
s.center,
|
|
2890
2894
|
this.getProjection()
|
|
2891
|
-
)),
|
|
2892
|
-
|
|
2895
|
+
)), s.anchor && (s = Object.assign({}, s), s.anchor = w(
|
|
2896
|
+
s.anchor,
|
|
2893
2897
|
this.getProjection()
|
|
2894
|
-
)), e[i] =
|
|
2898
|
+
)), e[i] = s;
|
|
2895
2899
|
}
|
|
2896
2900
|
this.animateInternal.apply(this, e);
|
|
2897
2901
|
}
|
|
@@ -2901,23 +2905,23 @@ class Gt extends H {
|
|
|
2901
2905
|
animateInternal(t) {
|
|
2902
2906
|
let e = arguments.length, i;
|
|
2903
2907
|
e > 1 && typeof arguments[e - 1] == "function" && (i = arguments[e - 1], --e);
|
|
2904
|
-
let
|
|
2905
|
-
for (;
|
|
2906
|
-
const l = arguments[
|
|
2908
|
+
let s = 0;
|
|
2909
|
+
for (; s < e && !this.isDef(); ++s) {
|
|
2910
|
+
const l = arguments[s];
|
|
2907
2911
|
l.center && this.setCenterInternal(l.center), l.zoom !== void 0 ? this.setZoom(l.zoom) : l.resolution && this.setResolution(l.resolution), l.rotation !== void 0 && this.setRotation(l.rotation);
|
|
2908
2912
|
}
|
|
2909
|
-
if (
|
|
2913
|
+
if (s === e) {
|
|
2910
2914
|
i && D(i, !0);
|
|
2911
2915
|
return;
|
|
2912
2916
|
}
|
|
2913
|
-
let
|
|
2917
|
+
let r = Date.now(), o = this.targetCenter_.slice(), u = this.targetResolution_, a = this.targetRotation_;
|
|
2914
2918
|
const h = [];
|
|
2915
|
-
for (;
|
|
2919
|
+
for (; s < e; ++s) {
|
|
2916
2920
|
const l = (
|
|
2917
2921
|
/** @type {AnimationOptions} */
|
|
2918
|
-
arguments[
|
|
2922
|
+
arguments[s]
|
|
2919
2923
|
), c = {
|
|
2920
|
-
start:
|
|
2924
|
+
start: r,
|
|
2921
2925
|
complete: !1,
|
|
2922
2926
|
anchor: l.anchor,
|
|
2923
2927
|
duration: l.duration !== void 0 ? l.duration : 1e3,
|
|
@@ -2929,9 +2933,9 @@ class Gt extends H {
|
|
|
2929
2933
|
const g = K(l.rotation - a + Math.PI, 2 * Math.PI) - Math.PI;
|
|
2930
2934
|
c.targetRotation = a + g, a = c.targetRotation;
|
|
2931
2935
|
}
|
|
2932
|
-
Zn(c) ? c.complete = !0 :
|
|
2936
|
+
Zn(c) ? c.complete = !0 : r += c.duration, h.push(c);
|
|
2933
2937
|
}
|
|
2934
|
-
this.animations_.push(h), this.setHint(
|
|
2938
|
+
this.animations_.push(h), this.setHint(T.ANIMATING, 1), this.updateAnimations_();
|
|
2935
2939
|
}
|
|
2936
2940
|
/**
|
|
2937
2941
|
* Determine if the view is being animated.
|
|
@@ -2939,7 +2943,7 @@ class Gt extends H {
|
|
|
2939
2943
|
* @api
|
|
2940
2944
|
*/
|
|
2941
2945
|
getAnimating() {
|
|
2942
|
-
return this.hints_[
|
|
2946
|
+
return this.hints_[T.ANIMATING] > 0;
|
|
2943
2947
|
}
|
|
2944
2948
|
/**
|
|
2945
2949
|
* Determine if the user is interacting with the view, such as panning or zooming.
|
|
@@ -2947,20 +2951,20 @@ class Gt extends H {
|
|
|
2947
2951
|
* @api
|
|
2948
2952
|
*/
|
|
2949
2953
|
getInteracting() {
|
|
2950
|
-
return this.hints_[
|
|
2954
|
+
return this.hints_[T.INTERACTING] > 0;
|
|
2951
2955
|
}
|
|
2952
2956
|
/**
|
|
2953
2957
|
* Cancel any ongoing animations.
|
|
2954
2958
|
* @api
|
|
2955
2959
|
*/
|
|
2956
2960
|
cancelAnimations() {
|
|
2957
|
-
this.setHint(
|
|
2961
|
+
this.setHint(T.ANIMATING, -this.hints_[T.ANIMATING]);
|
|
2958
2962
|
let t;
|
|
2959
2963
|
for (let e = 0, i = this.animations_.length; e < i; ++e) {
|
|
2960
|
-
const
|
|
2961
|
-
if (
|
|
2962
|
-
for (let
|
|
2963
|
-
const u = r
|
|
2964
|
+
const s = this.animations_[e];
|
|
2965
|
+
if (s[0].callback && D(s[0].callback, !1), !t)
|
|
2966
|
+
for (let r = 0, o = s.length; r < o; ++r) {
|
|
2967
|
+
const u = s[r];
|
|
2964
2968
|
if (!u.complete) {
|
|
2965
2969
|
t = u.anchor;
|
|
2966
2970
|
break;
|
|
@@ -2978,21 +2982,21 @@ class Gt extends H {
|
|
|
2978
2982
|
const t = Date.now();
|
|
2979
2983
|
let e = !1;
|
|
2980
2984
|
for (let i = this.animations_.length - 1; i >= 0; --i) {
|
|
2981
|
-
const
|
|
2982
|
-
let
|
|
2983
|
-
for (let o = 0, u =
|
|
2984
|
-
const a =
|
|
2985
|
+
const s = this.animations_[i];
|
|
2986
|
+
let r = !0;
|
|
2987
|
+
for (let o = 0, u = s.length; o < u; ++o) {
|
|
2988
|
+
const a = s[o];
|
|
2985
2989
|
if (a.complete)
|
|
2986
2990
|
continue;
|
|
2987
2991
|
const h = t - a.start;
|
|
2988
2992
|
let l = a.duration > 0 ? h / a.duration : 1;
|
|
2989
|
-
l >= 1 ? (a.complete = !0, l = 1) :
|
|
2993
|
+
l >= 1 ? (a.complete = !0, l = 1) : r = !1;
|
|
2990
2994
|
const c = a.easing(l);
|
|
2991
2995
|
if (a.sourceCenter) {
|
|
2992
|
-
const g = a.sourceCenter[0], f = a.sourceCenter[1], d = a.targetCenter[0],
|
|
2996
|
+
const g = a.sourceCenter[0], f = a.sourceCenter[1], d = a.targetCenter[0], _ = a.targetCenter[1];
|
|
2993
2997
|
this.nextCenter_ = a.targetCenter;
|
|
2994
|
-
const
|
|
2995
|
-
this.targetCenter_ = [
|
|
2998
|
+
const R = g + c * (d - g), M = f + c * (_ - f);
|
|
2999
|
+
this.targetCenter_ = [R, M];
|
|
2996
3000
|
}
|
|
2997
3001
|
if (a.sourceResolution && a.targetResolution) {
|
|
2998
3002
|
const g = c === 1 ? a.targetResolution : a.sourceResolution + c * (a.targetResolution - a.sourceResolution);
|
|
@@ -3027,9 +3031,9 @@ class Gt extends H {
|
|
|
3027
3031
|
if (this.applyTargetState_(!0), e = !0, !a.complete)
|
|
3028
3032
|
break;
|
|
3029
3033
|
}
|
|
3030
|
-
if (
|
|
3031
|
-
this.animations_[i] = null, this.setHint(
|
|
3032
|
-
const o =
|
|
3034
|
+
if (r) {
|
|
3035
|
+
this.animations_[i] = null, this.setHint(T.ANIMATING, -1), this.nextCenter_ = null, this.nextResolution_ = NaN, this.nextRotation_ = NaN;
|
|
3036
|
+
const o = s[0].callback;
|
|
3033
3037
|
o && D(o, !0);
|
|
3034
3038
|
}
|
|
3035
3039
|
}
|
|
@@ -3044,8 +3048,8 @@ class Gt extends H {
|
|
|
3044
3048
|
*/
|
|
3045
3049
|
calculateCenterRotate(t, e) {
|
|
3046
3050
|
let i;
|
|
3047
|
-
const
|
|
3048
|
-
return
|
|
3051
|
+
const s = this.getCenterInternal();
|
|
3052
|
+
return s !== void 0 && (i = [s[0] - e[0], s[1] - e[1]], Ke(i, t - this.getRotation()), De(i, e)), i;
|
|
3049
3053
|
}
|
|
3050
3054
|
/**
|
|
3051
3055
|
* @param {number} resolution Target resolution.
|
|
@@ -3054,9 +3058,9 @@ class Gt extends H {
|
|
|
3054
3058
|
*/
|
|
3055
3059
|
calculateCenterZoom(t, e) {
|
|
3056
3060
|
let i;
|
|
3057
|
-
const
|
|
3058
|
-
if (
|
|
3059
|
-
const o = e[0] - t * (e[0] -
|
|
3061
|
+
const s = this.getCenterInternal(), r = this.getResolution();
|
|
3062
|
+
if (s !== void 0 && r !== void 0) {
|
|
3063
|
+
const o = e[0] - t * (e[0] - s[0]) / r, u = e[1] - t * (e[1] - s[1]) / r;
|
|
3060
3064
|
i = [o, u];
|
|
3061
3065
|
}
|
|
3062
3066
|
return i;
|
|
@@ -3070,10 +3074,10 @@ class Gt extends H {
|
|
|
3070
3074
|
getViewportSize_(t) {
|
|
3071
3075
|
const e = this.viewportSize_;
|
|
3072
3076
|
if (t) {
|
|
3073
|
-
const i = e[0],
|
|
3077
|
+
const i = e[0], s = e[1];
|
|
3074
3078
|
return [
|
|
3075
|
-
Math.abs(i * Math.cos(t)) + Math.abs(
|
|
3076
|
-
Math.abs(i * Math.sin(t)) + Math.abs(
|
|
3079
|
+
Math.abs(i * Math.cos(t)) + Math.abs(s * Math.sin(t)),
|
|
3080
|
+
Math.abs(i * Math.sin(t)) + Math.abs(s * Math.cos(t))
|
|
3077
3081
|
];
|
|
3078
3082
|
}
|
|
3079
3083
|
return e;
|
|
@@ -3096,7 +3100,7 @@ class Gt extends H {
|
|
|
3096
3100
|
*/
|
|
3097
3101
|
getCenter() {
|
|
3098
3102
|
const t = this.getCenterInternal();
|
|
3099
|
-
return t &&
|
|
3103
|
+
return t && Tt(t, this.getProjection());
|
|
3100
3104
|
}
|
|
3101
3105
|
/**
|
|
3102
3106
|
* Get the view center without transforming to user projection.
|
|
@@ -3152,17 +3156,17 @@ class Gt extends H {
|
|
|
3152
3156
|
/** @type {!import("./coordinate.js").Coordinate} */
|
|
3153
3157
|
this.getCenterInternal()
|
|
3154
3158
|
);
|
|
3155
|
-
|
|
3159
|
+
S(e, 1);
|
|
3156
3160
|
const i = (
|
|
3157
3161
|
/** @type {!number} */
|
|
3158
3162
|
this.getResolution()
|
|
3159
3163
|
);
|
|
3160
|
-
|
|
3161
|
-
const
|
|
3164
|
+
S(i !== void 0, 2);
|
|
3165
|
+
const s = (
|
|
3162
3166
|
/** @type {!number} */
|
|
3163
3167
|
this.getRotation()
|
|
3164
3168
|
);
|
|
3165
|
-
return
|
|
3169
|
+
return S(s !== void 0, 3), Le(e, i, s, t);
|
|
3166
3170
|
}
|
|
3167
3171
|
/**
|
|
3168
3172
|
* Get the maximum resolution of the view.
|
|
@@ -3278,8 +3282,8 @@ class Gt extends H {
|
|
|
3278
3282
|
*/
|
|
3279
3283
|
getResolutionForExtentInternal(t, e) {
|
|
3280
3284
|
e = e || this.getViewportSizeMinusPadding_();
|
|
3281
|
-
const i = A(t) / e[0],
|
|
3282
|
-
return Math.max(i,
|
|
3285
|
+
const i = A(t) / e[0], s = X(t) / e[1];
|
|
3286
|
+
return Math.max(i, s);
|
|
3283
3287
|
}
|
|
3284
3288
|
/**
|
|
3285
3289
|
* Return a function that returns a value between 0 and 1 for a
|
|
@@ -3289,14 +3293,14 @@ class Gt extends H {
|
|
|
3289
3293
|
*/
|
|
3290
3294
|
getResolutionForValueFunction(t) {
|
|
3291
3295
|
t = t || 2;
|
|
3292
|
-
const e = this.getConstrainedResolution(this.maxResolution_), i = this.minResolution_,
|
|
3296
|
+
const e = this.getConstrainedResolution(this.maxResolution_), i = this.minResolution_, s = Math.log(e / i) / Math.log(t);
|
|
3293
3297
|
return (
|
|
3294
3298
|
/**
|
|
3295
3299
|
* @param {number} value Value.
|
|
3296
3300
|
* @return {number} Resolution.
|
|
3297
3301
|
*/
|
|
3298
|
-
function(
|
|
3299
|
-
return e / Math.pow(t,
|
|
3302
|
+
function(r) {
|
|
3303
|
+
return e / Math.pow(t, r * s);
|
|
3300
3304
|
}
|
|
3301
3305
|
);
|
|
3302
3306
|
}
|
|
@@ -3319,14 +3323,14 @@ class Gt extends H {
|
|
|
3319
3323
|
* @return {function(number): number} Value for resolution function.
|
|
3320
3324
|
*/
|
|
3321
3325
|
getValueForResolutionFunction(t) {
|
|
3322
|
-
const e = Math.log(t || 2), i = this.getConstrainedResolution(this.maxResolution_),
|
|
3326
|
+
const e = Math.log(t || 2), i = this.getConstrainedResolution(this.maxResolution_), s = this.minResolution_, r = Math.log(i / s) / e;
|
|
3323
3327
|
return (
|
|
3324
3328
|
/**
|
|
3325
3329
|
* @param {number} resolution Resolution.
|
|
3326
3330
|
* @return {number} Value.
|
|
3327
3331
|
*/
|
|
3328
3332
|
function(o) {
|
|
3329
|
-
return Math.log(i / o) / e /
|
|
3333
|
+
return Math.log(i / o) / e / r;
|
|
3330
3334
|
}
|
|
3331
3335
|
);
|
|
3332
3336
|
}
|
|
@@ -3349,23 +3353,23 @@ class Gt extends H {
|
|
|
3349
3353
|
*/
|
|
3350
3354
|
getState() {
|
|
3351
3355
|
const t = this.getProjection(), e = this.getResolution(), i = this.getRotation();
|
|
3352
|
-
let
|
|
3356
|
+
let s = (
|
|
3353
3357
|
/** @type {import("./coordinate.js").Coordinate} */
|
|
3354
3358
|
this.getCenterInternal()
|
|
3355
3359
|
);
|
|
3356
|
-
const
|
|
3357
|
-
if (
|
|
3360
|
+
const r = this.padding_;
|
|
3361
|
+
if (r) {
|
|
3358
3362
|
const o = this.getViewportSizeMinusPadding_();
|
|
3359
|
-
|
|
3360
|
-
|
|
3363
|
+
s = rt(
|
|
3364
|
+
s,
|
|
3361
3365
|
this.getViewportSize_(),
|
|
3362
|
-
[o[0] / 2 +
|
|
3366
|
+
[o[0] / 2 + r[3], o[1] / 2 + r[0]],
|
|
3363
3367
|
e,
|
|
3364
3368
|
i
|
|
3365
3369
|
);
|
|
3366
3370
|
}
|
|
3367
3371
|
return {
|
|
3368
|
-
center:
|
|
3372
|
+
center: s.slice(0),
|
|
3369
3373
|
projection: t !== void 0 ? t : null,
|
|
3370
3374
|
resolution: e,
|
|
3371
3375
|
nextCenter: this.nextCenter_,
|
|
@@ -3403,13 +3407,13 @@ class Gt extends H {
|
|
|
3403
3407
|
* @api
|
|
3404
3408
|
*/
|
|
3405
3409
|
getZoomForResolution(t) {
|
|
3406
|
-
let e = this.minZoom_ || 0, i,
|
|
3410
|
+
let e = this.minZoom_ || 0, i, s;
|
|
3407
3411
|
if (this.resolutions_) {
|
|
3408
|
-
const
|
|
3409
|
-
e =
|
|
3412
|
+
const r = Lt(this.resolutions_, t, 1);
|
|
3413
|
+
e = r, i = this.resolutions_[r], r == this.resolutions_.length - 1 ? s = 2 : s = i / this.resolutions_[r + 1];
|
|
3410
3414
|
} else
|
|
3411
|
-
i = this.maxResolution_,
|
|
3412
|
-
return e + Math.log(i / t) / Math.log(
|
|
3415
|
+
i = this.maxResolution_, s = this.zoomFactor_;
|
|
3416
|
+
return e + Math.log(i / t) / Math.log(s);
|
|
3413
3417
|
}
|
|
3414
3418
|
/**
|
|
3415
3419
|
* Get the resolution for a zoom level.
|
|
@@ -3421,12 +3425,12 @@ class Gt extends H {
|
|
|
3421
3425
|
if (this.resolutions_) {
|
|
3422
3426
|
if (this.resolutions_.length <= 1)
|
|
3423
3427
|
return 0;
|
|
3424
|
-
const e =
|
|
3428
|
+
const e = p(
|
|
3425
3429
|
Math.floor(t),
|
|
3426
3430
|
0,
|
|
3427
3431
|
this.resolutions_.length - 2
|
|
3428
3432
|
), i = this.resolutions_[e] / this.resolutions_[e + 1];
|
|
3429
|
-
return this.resolutions_[e] / Math.pow(i,
|
|
3433
|
+
return this.resolutions_[e] / Math.pow(i, p(t - e, 0, 1));
|
|
3430
3434
|
}
|
|
3431
3435
|
return this.maxResolution_ / Math.pow(this.zoomFactor_, t - this.minZoom_);
|
|
3432
3436
|
}
|
|
@@ -3442,20 +3446,20 @@ class Gt extends H {
|
|
|
3442
3446
|
*/
|
|
3443
3447
|
fit(t, e) {
|
|
3444
3448
|
let i;
|
|
3445
|
-
if (
|
|
3449
|
+
if (S(
|
|
3446
3450
|
Array.isArray(t) || typeof /** @type {?} */
|
|
3447
3451
|
t.getSimplifiedGeometry == "function",
|
|
3448
3452
|
24
|
|
3449
3453
|
), Array.isArray(t)) {
|
|
3450
|
-
|
|
3451
|
-
const
|
|
3452
|
-
i = Xt(
|
|
3454
|
+
S(!tt(t), 25);
|
|
3455
|
+
const s = V(t, this.getProjection());
|
|
3456
|
+
i = Xt(s);
|
|
3453
3457
|
} else if (t.getType() === "Circle") {
|
|
3454
|
-
const
|
|
3458
|
+
const s = V(
|
|
3455
3459
|
t.getExtent(),
|
|
3456
3460
|
this.getProjection()
|
|
3457
3461
|
);
|
|
3458
|
-
i = Xt(
|
|
3462
|
+
i = Xt(s), i.rotate(this.getRotation(), L(s));
|
|
3459
3463
|
} else
|
|
3460
3464
|
i = t;
|
|
3461
3465
|
this.fitInternal(i, e);
|
|
@@ -3466,10 +3470,10 @@ class Gt extends H {
|
|
|
3466
3470
|
* @return {import("./extent").Extent} The rotated extent for the geometry.
|
|
3467
3471
|
*/
|
|
3468
3472
|
rotatedExtentForGeometry(t) {
|
|
3469
|
-
const e = this.getRotation(), i = Math.cos(e),
|
|
3473
|
+
const e = this.getRotation(), i = Math.cos(e), s = Math.sin(-e), r = t.getFlatCoordinates(), o = t.getStride();
|
|
3470
3474
|
let u = 1 / 0, a = 1 / 0, h = -1 / 0, l = -1 / 0;
|
|
3471
|
-
for (let c = 0, g =
|
|
3472
|
-
const f =
|
|
3475
|
+
for (let c = 0, g = r.length; c < g; c += o) {
|
|
3476
|
+
const f = r[c] * i - r[c + 1] * s, d = r[c] * s + r[c + 1] * i;
|
|
3473
3477
|
u = Math.min(u, f), a = Math.min(a, d), h = Math.max(h, f), l = Math.max(l, d);
|
|
3474
3478
|
}
|
|
3475
3479
|
return [u, a, h, l];
|
|
@@ -3482,27 +3486,27 @@ class Gt extends H {
|
|
|
3482
3486
|
e = e || {};
|
|
3483
3487
|
let i = e.size;
|
|
3484
3488
|
i || (i = this.getViewportSizeMinusPadding_());
|
|
3485
|
-
const
|
|
3489
|
+
const s = e.padding !== void 0 ? e.padding : [0, 0, 0, 0], r = e.nearest !== void 0 ? e.nearest : !1;
|
|
3486
3490
|
let o;
|
|
3487
3491
|
e.minResolution !== void 0 ? o = e.minResolution : e.maxZoom !== void 0 ? o = this.getResolutionForZoom(e.maxZoom) : o = 0;
|
|
3488
3492
|
const u = this.rotatedExtentForGeometry(t);
|
|
3489
3493
|
let a = this.getResolutionForExtentInternal(u, [
|
|
3490
|
-
i[0] -
|
|
3491
|
-
i[1] -
|
|
3494
|
+
i[0] - s[1] - s[3],
|
|
3495
|
+
i[1] - s[0] - s[2]
|
|
3492
3496
|
]);
|
|
3493
|
-
a = isNaN(a) ? o : Math.max(a, o), a = this.getConstrainedResolution(a,
|
|
3497
|
+
a = isNaN(a) ? o : Math.max(a, o), a = this.getConstrainedResolution(a, r ? 0 : 1);
|
|
3494
3498
|
const h = this.getRotation(), l = Math.sin(h), c = Math.cos(h), g = L(u);
|
|
3495
|
-
g[0] += (
|
|
3496
|
-
const f = g[0] * c - g[1] * l, d = g[1] * c + g[0] * l,
|
|
3499
|
+
g[0] += (s[1] - s[3]) / 2 * a, g[1] += (s[0] - s[2]) / 2 * a;
|
|
3500
|
+
const f = g[0] * c - g[1] * l, d = g[1] * c + g[0] * l, _ = this.getConstrainedCenter([f, d], a), R = e.callback ? e.callback : Ee;
|
|
3497
3501
|
e.duration !== void 0 ? this.animateInternal(
|
|
3498
3502
|
{
|
|
3499
3503
|
resolution: a,
|
|
3500
|
-
center:
|
|
3504
|
+
center: _,
|
|
3501
3505
|
duration: e.duration,
|
|
3502
3506
|
easing: e.easing
|
|
3503
3507
|
},
|
|
3504
|
-
|
|
3505
|
-
) : (this.targetResolution_ = a, this.targetCenter_ =
|
|
3508
|
+
R
|
|
3509
|
+
) : (this.targetResolution_ = a, this.targetCenter_ = _, this.applyTargetState_(!1, !0), D(R, !0));
|
|
3506
3510
|
}
|
|
3507
3511
|
/**
|
|
3508
3512
|
* Center on coordinate and view position.
|
|
@@ -3525,7 +3529,7 @@ class Gt extends H {
|
|
|
3525
3529
|
*/
|
|
3526
3530
|
centerOnInternal(t, e, i) {
|
|
3527
3531
|
this.setCenterInternal(
|
|
3528
|
-
|
|
3532
|
+
rt(
|
|
3529
3533
|
t,
|
|
3530
3534
|
e,
|
|
3531
3535
|
i,
|
|
@@ -3542,23 +3546,23 @@ class Gt extends H {
|
|
|
3542
3546
|
* @param {import("./size.js").Size} size Size.
|
|
3543
3547
|
* @return {Array<number>|undefined} Center shift.
|
|
3544
3548
|
*/
|
|
3545
|
-
calculateCenterShift(t, e, i,
|
|
3546
|
-
let
|
|
3549
|
+
calculateCenterShift(t, e, i, s) {
|
|
3550
|
+
let r;
|
|
3547
3551
|
const o = this.padding_;
|
|
3548
3552
|
if (o && t) {
|
|
3549
|
-
const u = this.getViewportSizeMinusPadding_(-i), a =
|
|
3553
|
+
const u = this.getViewportSizeMinusPadding_(-i), a = rt(
|
|
3550
3554
|
t,
|
|
3551
|
-
|
|
3555
|
+
s,
|
|
3552
3556
|
[u[0] / 2 + o[3], u[1] / 2 + o[0]],
|
|
3553
3557
|
e,
|
|
3554
3558
|
i
|
|
3555
3559
|
);
|
|
3556
|
-
|
|
3560
|
+
r = [
|
|
3557
3561
|
t[0] - a[0],
|
|
3558
3562
|
t[1] - a[1]
|
|
3559
3563
|
];
|
|
3560
3564
|
}
|
|
3561
|
-
return
|
|
3565
|
+
return r;
|
|
3562
3566
|
}
|
|
3563
3567
|
/**
|
|
3564
3568
|
* @return {boolean} Is defined.
|
|
@@ -3572,7 +3576,7 @@ class Gt extends H {
|
|
|
3572
3576
|
* @api
|
|
3573
3577
|
*/
|
|
3574
3578
|
adjustCenter(t) {
|
|
3575
|
-
const e =
|
|
3579
|
+
const e = Tt(this.targetCenter_, this.getProjection());
|
|
3576
3580
|
this.setCenter([
|
|
3577
3581
|
e[0] + t[0],
|
|
3578
3582
|
e[1] + t[1]
|
|
@@ -3606,13 +3610,13 @@ class Gt extends H {
|
|
|
3606
3610
|
* @param {import("./coordinate.js").Coordinate} [anchor] The origin of the transformation.
|
|
3607
3611
|
*/
|
|
3608
3612
|
adjustResolutionInternal(t, e) {
|
|
3609
|
-
const i = this.getAnimating() || this.getInteracting(),
|
|
3613
|
+
const i = this.getAnimating() || this.getInteracting(), s = this.getViewportSize_(this.getRotation()), r = this.constraints_.resolution(
|
|
3610
3614
|
this.targetResolution_ * t,
|
|
3611
3615
|
0,
|
|
3612
|
-
|
|
3616
|
+
s,
|
|
3613
3617
|
i
|
|
3614
3618
|
);
|
|
3615
|
-
e && (this.targetCenter_ = this.calculateCenterZoom(
|
|
3619
|
+
e && (this.targetCenter_ = this.calculateCenterZoom(r, e)), this.targetResolution_ *= t, this.applyTargetState_();
|
|
3616
3620
|
}
|
|
3617
3621
|
/**
|
|
3618
3622
|
* Adds a value to the view zoom level, optionally using an anchor. Any resolution
|
|
@@ -3639,11 +3643,11 @@ class Gt extends H {
|
|
|
3639
3643
|
* @param {import("./coordinate.js").Coordinate} [anchor] The rotation center.
|
|
3640
3644
|
*/
|
|
3641
3645
|
adjustRotationInternal(t, e) {
|
|
3642
|
-
const i = this.getAnimating() || this.getInteracting(),
|
|
3646
|
+
const i = this.getAnimating() || this.getInteracting(), s = this.constraints_.rotation(
|
|
3643
3647
|
this.targetRotation_ + t,
|
|
3644
3648
|
i
|
|
3645
3649
|
);
|
|
3646
|
-
e && (this.targetCenter_ = this.calculateCenterRotate(
|
|
3650
|
+
e && (this.targetCenter_ = this.calculateCenterRotate(s, e)), this.targetRotation_ += t, this.applyTargetState_();
|
|
3647
3651
|
}
|
|
3648
3652
|
/**
|
|
3649
3653
|
* Set the center of the current view. Any extent constraint will apply.
|
|
@@ -3706,27 +3710,27 @@ class Gt extends H {
|
|
|
3706
3710
|
* @private
|
|
3707
3711
|
*/
|
|
3708
3712
|
applyTargetState_(t, e) {
|
|
3709
|
-
const i = this.getAnimating() || this.getInteracting() || e,
|
|
3713
|
+
const i = this.getAnimating() || this.getInteracting() || e, s = this.constraints_.rotation(
|
|
3710
3714
|
this.targetRotation_,
|
|
3711
3715
|
i
|
|
3712
|
-
),
|
|
3716
|
+
), r = this.getViewportSize_(s), o = this.constraints_.resolution(
|
|
3713
3717
|
this.targetResolution_,
|
|
3714
3718
|
0,
|
|
3715
|
-
|
|
3719
|
+
r,
|
|
3716
3720
|
i
|
|
3717
3721
|
), u = this.constraints_.center(
|
|
3718
3722
|
this.targetCenter_,
|
|
3719
3723
|
o,
|
|
3720
|
-
|
|
3724
|
+
r,
|
|
3721
3725
|
i,
|
|
3722
3726
|
this.calculateCenterShift(
|
|
3723
3727
|
this.targetCenter_,
|
|
3724
3728
|
o,
|
|
3725
|
-
|
|
3726
|
-
|
|
3729
|
+
s,
|
|
3730
|
+
r
|
|
3727
3731
|
)
|
|
3728
3732
|
);
|
|
3729
|
-
this.get(I.ROTATION) !==
|
|
3733
|
+
this.get(I.ROTATION) !== s && this.set(I.ROTATION, s), this.get(I.RESOLUTION) !== o && (this.set(I.RESOLUTION, o), this.set("zoom", this.getZoom(), !0)), (!u || !this.get(I.CENTER) || !B(this.get(I.CENTER), u)) && this.set(I.CENTER, u), this.getAnimating() && !t && this.cancelAnimations(), this.cancelAnchor_ = void 0;
|
|
3730
3734
|
}
|
|
3731
3735
|
/**
|
|
3732
3736
|
* If any constraints need to be applied, an animation will be triggered.
|
|
@@ -3739,9 +3743,9 @@ class Gt extends H {
|
|
|
3739
3743
|
*/
|
|
3740
3744
|
resolveConstraints(t, e, i) {
|
|
3741
3745
|
t = t !== void 0 ? t : 200;
|
|
3742
|
-
const
|
|
3746
|
+
const s = e || 0, r = this.constraints_.rotation(this.targetRotation_), o = this.getViewportSize_(r), u = this.constraints_.resolution(
|
|
3743
3747
|
this.targetResolution_,
|
|
3744
|
-
|
|
3748
|
+
s,
|
|
3745
3749
|
o
|
|
3746
3750
|
), a = this.constraints_.center(
|
|
3747
3751
|
this.targetCenter_,
|
|
@@ -3751,20 +3755,20 @@ class Gt extends H {
|
|
|
3751
3755
|
this.calculateCenterShift(
|
|
3752
3756
|
this.targetCenter_,
|
|
3753
3757
|
u,
|
|
3754
|
-
|
|
3758
|
+
r,
|
|
3755
3759
|
o
|
|
3756
3760
|
)
|
|
3757
3761
|
);
|
|
3758
3762
|
if (t === 0 && !this.cancelAnchor_) {
|
|
3759
|
-
this.targetResolution_ = u, this.targetRotation_ =
|
|
3763
|
+
this.targetResolution_ = u, this.targetRotation_ = r, this.targetCenter_ = a, this.applyTargetState_();
|
|
3760
3764
|
return;
|
|
3761
3765
|
}
|
|
3762
|
-
i = i || (t === 0 ? this.cancelAnchor_ : void 0), this.cancelAnchor_ = void 0, (this.getResolution() !== u || this.getRotation() !==
|
|
3763
|
-
rotation:
|
|
3766
|
+
i = i || (t === 0 ? this.cancelAnchor_ : void 0), this.cancelAnchor_ = void 0, (this.getResolution() !== u || this.getRotation() !== r || !this.getCenterInternal() || !B(this.getCenterInternal(), a)) && (this.getAnimating() && this.cancelAnimations(), this.animateInternal({
|
|
3767
|
+
rotation: r,
|
|
3764
3768
|
center: a,
|
|
3765
3769
|
resolution: u,
|
|
3766
3770
|
duration: t,
|
|
3767
|
-
easing:
|
|
3771
|
+
easing: Rn,
|
|
3768
3772
|
anchor: i
|
|
3769
3773
|
}));
|
|
3770
3774
|
}
|
|
@@ -3775,7 +3779,7 @@ class Gt extends H {
|
|
|
3775
3779
|
* @api
|
|
3776
3780
|
*/
|
|
3777
3781
|
beginInteraction() {
|
|
3778
|
-
this.resolveConstraints(0), this.setHint(
|
|
3782
|
+
this.resolveConstraints(0), this.setHint(T.INTERACTING, 1);
|
|
3779
3783
|
}
|
|
3780
3784
|
/**
|
|
3781
3785
|
* Notify the View that an interaction has ended. The view state will be resolved
|
|
@@ -3796,7 +3800,7 @@ class Gt extends H {
|
|
|
3796
3800
|
* @param {import("./coordinate.js").Coordinate} [anchor] The origin of the transformation.
|
|
3797
3801
|
*/
|
|
3798
3802
|
endInteractionInternal(t, e, i) {
|
|
3799
|
-
this.getInteracting() && (this.setHint(
|
|
3803
|
+
this.getInteracting() && (this.setHint(T.INTERACTING, -1), this.resolveConstraints(t, e, i));
|
|
3800
3804
|
}
|
|
3801
3805
|
/**
|
|
3802
3806
|
* Get a valid position for the view center according to the current constraints.
|
|
@@ -3860,29 +3864,29 @@ function On(n) {
|
|
|
3860
3864
|
}
|
|
3861
3865
|
return ln;
|
|
3862
3866
|
}
|
|
3863
|
-
function
|
|
3864
|
-
let t, e, i, o = n.minZoom !== void 0 ? n.minZoom :
|
|
3867
|
+
function Fn(n) {
|
|
3868
|
+
let t, e, i, o = n.minZoom !== void 0 ? n.minZoom : st, u = n.maxZoom !== void 0 ? n.maxZoom : 28;
|
|
3865
3869
|
const a = n.zoomFactor !== void 0 ? n.zoomFactor : 2, h = n.multiWorld !== void 0 ? n.multiWorld : !1, l = n.smoothResolutionConstraint !== void 0 ? n.smoothResolutionConstraint : !0, c = n.showFullExtent !== void 0 ? n.showFullExtent : !1, g = ct(n.projection, "EPSG:3857"), f = g.getExtent();
|
|
3866
|
-
let d = n.constrainOnlyCenter,
|
|
3867
|
-
if (!h && !
|
|
3868
|
-
const
|
|
3869
|
-
e =
|
|
3870
|
-
|
|
3870
|
+
let d = n.constrainOnlyCenter, _ = n.extent;
|
|
3871
|
+
if (!h && !_ && g.isGlobal() && (d = !1, _ = f), n.resolutions !== void 0) {
|
|
3872
|
+
const R = n.resolutions;
|
|
3873
|
+
e = R[o], i = R[u] !== void 0 ? R[u] : R[R.length - 1], n.constrainResolution ? t = hn(
|
|
3874
|
+
R,
|
|
3871
3875
|
l,
|
|
3872
|
-
!d &&
|
|
3876
|
+
!d && _,
|
|
3873
3877
|
c
|
|
3874
3878
|
) : t = Ot(
|
|
3875
3879
|
e,
|
|
3876
3880
|
i,
|
|
3877
3881
|
l,
|
|
3878
|
-
!d &&
|
|
3882
|
+
!d && _,
|
|
3879
3883
|
c
|
|
3880
3884
|
);
|
|
3881
3885
|
} else {
|
|
3882
3886
|
const M = (f ? Math.max(A(f), X(f)) : (
|
|
3883
3887
|
// use an extent that can fit the whole world if need be
|
|
3884
3888
|
360 * vt.degrees / g.getMetersPerUnit()
|
|
3885
|
-
)) / un / Math.pow(2,
|
|
3889
|
+
)) / un / Math.pow(2, st), y = M / Math.pow(2, 28 - st);
|
|
3886
3890
|
e = n.maxResolution, e !== void 0 ? o = 0 : e = M / Math.pow(a, o), i = n.minResolution, i === void 0 && (n.maxZoom !== void 0 ? n.maxResolution !== void 0 ? i = e / Math.pow(a, u) : i = M / Math.pow(a, u) : i = y), u = o + Math.floor(
|
|
3887
3891
|
Math.log(e / i) / Math.log(a)
|
|
3888
3892
|
), i = e / Math.pow(a, u - o), n.constrainResolution ? t = cn(
|
|
@@ -3890,13 +3894,13 @@ function xn(n) {
|
|
|
3890
3894
|
e,
|
|
3891
3895
|
i,
|
|
3892
3896
|
l,
|
|
3893
|
-
!d &&
|
|
3897
|
+
!d && _,
|
|
3894
3898
|
c
|
|
3895
3899
|
) : t = Ot(
|
|
3896
3900
|
e,
|
|
3897
3901
|
i,
|
|
3898
3902
|
l,
|
|
3899
|
-
!d &&
|
|
3903
|
+
!d && _,
|
|
3900
3904
|
c
|
|
3901
3905
|
);
|
|
3902
3906
|
}
|
|
@@ -3908,24 +3912,24 @@ function xn(n) {
|
|
|
3908
3912
|
zoomFactor: a
|
|
3909
3913
|
};
|
|
3910
3914
|
}
|
|
3911
|
-
function
|
|
3915
|
+
function xn(n) {
|
|
3912
3916
|
if (n.enableRotation !== void 0 ? n.enableRotation : !0) {
|
|
3913
3917
|
const e = n.constrainRotation;
|
|
3914
|
-
return e === void 0 || e === !0 ? dn() : e === !1 ?
|
|
3918
|
+
return e === void 0 || e === !0 ? dn() : e === !1 ? Ft : typeof e == "number" ? fn(e) : Ft;
|
|
3915
3919
|
}
|
|
3916
3920
|
return gn;
|
|
3917
3921
|
}
|
|
3918
3922
|
function Zn(n) {
|
|
3919
3923
|
return !(n.sourceCenter && n.targetCenter && !B(n.sourceCenter, n.targetCenter) || n.sourceResolution !== n.targetResolution || n.sourceRotation !== n.targetRotation);
|
|
3920
3924
|
}
|
|
3921
|
-
function
|
|
3922
|
-
const
|
|
3923
|
-
let o = Math.sin(-
|
|
3925
|
+
function rt(n, t, e, i, s) {
|
|
3926
|
+
const r = Math.cos(-s);
|
|
3927
|
+
let o = Math.sin(-s), u = n[0] * r - n[1] * o, a = n[1] * r + n[0] * o;
|
|
3924
3928
|
u += (t[0] / 2 - e[0]) * i, a += (e[1] - t[1] / 2) * i, o = -o;
|
|
3925
|
-
const h = u *
|
|
3929
|
+
const h = u * r - a * o, l = a * r + u * o;
|
|
3926
3930
|
return [h, l];
|
|
3927
3931
|
}
|
|
3928
|
-
class
|
|
3932
|
+
class pi extends on {
|
|
3929
3933
|
/**
|
|
3930
3934
|
* @param {Options<SourceType>} options Layer options.
|
|
3931
3935
|
*/
|
|
@@ -4032,12 +4036,12 @@ class Ii extends on {
|
|
|
4032
4036
|
viewState: t.getState(),
|
|
4033
4037
|
extent: t.calculateExtent()
|
|
4034
4038
|
} : e = t, !e.layerStatesArray && i && (e.layerStatesArray = i.getLayerGroup().getLayerStatesArray());
|
|
4035
|
-
let
|
|
4036
|
-
e.layerStatesArray ?
|
|
4039
|
+
let s;
|
|
4040
|
+
e.layerStatesArray ? s = e.layerStatesArray.find(
|
|
4037
4041
|
(o) => o.layer === this
|
|
4038
|
-
) :
|
|
4039
|
-
const
|
|
4040
|
-
return bn(
|
|
4042
|
+
) : s = this.getLayerState();
|
|
4043
|
+
const r = this.getExtent();
|
|
4044
|
+
return bn(s, e.viewState) && (!r || lt(r, e.extent));
|
|
4041
4045
|
}
|
|
4042
4046
|
/**
|
|
4043
4047
|
* Get the attributions of the source of this layer for the given view.
|
|
@@ -4053,9 +4057,9 @@ class Ii extends on {
|
|
|
4053
4057
|
const i = this.getSource();
|
|
4054
4058
|
if (i && (e = i.getAttributions()), !e)
|
|
4055
4059
|
return [];
|
|
4056
|
-
const
|
|
4057
|
-
let
|
|
4058
|
-
return Array.isArray(
|
|
4060
|
+
const s = t instanceof Gt ? t.getViewStateAndExtent() : t;
|
|
4061
|
+
let r = e(s);
|
|
4062
|
+
return Array.isArray(r) || (r = [r]), r;
|
|
4059
4063
|
}
|
|
4060
4064
|
/**
|
|
4061
4065
|
* In charge to manage the rendering of the layer. One layer type is
|
|
@@ -4105,13 +4109,13 @@ class Ii extends on {
|
|
|
4105
4109
|
t,
|
|
4106
4110
|
an.PRECOMPOSE,
|
|
4107
4111
|
function(e) {
|
|
4108
|
-
const
|
|
4109
|
-
|
|
4110
|
-
!
|
|
4111
|
-
return o.layer ===
|
|
4112
|
+
const s = /** @type {import("../render/Event.js").default} */ e.frameState.layerStatesArray, r = this.getLayerState(!1);
|
|
4113
|
+
S(
|
|
4114
|
+
!s.some(function(o) {
|
|
4115
|
+
return o.layer === r.layer;
|
|
4112
4116
|
}),
|
|
4113
4117
|
67
|
|
4114
|
-
),
|
|
4118
|
+
), s.push(r);
|
|
4115
4119
|
},
|
|
4116
4120
|
this
|
|
4117
4121
|
), this.mapRenderKey_ = it(this, Ct.CHANGE, t.render, t), this.changed());
|
|
@@ -4162,15 +4166,15 @@ function bn(n, t) {
|
|
|
4162
4166
|
const i = t.zoom;
|
|
4163
4167
|
return i > n.minZoom && i <= n.maxZoom;
|
|
4164
4168
|
}
|
|
4165
|
-
class
|
|
4169
|
+
class Ai extends H {
|
|
4166
4170
|
/**
|
|
4167
4171
|
* @param {Options} options Source options.
|
|
4168
4172
|
*/
|
|
4169
4173
|
constructor(t) {
|
|
4170
|
-
super(), this.projection =
|
|
4174
|
+
super(), this.projection = P(t.projection), this.attributions_ = jt(t.attributions), this.attributionsCollapsible_ = t.attributionsCollapsible !== void 0 ? t.attributionsCollapsible : !0, this.loading = !1, this.state_ = t.state !== void 0 ? t.state : "ready", this.wrapX_ = t.wrapX !== void 0 ? t.wrapX : !1, this.interpolate_ = !!t.interpolate, this.viewResolver = null, this.viewRejector = null;
|
|
4171
4175
|
const e = this;
|
|
4172
|
-
this.viewPromise_ = new Promise(function(i,
|
|
4173
|
-
e.viewResolver = i, e.viewRejector =
|
|
4176
|
+
this.viewPromise_ = new Promise(function(i, s) {
|
|
4177
|
+
e.viewResolver = i, e.viewRejector = s;
|
|
4174
4178
|
});
|
|
4175
4179
|
}
|
|
4176
4180
|
/**
|
|
@@ -4262,113 +4266,118 @@ function jt(n) {
|
|
|
4262
4266
|
} : null;
|
|
4263
4267
|
}
|
|
4264
4268
|
export {
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4269
|
+
Q as $,
|
|
4270
|
+
ai as A,
|
|
4271
|
+
vn as B,
|
|
4272
|
+
ti as C,
|
|
4273
|
+
un as D,
|
|
4274
|
+
sn as E,
|
|
4275
|
+
ri as F,
|
|
4276
|
+
Hn as G,
|
|
4277
|
+
bn as H,
|
|
4278
|
+
on as I,
|
|
4279
|
+
Dn as J,
|
|
4280
|
+
Rn as K,
|
|
4281
|
+
pi as L,
|
|
4282
|
+
vt as M,
|
|
4283
|
+
ui as N,
|
|
4284
|
+
kn as O,
|
|
4285
|
+
Rt as P,
|
|
4286
|
+
Ke as Q,
|
|
4283
4287
|
an as R,
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4288
|
+
Ai as S,
|
|
4289
|
+
gn as T,
|
|
4290
|
+
en as U,
|
|
4287
4291
|
Gt as V,
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
+
ii as W,
|
|
4293
|
+
T as X,
|
|
4294
|
+
Le as Y,
|
|
4295
|
+
tt as Z,
|
|
4292
4296
|
Un as _,
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4297
|
+
Qn as a,
|
|
4298
|
+
Ln as a0,
|
|
4299
|
+
qe as a1,
|
|
4300
|
+
kt as a2,
|
|
4301
|
+
Wt as a3,
|
|
4302
|
+
Dt as a4,
|
|
4303
|
+
_n as a5,
|
|
4304
|
+
q as a6,
|
|
4305
|
+
zn as a7,
|
|
4306
|
+
lt as a8,
|
|
4307
|
+
Xe as a9,
|
|
4308
|
+
mi as aA,
|
|
4309
|
+
Ri as aB,
|
|
4310
|
+
Ii as aC,
|
|
4311
|
+
_i as aD,
|
|
4312
|
+
yi as aE,
|
|
4313
|
+
Ei as aF,
|
|
4314
|
+
di as aG,
|
|
4315
|
+
Ci as aH,
|
|
4316
|
+
gi as aI,
|
|
4317
|
+
En as aJ,
|
|
4318
|
+
Sn as aK,
|
|
4319
|
+
yn as aL,
|
|
4320
|
+
Wn as aM,
|
|
4321
|
+
xe as aN,
|
|
4322
|
+
De as aO,
|
|
4323
|
+
pt as aP,
|
|
4324
|
+
C as aQ,
|
|
4325
|
+
x as aR,
|
|
4326
|
+
Jt as aS,
|
|
4327
|
+
ni as aT,
|
|
4328
|
+
li as aU,
|
|
4329
|
+
si as aV,
|
|
4330
|
+
Ve as aW,
|
|
4331
|
+
Jn as aX,
|
|
4332
|
+
Yn as aa,
|
|
4333
|
+
L as ab,
|
|
4334
|
+
je as ac,
|
|
4335
|
+
$t as ad,
|
|
4336
|
+
$n as ae,
|
|
4337
|
+
ve as af,
|
|
4338
|
+
oi as ag,
|
|
4339
|
+
_t as ah,
|
|
4340
|
+
Yt as ai,
|
|
4332
4341
|
Qt as aj,
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4342
|
+
ee as ak,
|
|
4343
|
+
wn as al,
|
|
4344
|
+
ae as am,
|
|
4345
|
+
re as an,
|
|
4346
|
+
yt as ao,
|
|
4347
|
+
ie as ap,
|
|
4348
|
+
te as aq,
|
|
4349
|
+
ne as ar,
|
|
4350
|
+
ue as as,
|
|
4351
|
+
fi as at,
|
|
4352
|
+
Mi as au,
|
|
4353
|
+
se as av,
|
|
4354
|
+
zt as aw,
|
|
4355
|
+
be as ax,
|
|
4356
|
+
hi as ay,
|
|
4357
|
+
ci as az,
|
|
4358
|
+
Gn as b,
|
|
4359
|
+
Ze as c,
|
|
4360
|
+
Bn as d,
|
|
4361
|
+
B as e,
|
|
4353
4362
|
w as f,
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4363
|
+
Tt as g,
|
|
4364
|
+
V as h,
|
|
4365
|
+
Qe as i,
|
|
4366
|
+
jn as j,
|
|
4367
|
+
We as k,
|
|
4368
|
+
qn as l,
|
|
4369
|
+
Zt as m,
|
|
4370
|
+
U as n,
|
|
4371
|
+
$ as o,
|
|
4372
|
+
Kn as p,
|
|
4373
|
+
Si as q,
|
|
4374
|
+
Kt as r,
|
|
4375
|
+
Bt as s,
|
|
4376
|
+
ei as t,
|
|
4377
|
+
J as u,
|
|
4378
|
+
Tn as v,
|
|
4379
|
+
P as w,
|
|
4380
|
+
X as x,
|
|
4381
|
+
A as y,
|
|
4373
4382
|
Vn as z
|
|
4374
4383
|
};
|