@maptiler/geocoding-control 0.0.60 → 0.0.61
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/leaflet.js +925 -234
- package/dist/leaflet.umd.js +21 -1
- package/dist/lib/types.d.ts +1 -1
- package/dist/maplibregl.js +925 -234
- package/dist/maplibregl.umd.js +21 -1
- package/package.json +2 -2
- package/src/lib/GeocodingControl.svelte +4 -1
- package/src/lib/types.ts +1 -1
package/dist/maplibregl.js
CHANGED
|
@@ -200,6 +200,7 @@ function Po() {
|
|
|
200
200
|
r: 0,
|
|
201
201
|
c: [],
|
|
202
202
|
p: Gr
|
|
203
|
+
// parent group
|
|
203
204
|
};
|
|
204
205
|
}
|
|
205
206
|
function Ro() {
|
|
@@ -241,16 +242,19 @@ function Ti(r, t, e, n, i, o, s, a = [-1]) {
|
|
|
241
242
|
const l = r.$$ = {
|
|
242
243
|
fragment: null,
|
|
243
244
|
ctx: [],
|
|
245
|
+
// state
|
|
244
246
|
props: o,
|
|
245
247
|
update: xt,
|
|
246
248
|
not_equal: i,
|
|
247
249
|
bound: ta(),
|
|
250
|
+
// lifecycle
|
|
248
251
|
on_mount: [],
|
|
249
252
|
on_destroy: [],
|
|
250
253
|
on_disconnect: [],
|
|
251
254
|
before_update: [],
|
|
252
255
|
after_update: [],
|
|
253
256
|
context: new Map(t.context || (u ? u.$$.context : [])),
|
|
257
|
+
// everything else
|
|
254
258
|
callbacks: ta(),
|
|
255
259
|
dirty: a,
|
|
256
260
|
skip_bound: !1,
|
|
@@ -358,13 +362,38 @@ function bl(r) {
|
|
|
358
362
|
let t, e, n;
|
|
359
363
|
return {
|
|
360
364
|
c() {
|
|
361
|
-
t = Er("svg"), e = Er("path"), B(e, "stroke-width", "4"), B(e, "fill-rule", "evenodd"), B(e, "clip-rule", "evenodd"), B(e, "d", "M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"), B(e, "class", "svelte-1k1cmht"), B(t, "width", n =
|
|
365
|
+
t = Er("svg"), e = Er("path"), B(e, "stroke-width", "4"), B(e, "fill-rule", "evenodd"), B(e, "clip-rule", "evenodd"), B(e, "d", "M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"), B(e, "class", "svelte-1k1cmht"), B(t, "width", n = /*displayIn*/
|
|
366
|
+
r[0] !== "list" ? void 0 : "20"), B(t, "viewBox", "0 0 70 85"), B(t, "fill", "none"), B(t, "class", "svelte-1k1cmht"), rn(
|
|
367
|
+
t,
|
|
368
|
+
"in-map",
|
|
369
|
+
/*displayIn*/
|
|
370
|
+
r[0] !== "list"
|
|
371
|
+
), rn(
|
|
372
|
+
t,
|
|
373
|
+
"list-icon",
|
|
374
|
+
/*displayIn*/
|
|
375
|
+
r[0] === "list"
|
|
376
|
+
);
|
|
362
377
|
},
|
|
363
378
|
m(i, o) {
|
|
364
379
|
Ke(i, t, o), lt(t, e);
|
|
365
380
|
},
|
|
366
381
|
p(i, [o]) {
|
|
367
|
-
o &
|
|
382
|
+
o & /*displayIn*/
|
|
383
|
+
1 && n !== (n = /*displayIn*/
|
|
384
|
+
i[0] !== "list" ? void 0 : "20") && B(t, "width", n), o & /*displayIn*/
|
|
385
|
+
1 && rn(
|
|
386
|
+
t,
|
|
387
|
+
"in-map",
|
|
388
|
+
/*displayIn*/
|
|
389
|
+
i[0] !== "list"
|
|
390
|
+
), o & /*displayIn*/
|
|
391
|
+
1 && rn(
|
|
392
|
+
t,
|
|
393
|
+
"list-icon",
|
|
394
|
+
/*displayIn*/
|
|
395
|
+
i[0] === "list"
|
|
396
|
+
);
|
|
368
397
|
},
|
|
369
398
|
i: xt,
|
|
370
399
|
o: xt,
|
|
@@ -434,13 +463,40 @@ function sa(r) {
|
|
|
434
463
|
let t, e, n, i, o;
|
|
435
464
|
return e = new Nl({}), {
|
|
436
465
|
c() {
|
|
437
|
-
t = Qt("button"), Ki(e.$$.fragment), B(t, "type", "button"), B(
|
|
466
|
+
t = Qt("button"), Ki(e.$$.fragment), B(t, "type", "button"), B(
|
|
467
|
+
t,
|
|
468
|
+
"title",
|
|
469
|
+
/*reverseButtonTitle*/
|
|
470
|
+
r[8]
|
|
471
|
+
), B(t, "class", "svelte-1h1zm6d"), rn(
|
|
472
|
+
t,
|
|
473
|
+
"active",
|
|
474
|
+
/*reverseActive*/
|
|
475
|
+
r[1]
|
|
476
|
+
);
|
|
438
477
|
},
|
|
439
478
|
m(s, a) {
|
|
440
|
-
Ke(s, t, a), li(e, t, null), n = !0, i || (o = ke(
|
|
479
|
+
Ke(s, t, a), li(e, t, null), n = !0, i || (o = ke(
|
|
480
|
+
t,
|
|
481
|
+
"click",
|
|
482
|
+
/*click_handler_2*/
|
|
483
|
+
r[55]
|
|
484
|
+
), i = !0);
|
|
441
485
|
},
|
|
442
486
|
p(s, a) {
|
|
443
|
-
(!n || a[0] &
|
|
487
|
+
(!n || a[0] & /*reverseButtonTitle*/
|
|
488
|
+
256) && B(
|
|
489
|
+
t,
|
|
490
|
+
"title",
|
|
491
|
+
/*reverseButtonTitle*/
|
|
492
|
+
s[8]
|
|
493
|
+
), (!n || a[0] & /*reverseActive*/
|
|
494
|
+
2) && rn(
|
|
495
|
+
t,
|
|
496
|
+
"active",
|
|
497
|
+
/*reverseActive*/
|
|
498
|
+
s[1]
|
|
499
|
+
);
|
|
444
500
|
},
|
|
445
501
|
i(s) {
|
|
446
502
|
n || (Kt(e.$$.fragment, s), n = !0);
|
|
@@ -454,7 +510,10 @@ function sa(r) {
|
|
|
454
510
|
};
|
|
455
511
|
}
|
|
456
512
|
function Dl(r) {
|
|
457
|
-
let t, e, n, i, o =
|
|
513
|
+
let t, e, n, i, o = (
|
|
514
|
+
/*listFeatures*/
|
|
515
|
+
r[12]
|
|
516
|
+
), s = [];
|
|
458
517
|
for (let u = 0; u < o.length; u += 1)
|
|
459
518
|
s[u] = ua(ia(r, o, u));
|
|
460
519
|
const a = (u) => be(s[u], 1, 1, () => {
|
|
@@ -472,13 +531,25 @@ function Dl(r) {
|
|
|
472
531
|
for (let c = 0; c < s.length; c += 1)
|
|
473
532
|
s[c].m(t, null);
|
|
474
533
|
e = !0, n || (i = [
|
|
475
|
-
ke(
|
|
476
|
-
|
|
534
|
+
ke(
|
|
535
|
+
t,
|
|
536
|
+
"mouseout",
|
|
537
|
+
/*mouseout_handler*/
|
|
538
|
+
r[58]
|
|
539
|
+
),
|
|
540
|
+
ke(
|
|
541
|
+
t,
|
|
542
|
+
"blur",
|
|
543
|
+
/*blur_handler_1*/
|
|
544
|
+
r[59]
|
|
545
|
+
)
|
|
477
546
|
], n = !0);
|
|
478
547
|
},
|
|
479
548
|
p(u, l) {
|
|
480
|
-
if (l[0] &
|
|
481
|
-
|
|
549
|
+
if (l[0] & /*selectedItemIndex, pick, listFeatures, showPlaceType*/
|
|
550
|
+
2110464) {
|
|
551
|
+
o = /*listFeatures*/
|
|
552
|
+
u[12];
|
|
482
553
|
let c;
|
|
483
554
|
for (c = 0; c < o.length; c += 1) {
|
|
484
555
|
const f = ia(u, o, c);
|
|
@@ -511,13 +582,21 @@ function Tl(r) {
|
|
|
511
582
|
let t, e;
|
|
512
583
|
return {
|
|
513
584
|
c() {
|
|
514
|
-
t = Qt("div"), e = zr(
|
|
585
|
+
t = Qt("div"), e = zr(
|
|
586
|
+
/*noResultsMessage*/
|
|
587
|
+
r[5]
|
|
588
|
+
), B(t, "class", "no-results svelte-1h1zm6d");
|
|
515
589
|
},
|
|
516
590
|
m(n, i) {
|
|
517
591
|
Ke(n, t, i), lt(t, e);
|
|
518
592
|
},
|
|
519
593
|
p(n, i) {
|
|
520
|
-
i[0] &
|
|
594
|
+
i[0] & /*noResultsMessage*/
|
|
595
|
+
32 && Wi(
|
|
596
|
+
e,
|
|
597
|
+
/*noResultsMessage*/
|
|
598
|
+
n[5]
|
|
599
|
+
);
|
|
521
600
|
},
|
|
522
601
|
i: xt,
|
|
523
602
|
o: xt,
|
|
@@ -547,13 +626,21 @@ function Al(r) {
|
|
|
547
626
|
let t, e;
|
|
548
627
|
return {
|
|
549
628
|
c() {
|
|
550
|
-
t = Qt("div"), e = zr(
|
|
629
|
+
t = Qt("div"), e = zr(
|
|
630
|
+
/*errorMessage*/
|
|
631
|
+
r[4]
|
|
632
|
+
), B(t, "class", "error svelte-1h1zm6d");
|
|
551
633
|
},
|
|
552
634
|
m(n, i) {
|
|
553
635
|
Ke(n, t, i), lt(t, e);
|
|
554
636
|
},
|
|
555
637
|
p(n, i) {
|
|
556
|
-
i[0] &
|
|
638
|
+
i[0] & /*errorMessage*/
|
|
639
|
+
16 && Wi(
|
|
640
|
+
e,
|
|
641
|
+
/*errorMessage*/
|
|
642
|
+
n[4]
|
|
643
|
+
);
|
|
557
644
|
},
|
|
558
645
|
i: xt,
|
|
559
646
|
o: xt,
|
|
@@ -563,35 +650,73 @@ function Al(r) {
|
|
|
563
650
|
};
|
|
564
651
|
}
|
|
565
652
|
function aa(r) {
|
|
566
|
-
|
|
653
|
+
var i, o;
|
|
654
|
+
let t, e = (
|
|
655
|
+
/*feature*/
|
|
656
|
+
(((o = (i = r[68].properties) == null ? void 0 : i.place_type_name) == null ? void 0 : o[0]) ?? /*feature*/
|
|
657
|
+
r[68].place_type[0]) + ""
|
|
658
|
+
), n;
|
|
567
659
|
return {
|
|
568
660
|
c() {
|
|
569
661
|
t = Qt("span"), n = zr(e), B(t, "class", "svelte-1h1zm6d");
|
|
570
662
|
},
|
|
571
|
-
m(
|
|
572
|
-
Ke(
|
|
663
|
+
m(s, a) {
|
|
664
|
+
Ke(s, t, a), lt(t, n);
|
|
573
665
|
},
|
|
574
|
-
p(
|
|
575
|
-
|
|
666
|
+
p(s, a) {
|
|
667
|
+
var u, l;
|
|
668
|
+
a[0] & /*listFeatures*/
|
|
669
|
+
4096 && e !== (e = /*feature*/
|
|
670
|
+
(((l = (u = s[68].properties) == null ? void 0 : u.place_type_name) == null ? void 0 : l[0]) ?? /*feature*/
|
|
671
|
+
s[68].place_type[0]) + "") && Wi(n, e);
|
|
576
672
|
},
|
|
577
|
-
d(
|
|
578
|
-
|
|
673
|
+
d(s) {
|
|
674
|
+
s && Ae(t);
|
|
579
675
|
}
|
|
580
676
|
};
|
|
581
677
|
}
|
|
582
678
|
function ua(r) {
|
|
583
|
-
let t, e, n, i, o, s, a =
|
|
679
|
+
let t, e, n, i, o, s, a = (
|
|
680
|
+
/*feature*/
|
|
681
|
+
r[68].place_name.replace(/,.*/, "") + ""
|
|
682
|
+
), u, l, c, f, h, g = (
|
|
683
|
+
/*feature*/
|
|
684
|
+
r[68].place_name.replace(/[^,]*,?\s*/, "") + ""
|
|
685
|
+
), p, v, y, m, E, N;
|
|
584
686
|
e = new Ka({ props: { displayIn: "list" } });
|
|
585
|
-
let C =
|
|
687
|
+
let C = (
|
|
688
|
+
/*showPlaceType*/
|
|
689
|
+
r[10] && aa(r)
|
|
690
|
+
);
|
|
586
691
|
function L() {
|
|
587
|
-
return
|
|
692
|
+
return (
|
|
693
|
+
/*mouseover_handler*/
|
|
694
|
+
r[56](
|
|
695
|
+
/*i*/
|
|
696
|
+
r[70]
|
|
697
|
+
)
|
|
698
|
+
);
|
|
588
699
|
}
|
|
589
700
|
function w() {
|
|
590
|
-
return
|
|
701
|
+
return (
|
|
702
|
+
/*focus_handler_1*/
|
|
703
|
+
r[57](
|
|
704
|
+
/*feature*/
|
|
705
|
+
r[68]
|
|
706
|
+
)
|
|
707
|
+
);
|
|
591
708
|
}
|
|
592
709
|
return {
|
|
593
710
|
c() {
|
|
594
|
-
t = Qt("li"), Ki(e.$$.fragment), n = qn(), i = Qt("span"), o = Qt("span"), s = Qt("span"), u = zr(a), l = qn(), C && C.c(), c = qn(), f = Qt("span"), h = Qt("span"), p = zr(g), v = qn(), B(s, "class", "svelte-1h1zm6d"), B(o, "class", "svelte-1h1zm6d"), B(i, "class", "svelte-1h1zm6d"), B(h, "class", "svelte-1h1zm6d"), B(f, "class", "svelte-1h1zm6d"), B(t, "tabindex", "0"), B(t, "data-selected", y =
|
|
711
|
+
t = Qt("li"), Ki(e.$$.fragment), n = qn(), i = Qt("span"), o = Qt("span"), s = Qt("span"), u = zr(a), l = qn(), C && C.c(), c = qn(), f = Qt("span"), h = Qt("span"), p = zr(g), v = qn(), B(s, "class", "svelte-1h1zm6d"), B(o, "class", "svelte-1h1zm6d"), B(i, "class", "svelte-1h1zm6d"), B(h, "class", "svelte-1h1zm6d"), B(f, "class", "svelte-1h1zm6d"), B(t, "tabindex", "0"), B(t, "data-selected", y = /*selectedItemIndex*/
|
|
712
|
+
r[13] === /*i*/
|
|
713
|
+
r[70]), B(t, "class", "svelte-1h1zm6d"), rn(
|
|
714
|
+
t,
|
|
715
|
+
"selected",
|
|
716
|
+
/*selectedItemIndex*/
|
|
717
|
+
r[13] === /*i*/
|
|
718
|
+
r[70]
|
|
719
|
+
);
|
|
595
720
|
},
|
|
596
721
|
m(D, T) {
|
|
597
722
|
Ke(D, t, T), li(e, t, null), lt(t, n), lt(t, i), lt(i, o), lt(o, s), lt(s, u), lt(o, l), C && C.m(o, null), lt(t, c), lt(t, f), lt(f, h), lt(h, p), lt(t, v), m = !0, E || (N = [
|
|
@@ -600,7 +725,22 @@ function ua(r) {
|
|
|
600
725
|
], E = !0);
|
|
601
726
|
},
|
|
602
727
|
p(D, T) {
|
|
603
|
-
r = D, (!m || T[0] &
|
|
728
|
+
r = D, (!m || T[0] & /*listFeatures*/
|
|
729
|
+
4096) && a !== (a = /*feature*/
|
|
730
|
+
r[68].place_name.replace(/,.*/, "") + "") && Wi(u, a), /*showPlaceType*/
|
|
731
|
+
r[10] ? C ? C.p(r, T) : (C = aa(r), C.c(), C.m(o, null)) : C && (C.d(1), C = null), (!m || T[0] & /*listFeatures*/
|
|
732
|
+
4096) && g !== (g = /*feature*/
|
|
733
|
+
r[68].place_name.replace(/[^,]*,?\s*/, "") + "") && Wi(p, g), (!m || T[0] & /*selectedItemIndex*/
|
|
734
|
+
8192 && y !== (y = /*selectedItemIndex*/
|
|
735
|
+
r[13] === /*i*/
|
|
736
|
+
r[70])) && B(t, "data-selected", y), (!m || T[0] & /*selectedItemIndex*/
|
|
737
|
+
8192) && rn(
|
|
738
|
+
t,
|
|
739
|
+
"selected",
|
|
740
|
+
/*selectedItemIndex*/
|
|
741
|
+
r[13] === /*i*/
|
|
742
|
+
r[70]
|
|
743
|
+
);
|
|
604
744
|
},
|
|
605
745
|
i(D) {
|
|
606
746
|
m || (Kt(e.$$.fragment, D), m = !0);
|
|
@@ -616,45 +756,200 @@ function ua(r) {
|
|
|
616
756
|
function Fl(r) {
|
|
617
757
|
let t, e, n, i, o, s, a, u, l, c, f, h, g, p, v, y, m, E, N, C;
|
|
618
758
|
i = new Ol({}), c = new Sl({});
|
|
619
|
-
let L =
|
|
620
|
-
|
|
759
|
+
let L = (
|
|
760
|
+
/*abortController*/
|
|
761
|
+
r[17] && oa()
|
|
762
|
+
), w = (
|
|
763
|
+
/*enableReverse*/
|
|
764
|
+
r[7] === !0 && sa(r)
|
|
765
|
+
);
|
|
766
|
+
const D = (
|
|
767
|
+
/*#slots*/
|
|
768
|
+
r[47].default
|
|
769
|
+
), T = ul(
|
|
770
|
+
D,
|
|
771
|
+
r,
|
|
772
|
+
/*$$scope*/
|
|
773
|
+
r[46],
|
|
774
|
+
null
|
|
775
|
+
), F = [Al, Ml, Tl, Dl], j = [];
|
|
621
776
|
function k(O, Y) {
|
|
622
777
|
var P, X;
|
|
623
|
-
return
|
|
778
|
+
return (
|
|
779
|
+
/*error*/
|
|
780
|
+
O[16] ? 0 : (
|
|
781
|
+
/*focusedDelayed*/
|
|
782
|
+
O[14] ? (
|
|
783
|
+
/*listFeatures*/
|
|
784
|
+
((P = O[12]) == null ? void 0 : P.length) === 0 ? 2 : (
|
|
785
|
+
/*focusedDelayed*/
|
|
786
|
+
O[14] && /*listFeatures*/
|
|
787
|
+
((X = O[12]) != null && X.length) ? 3 : -1
|
|
788
|
+
)
|
|
789
|
+
) : 1
|
|
790
|
+
)
|
|
791
|
+
);
|
|
624
792
|
}
|
|
625
793
|
return ~(v = k(r)) && (y = j[v] = F[v](r)), {
|
|
626
794
|
c() {
|
|
627
|
-
t = Qt("form"), e = Qt("div"), n = Qt("button"), Ki(i.$$.fragment), o = qn(), s = Qt("input"), a = qn(), u = Qt("div"), l = Qt("button"), Ki(c.$$.fragment), f = qn(), L && L.c(), h = qn(), w && w.c(), g = qn(), T && T.c(), p = qn(), y && y.c(), B(n, "type", "button"), B(n, "class", "svelte-1h1zm6d"), B(
|
|
795
|
+
t = Qt("form"), e = Qt("div"), n = Qt("button"), Ki(i.$$.fragment), o = qn(), s = Qt("input"), a = qn(), u = Qt("div"), l = Qt("button"), Ki(c.$$.fragment), f = qn(), L && L.c(), h = qn(), w && w.c(), g = qn(), T && T.c(), p = qn(), y && y.c(), B(n, "type", "button"), B(n, "class", "svelte-1h1zm6d"), B(
|
|
796
|
+
s,
|
|
797
|
+
"placeholder",
|
|
798
|
+
/*placeholder*/
|
|
799
|
+
r[3]
|
|
800
|
+
), B(
|
|
801
|
+
s,
|
|
802
|
+
"aria-label",
|
|
803
|
+
/*placeholder*/
|
|
804
|
+
r[3]
|
|
805
|
+
), B(s, "class", "svelte-1h1zm6d"), B(l, "type", "button"), B(
|
|
806
|
+
l,
|
|
807
|
+
"title",
|
|
808
|
+
/*clearButtonTitle*/
|
|
809
|
+
r[9]
|
|
810
|
+
), B(l, "class", "svelte-1h1zm6d"), rn(
|
|
811
|
+
l,
|
|
812
|
+
"displayable",
|
|
813
|
+
/*searchValue*/
|
|
814
|
+
r[0] !== ""
|
|
815
|
+
), B(u, "class", "clear-button-container svelte-1h1zm6d"), B(e, "class", "input-group svelte-1h1zm6d"), B(t, "tabindex", "0"), B(t, "class", m = ea(
|
|
816
|
+
/*className*/
|
|
817
|
+
r[2]
|
|
818
|
+
) + " svelte-1h1zm6d"), rn(
|
|
819
|
+
t,
|
|
820
|
+
"can-collapse",
|
|
821
|
+
/*collapsed*/
|
|
822
|
+
r[6] && /*searchValue*/
|
|
823
|
+
r[0] === ""
|
|
824
|
+
);
|
|
628
825
|
},
|
|
629
826
|
m(O, Y) {
|
|
630
|
-
Ke(O, t, Y), lt(t, e), lt(e, n), li(i, n, null), lt(e, o), lt(e, s), r[49](s), na(
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
ke(
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
827
|
+
Ke(O, t, Y), lt(t, e), lt(e, n), li(i, n, null), lt(e, o), lt(e, s), r[49](s), na(
|
|
828
|
+
s,
|
|
829
|
+
/*searchValue*/
|
|
830
|
+
r[0]
|
|
831
|
+
), lt(e, a), lt(e, u), lt(u, l), li(c, l, null), lt(u, f), L && L.m(u, null), lt(e, h), w && w.m(e, null), lt(e, g), T && T.m(e, null), lt(t, p), ~v && j[v].m(t, null), E = !0, N || (C = [
|
|
832
|
+
ke(
|
|
833
|
+
n,
|
|
834
|
+
"click",
|
|
835
|
+
/*click_handler*/
|
|
836
|
+
r[48]
|
|
837
|
+
),
|
|
838
|
+
ke(
|
|
839
|
+
s,
|
|
840
|
+
"input",
|
|
841
|
+
/*input_1_input_handler*/
|
|
842
|
+
r[50]
|
|
843
|
+
),
|
|
844
|
+
ke(
|
|
845
|
+
s,
|
|
846
|
+
"focus",
|
|
847
|
+
/*focus_handler*/
|
|
848
|
+
r[51]
|
|
849
|
+
),
|
|
850
|
+
ke(
|
|
851
|
+
s,
|
|
852
|
+
"blur",
|
|
853
|
+
/*blur_handler*/
|
|
854
|
+
r[52]
|
|
855
|
+
),
|
|
856
|
+
ke(
|
|
857
|
+
s,
|
|
858
|
+
"keydown",
|
|
859
|
+
/*handleKeyDown*/
|
|
860
|
+
r[19]
|
|
861
|
+
),
|
|
862
|
+
ke(
|
|
863
|
+
s,
|
|
864
|
+
"input",
|
|
865
|
+
/*input_handler*/
|
|
866
|
+
r[53]
|
|
867
|
+
),
|
|
868
|
+
ke(
|
|
869
|
+
l,
|
|
870
|
+
"click",
|
|
871
|
+
/*click_handler_1*/
|
|
872
|
+
r[54]
|
|
873
|
+
),
|
|
874
|
+
ke(t, "submit", gl(
|
|
875
|
+
/*handleOnSubmit*/
|
|
876
|
+
r[18]
|
|
877
|
+
))
|
|
639
878
|
], N = !0);
|
|
640
879
|
},
|
|
641
880
|
p(O, Y) {
|
|
642
|
-
(!E || Y[0] &
|
|
881
|
+
(!E || Y[0] & /*placeholder*/
|
|
882
|
+
8) && B(
|
|
883
|
+
s,
|
|
884
|
+
"placeholder",
|
|
885
|
+
/*placeholder*/
|
|
886
|
+
O[3]
|
|
887
|
+
), (!E || Y[0] & /*placeholder*/
|
|
888
|
+
8) && B(
|
|
889
|
+
s,
|
|
890
|
+
"aria-label",
|
|
891
|
+
/*placeholder*/
|
|
892
|
+
O[3]
|
|
893
|
+
), Y[0] & /*searchValue*/
|
|
894
|
+
1 && s.value !== /*searchValue*/
|
|
895
|
+
O[0] && na(
|
|
896
|
+
s,
|
|
897
|
+
/*searchValue*/
|
|
898
|
+
O[0]
|
|
899
|
+
), (!E || Y[0] & /*clearButtonTitle*/
|
|
900
|
+
512) && B(
|
|
901
|
+
l,
|
|
902
|
+
"title",
|
|
903
|
+
/*clearButtonTitle*/
|
|
904
|
+
O[9]
|
|
905
|
+
), (!E || Y[0] & /*searchValue*/
|
|
906
|
+
1) && rn(
|
|
907
|
+
l,
|
|
908
|
+
"displayable",
|
|
909
|
+
/*searchValue*/
|
|
910
|
+
O[0] !== ""
|
|
911
|
+
), /*abortController*/
|
|
912
|
+
O[17] ? L ? Y[0] & /*abortController*/
|
|
913
|
+
131072 && Kt(L, 1) : (L = oa(), L.c(), Kt(L, 1), L.m(u, null)) : L && (Po(), be(L, 1, 1, () => {
|
|
643
914
|
L = null;
|
|
644
|
-
}), Ro()),
|
|
915
|
+
}), Ro()), /*enableReverse*/
|
|
916
|
+
O[7] === !0 ? w ? (w.p(O, Y), Y[0] & /*enableReverse*/
|
|
917
|
+
128 && Kt(w, 1)) : (w = sa(O), w.c(), Kt(w, 1), w.m(e, g)) : w && (Po(), be(w, 1, 1, () => {
|
|
645
918
|
w = null;
|
|
646
|
-
}), Ro()), T && T.p && (!E || Y[1] &
|
|
919
|
+
}), Ro()), T && T.p && (!E || Y[1] & /*$$scope*/
|
|
920
|
+
32768) && cl(
|
|
647
921
|
T,
|
|
648
922
|
D,
|
|
649
923
|
O,
|
|
924
|
+
/*$$scope*/
|
|
650
925
|
O[46],
|
|
651
|
-
E ? ll(
|
|
926
|
+
E ? ll(
|
|
927
|
+
D,
|
|
928
|
+
/*$$scope*/
|
|
929
|
+
O[46],
|
|
930
|
+
Y,
|
|
931
|
+
null
|
|
932
|
+
) : fl(
|
|
933
|
+
/*$$scope*/
|
|
934
|
+
O[46]
|
|
935
|
+
),
|
|
652
936
|
null
|
|
653
937
|
);
|
|
654
938
|
let P = v;
|
|
655
939
|
v = k(O), v === P ? ~v && j[v].p(O, Y) : (y && (Po(), be(j[P], 1, 1, () => {
|
|
656
940
|
j[P] = null;
|
|
657
|
-
}), Ro()), ~v ? (y = j[v], y ? y.p(O, Y) : (y = j[v] = F[v](O), y.c()), Kt(y, 1), y.m(t, null)) : y = null), (!E || Y[0] &
|
|
941
|
+
}), Ro()), ~v ? (y = j[v], y ? y.p(O, Y) : (y = j[v] = F[v](O), y.c()), Kt(y, 1), y.m(t, null)) : y = null), (!E || Y[0] & /*className*/
|
|
942
|
+
4 && m !== (m = ea(
|
|
943
|
+
/*className*/
|
|
944
|
+
O[2]
|
|
945
|
+
) + " svelte-1h1zm6d")) && B(t, "class", m), (!E || Y[0] & /*className, collapsed, searchValue*/
|
|
946
|
+
69) && rn(
|
|
947
|
+
t,
|
|
948
|
+
"can-collapse",
|
|
949
|
+
/*collapsed*/
|
|
950
|
+
O[6] && /*searchValue*/
|
|
951
|
+
O[0] === ""
|
|
952
|
+
);
|
|
658
953
|
},
|
|
659
954
|
i(O) {
|
|
660
955
|
E || (Kt(i.$$.fragment, O), Kt(c.$$.fragment, O), Kt(L), Kt(w), Kt(T, O), Kt(y), E = !0);
|
|
@@ -779,9 +1074,22 @@ function Gl(r, t, e) {
|
|
|
779
1074
|
return r.$$set = (x) => {
|
|
780
1075
|
"class" in x && e(2, s = x.class), "mapController" in x && e(23, a = x.mapController), "apiKey" in x && e(24, u = x.apiKey), "debounceSearch" in x && e(25, l = x.debounceSearch), "placeholder" in x && e(3, c = x.placeholder), "errorMessage" in x && e(4, f = x.errorMessage), "noResultsMessage" in x && e(5, h = x.noResultsMessage), "proximity" in x && e(22, g = x.proximity), "bbox" in x && e(26, p = x.bbox), "trackProximity" in x && e(27, v = x.trackProximity), "minLength" in x && e(28, y = x.minLength), "language" in x && e(29, m = x.language), "showResultsWhileTyping" in x && e(30, E = x.showResultsWhileTyping), "zoom" in x && e(31, N = x.zoom), "flyTo" in x && e(32, C = x.flyTo), "collapsed" in x && e(6, L = x.collapsed), "clearOnBlur" in x && e(33, w = x.clearOnBlur), "enableReverse" in x && e(7, D = x.enableReverse), "reverseButtonTitle" in x && e(8, T = x.reverseButtonTitle), "clearButtonTitle" in x && e(9, F = x.clearButtonTitle), "filter" in x && e(34, j = x.filter), "searchValue" in x && e(0, k = x.searchValue), "reverseActive" in x && e(1, O = x.reverseActive), "showPlaceType" in x && e(10, Y = x.showPlaceType), "showFullGeometry" in x && e(35, P = x.showFullGeometry), "limit" in x && e(36, X = x.limit), "fuzzyMatch" in x && e(37, ut = x.fuzzyMatch), "country" in x && e(38, yt = x.country), "types" in x && e(39, Xt = x.types), "$$scope" in x && e(46, o = x.$$scope);
|
|
781
1076
|
}, r.$$.update = () => {
|
|
782
|
-
if (r.$$.dirty[0] &
|
|
1077
|
+
if (r.$$.dirty[0] & /*trackProximity*/
|
|
1078
|
+
134217728 && (v || e(22, g = void 0)), r.$$.dirty[0] & /*focused*/
|
|
1079
|
+
2048 | r.$$.dirty[1] & /*clearOnBlur*/
|
|
1080
|
+
4 && setTimeout(() => {
|
|
783
1081
|
e(14, Eo = Le), w && !Le && e(0, k = "");
|
|
784
|
-
}), r.$$.dirty[0] &
|
|
1082
|
+
}), r.$$.dirty[0] & /*searchValue, listFeatures*/
|
|
1083
|
+
4097 && (k || (e(44, it = void 0), e(12, J = void 0), e(16, hr = void 0), e(43, Mt = J))), r.$$.dirty[1] & /*showFullGeometry, picked*/
|
|
1084
|
+
8208 && P && it && !it.address && it.geometry.type === "Point" && os(it.id, { byId: !0 }).catch((x) => e(16, hr = x)), r.$$.dirty[0] & /*mapController*/
|
|
1085
|
+
8388608 | r.$$.dirty[1] & /*picked, flyTo, zoom*/
|
|
1086
|
+
8195 && a && it && C && (!it.bbox || it.bbox[0] === it.bbox[2] && it.bbox[1] === it.bbox[3] ? a.flyTo(it.center, N) : a.fitBounds(it.bbox, 50), e(12, J = void 0), e(43, Mt = void 0), e(13, At = -1)), r.$$.dirty[0] & /*listFeatures*/
|
|
1087
|
+
4096 | r.$$.dirty[1] & /*markedFeatures*/
|
|
1088
|
+
4096 && Mt !== J && e(43, Mt = void 0), r.$$.dirty[0] & /*mapController*/
|
|
1089
|
+
8388608 | r.$$.dirty[1] & /*markedFeatures, picked*/
|
|
1090
|
+
12288 && a && a.setMarkers(Mt, it), r.$$.dirty[0] & /*searchValue*/
|
|
1091
|
+
1 && e(13, At = -1), r.$$.dirty[0] & /*mapController, reverseActive, trackProximity, listFeatures, focusedDelayed*/
|
|
1092
|
+
142626818 && a && a.setEventHandler((x) => {
|
|
785
1093
|
switch (x.type) {
|
|
786
1094
|
case "mapClick":
|
|
787
1095
|
O && Hu(x.coordinates);
|
|
@@ -802,11 +1110,22 @@ function Gl(r, t, e) {
|
|
|
802
1110
|
e(13, At = -1);
|
|
803
1111
|
break;
|
|
804
1112
|
}
|
|
805
|
-
}), r.$$.dirty[0] &
|
|
1113
|
+
}), r.$$.dirty[0] & /*mapController, selectedItemIndex*/
|
|
1114
|
+
8396800 && (a == null || a.setSelectedMarker(At)), r.$$.dirty[0] & /*listFeatures, selectedItemIndex*/
|
|
1115
|
+
12288 && e(45, n = J == null ? void 0 : J[At]), r.$$.dirty[0] & /*searchValue, mapController*/
|
|
1116
|
+
8388609) {
|
|
806
1117
|
const x = /^(-?\d+(?:\.\d*)?),(-?\d+(?:\.\d*)?)$/.exec(k);
|
|
807
1118
|
a == null || a.setReverseMarker(x ? [Number(x[1]), Number(x[2])] : void 0);
|
|
808
1119
|
}
|
|
809
|
-
r.$$.dirty[1] &
|
|
1120
|
+
r.$$.dirty[1] & /*selected*/
|
|
1121
|
+
16384 && gr("select", n), r.$$.dirty[1] & /*picked*/
|
|
1122
|
+
8192 && gr("pick", it), r.$$.dirty[0] & /*focusedDelayed, listFeatures*/
|
|
1123
|
+
20480 && gr("optionsVisibilityChange", Eo && !!J), r.$$.dirty[0] & /*listFeatures*/
|
|
1124
|
+
4096 && gr("featuresListed", J), r.$$.dirty[1] & /*markedFeatures*/
|
|
1125
|
+
4096 && gr("featuresMarked", Mt), r.$$.dirty[0] & /*reverseActive*/
|
|
1126
|
+
2 && gr("reverseToggle", O), r.$$.dirty[0] & /*searchValue*/
|
|
1127
|
+
1 && gr("queryChange", k), r.$$.dirty[0] & /*mapController, reverseActive*/
|
|
1128
|
+
8388610 && a && a.indicateReverse(O);
|
|
810
1129
|
}, [
|
|
811
1130
|
k,
|
|
812
1131
|
O,
|
|
@@ -926,6 +1245,28 @@ let kl = class extends Mi {
|
|
|
926
1245
|
return this.$$.ctx[42];
|
|
927
1246
|
}
|
|
928
1247
|
};
|
|
1248
|
+
/**
|
|
1249
|
+
* splaytree v3.1.1
|
|
1250
|
+
* Fast Splay tree for Node and browser
|
|
1251
|
+
*
|
|
1252
|
+
* @author Alexander Milevski <info@w8r.name>
|
|
1253
|
+
* @license MIT
|
|
1254
|
+
* @preserve
|
|
1255
|
+
*/
|
|
1256
|
+
/*! *****************************************************************************
|
|
1257
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1258
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
1259
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
1260
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
1261
|
+
|
|
1262
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
1263
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
1264
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
1265
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
1266
|
+
|
|
1267
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
1268
|
+
and limitations under the License.
|
|
1269
|
+
***************************************************************************** */
|
|
929
1270
|
function zl(r, t) {
|
|
930
1271
|
var e = { label: 0, sent: function() {
|
|
931
1272
|
if (o[0] & 1)
|
|
@@ -991,12 +1332,15 @@ function zl(r, t) {
|
|
|
991
1332
|
return { value: l[0] ? l[1] : void 0, done: !0 };
|
|
992
1333
|
}
|
|
993
1334
|
}
|
|
994
|
-
var Ir =
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
}
|
|
1335
|
+
var Ir = (
|
|
1336
|
+
/** @class */
|
|
1337
|
+
function() {
|
|
1338
|
+
function r(t, e) {
|
|
1339
|
+
this.next = null, this.key = t, this.data = e, this.left = null, this.right = null;
|
|
1340
|
+
}
|
|
1341
|
+
return r;
|
|
1342
|
+
}()
|
|
1343
|
+
);
|
|
1000
1344
|
function Vl(r, t) {
|
|
1001
1345
|
return r > t ? 1 : r < t ? -1 : 0;
|
|
1002
1346
|
}
|
|
@@ -1054,190 +1398,196 @@ function _s(r, t, e, n, i) {
|
|
|
1054
1398
|
r.left && _s(r.left, o, !1, n, i), r.right && _s(r.right, o, !0, n, i);
|
|
1055
1399
|
}
|
|
1056
1400
|
}
|
|
1057
|
-
var Ts =
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1401
|
+
var Ts = (
|
|
1402
|
+
/** @class */
|
|
1403
|
+
function() {
|
|
1404
|
+
function r(t) {
|
|
1405
|
+
t === void 0 && (t = Vl), this._root = null, this._size = 0, this._comparator = t;
|
|
1406
|
+
}
|
|
1407
|
+
return r.prototype.insert = function(t, e) {
|
|
1408
|
+
return this._size++, this._root = hs(t, e, this._root, this._comparator);
|
|
1409
|
+
}, r.prototype.add = function(t, e) {
|
|
1410
|
+
var n = new Ir(t, e);
|
|
1411
|
+
this._root === null && (n.left = n.right = null, this._size++, this._root = n);
|
|
1412
|
+
var i = this._comparator, o = vr(t, this._root, i), s = i(t, o.key);
|
|
1413
|
+
return s === 0 ? this._root = o : (s < 0 ? (n.left = o.left, n.right = o, o.left = null) : s > 0 && (n.right = o.right, n.left = o, o.right = null), this._size++, this._root = n), this._root;
|
|
1414
|
+
}, r.prototype.remove = function(t) {
|
|
1415
|
+
this._root = this._remove(t, this._root, this._comparator);
|
|
1416
|
+
}, r.prototype._remove = function(t, e, n) {
|
|
1417
|
+
var i;
|
|
1418
|
+
if (e === null)
|
|
1419
|
+
return null;
|
|
1420
|
+
e = vr(t, e, n);
|
|
1421
|
+
var o = n(t, e.key);
|
|
1422
|
+
return o === 0 ? (e.left === null ? i = e.right : (i = vr(t, e.left, n), i.right = e.right), this._size--, i) : e;
|
|
1423
|
+
}, r.prototype.pop = function() {
|
|
1424
|
+
var t = this._root;
|
|
1425
|
+
if (t) {
|
|
1426
|
+
for (; t.left; )
|
|
1427
|
+
t = t.left;
|
|
1428
|
+
return this._root = vr(t.key, this._root, this._comparator), this._root = this._remove(t.key, this._root, this._comparator), { key: t.key, data: t.data };
|
|
1429
|
+
}
|
|
1073
1430
|
return null;
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
var
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1431
|
+
}, r.prototype.findStatic = function(t) {
|
|
1432
|
+
for (var e = this._root, n = this._comparator; e; ) {
|
|
1433
|
+
var i = n(t, e.key);
|
|
1434
|
+
if (i === 0)
|
|
1435
|
+
return e;
|
|
1436
|
+
i < 0 ? e = e.left : e = e.right;
|
|
1437
|
+
}
|
|
1438
|
+
return null;
|
|
1439
|
+
}, r.prototype.find = function(t) {
|
|
1440
|
+
return this._root && (this._root = vr(t, this._root, this._comparator), this._comparator(t, this._root.key) !== 0) ? null : this._root;
|
|
1441
|
+
}, r.prototype.contains = function(t) {
|
|
1442
|
+
for (var e = this._root, n = this._comparator; e; ) {
|
|
1443
|
+
var i = n(t, e.key);
|
|
1444
|
+
if (i === 0)
|
|
1445
|
+
return !0;
|
|
1446
|
+
i < 0 ? e = e.left : e = e.right;
|
|
1447
|
+
}
|
|
1448
|
+
return !1;
|
|
1449
|
+
}, r.prototype.forEach = function(t, e) {
|
|
1450
|
+
for (var n = this._root, i = [], o = !1; !o; )
|
|
1451
|
+
n !== null ? (i.push(n), n = n.left) : i.length !== 0 ? (n = i.pop(), t.call(e, n), n = n.right) : o = !0;
|
|
1452
|
+
return this;
|
|
1453
|
+
}, r.prototype.range = function(t, e, n, i) {
|
|
1454
|
+
for (var o = [], s = this._comparator, a = this._root, u; o.length !== 0 || a; )
|
|
1455
|
+
if (a)
|
|
1456
|
+
o.push(a), a = a.left;
|
|
1457
|
+
else {
|
|
1458
|
+
if (a = o.pop(), u = s(a.key, e), u > 0)
|
|
1459
|
+
break;
|
|
1460
|
+
if (s(a.key, t) >= 0 && n.call(i, a))
|
|
1461
|
+
return this;
|
|
1462
|
+
a = a.right;
|
|
1463
|
+
}
|
|
1464
|
+
return this;
|
|
1465
|
+
}, r.prototype.keys = function() {
|
|
1466
|
+
var t = [];
|
|
1467
|
+
return this.forEach(function(e) {
|
|
1468
|
+
var n = e.key;
|
|
1469
|
+
return t.push(n);
|
|
1470
|
+
}), t;
|
|
1471
|
+
}, r.prototype.values = function() {
|
|
1472
|
+
var t = [];
|
|
1473
|
+
return this.forEach(function(e) {
|
|
1474
|
+
var n = e.data;
|
|
1475
|
+
return t.push(n);
|
|
1476
|
+
}), t;
|
|
1477
|
+
}, r.prototype.min = function() {
|
|
1478
|
+
return this._root ? this.minNode(this._root).key : null;
|
|
1479
|
+
}, r.prototype.max = function() {
|
|
1480
|
+
return this._root ? this.maxNode(this._root).key : null;
|
|
1481
|
+
}, r.prototype.minNode = function(t) {
|
|
1482
|
+
if (t === void 0 && (t = this._root), t)
|
|
1483
|
+
for (; t.left; )
|
|
1484
|
+
t = t.left;
|
|
1485
|
+
return t;
|
|
1486
|
+
}, r.prototype.maxNode = function(t) {
|
|
1487
|
+
if (t === void 0 && (t = this._root), t)
|
|
1488
|
+
for (; t.right; )
|
|
1489
|
+
t = t.right;
|
|
1490
|
+
return t;
|
|
1491
|
+
}, r.prototype.at = function(t) {
|
|
1492
|
+
for (var e = this._root, n = !1, i = 0, o = []; !n; )
|
|
1493
|
+
if (e)
|
|
1494
|
+
o.push(e), e = e.left;
|
|
1495
|
+
else if (o.length > 0) {
|
|
1496
|
+
if (e = o.pop(), i === t)
|
|
1497
|
+
return e;
|
|
1498
|
+
i++, e = e.right;
|
|
1499
|
+
} else
|
|
1500
|
+
n = !0;
|
|
1501
|
+
return null;
|
|
1502
|
+
}, r.prototype.next = function(t) {
|
|
1503
|
+
var e = this._root, n = null;
|
|
1504
|
+
if (t.right) {
|
|
1505
|
+
for (n = t.right; n.left; )
|
|
1506
|
+
n = n.left;
|
|
1507
|
+
return n;
|
|
1508
|
+
}
|
|
1509
|
+
for (var i = this._comparator; e; ) {
|
|
1510
|
+
var o = i(t.key, e.key);
|
|
1511
|
+
if (o === 0)
|
|
1113
1512
|
break;
|
|
1114
|
-
|
|
1115
|
-
return this;
|
|
1116
|
-
a = a.right;
|
|
1513
|
+
o < 0 ? (n = e, e = e.left) : e = e.right;
|
|
1117
1514
|
}
|
|
1118
|
-
return this;
|
|
1119
|
-
}, r.prototype.keys = function() {
|
|
1120
|
-
var t = [];
|
|
1121
|
-
return this.forEach(function(e) {
|
|
1122
|
-
var n = e.key;
|
|
1123
|
-
return t.push(n);
|
|
1124
|
-
}), t;
|
|
1125
|
-
}, r.prototype.values = function() {
|
|
1126
|
-
var t = [];
|
|
1127
|
-
return this.forEach(function(e) {
|
|
1128
|
-
var n = e.data;
|
|
1129
|
-
return t.push(n);
|
|
1130
|
-
}), t;
|
|
1131
|
-
}, r.prototype.min = function() {
|
|
1132
|
-
return this._root ? this.minNode(this._root).key : null;
|
|
1133
|
-
}, r.prototype.max = function() {
|
|
1134
|
-
return this._root ? this.maxNode(this._root).key : null;
|
|
1135
|
-
}, r.prototype.minNode = function(t) {
|
|
1136
|
-
if (t === void 0 && (t = this._root), t)
|
|
1137
|
-
for (; t.left; )
|
|
1138
|
-
t = t.left;
|
|
1139
|
-
return t;
|
|
1140
|
-
}, r.prototype.maxNode = function(t) {
|
|
1141
|
-
if (t === void 0 && (t = this._root), t)
|
|
1142
|
-
for (; t.right; )
|
|
1143
|
-
t = t.right;
|
|
1144
|
-
return t;
|
|
1145
|
-
}, r.prototype.at = function(t) {
|
|
1146
|
-
for (var e = this._root, n = !1, i = 0, o = []; !n; )
|
|
1147
|
-
if (e)
|
|
1148
|
-
o.push(e), e = e.left;
|
|
1149
|
-
else if (o.length > 0) {
|
|
1150
|
-
if (e = o.pop(), i === t)
|
|
1151
|
-
return e;
|
|
1152
|
-
i++, e = e.right;
|
|
1153
|
-
} else
|
|
1154
|
-
n = !0;
|
|
1155
|
-
return null;
|
|
1156
|
-
}, r.prototype.next = function(t) {
|
|
1157
|
-
var e = this._root, n = null;
|
|
1158
|
-
if (t.right) {
|
|
1159
|
-
for (n = t.right; n.left; )
|
|
1160
|
-
n = n.left;
|
|
1161
1515
|
return n;
|
|
1162
|
-
}
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1516
|
+
}, r.prototype.prev = function(t) {
|
|
1517
|
+
var e = this._root, n = null;
|
|
1518
|
+
if (t.left !== null) {
|
|
1519
|
+
for (n = t.left; n.right; )
|
|
1520
|
+
n = n.right;
|
|
1521
|
+
return n;
|
|
1522
|
+
}
|
|
1523
|
+
for (var i = this._comparator; e; ) {
|
|
1524
|
+
var o = i(t.key, e.key);
|
|
1525
|
+
if (o === 0)
|
|
1526
|
+
break;
|
|
1527
|
+
o < 0 ? e = e.left : (n = e, e = e.right);
|
|
1528
|
+
}
|
|
1175
1529
|
return n;
|
|
1176
|
-
}
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
}, r.prototype.load = function(t, e, n) {
|
|
1189
|
-
e === void 0 && (e = []), n === void 0 && (n = !1);
|
|
1190
|
-
var i = t.length, o = this._comparator;
|
|
1191
|
-
if (n && Cs(t, e, 0, i - 1, o), this._root === null)
|
|
1192
|
-
this._root = Es(t, e, 0, i), this._size = i;
|
|
1193
|
-
else {
|
|
1194
|
-
var s = Yl(this.toList(), ql(t, e), o);
|
|
1195
|
-
i = this._size + i, this._root = Is({ head: s }, 0, i);
|
|
1196
|
-
}
|
|
1197
|
-
return this;
|
|
1198
|
-
}, r.prototype.isEmpty = function() {
|
|
1199
|
-
return this._root === null;
|
|
1200
|
-
}, Object.defineProperty(r.prototype, "size", {
|
|
1201
|
-
get: function() {
|
|
1202
|
-
return this._size;
|
|
1203
|
-
},
|
|
1204
|
-
enumerable: !0,
|
|
1205
|
-
configurable: !0
|
|
1206
|
-
}), Object.defineProperty(r.prototype, "root", {
|
|
1207
|
-
get: function() {
|
|
1208
|
-
return this._root;
|
|
1209
|
-
},
|
|
1210
|
-
enumerable: !0,
|
|
1211
|
-
configurable: !0
|
|
1212
|
-
}), r.prototype.toString = function(t) {
|
|
1213
|
-
t === void 0 && (t = function(n) {
|
|
1214
|
-
return String(n.key);
|
|
1215
|
-
});
|
|
1216
|
-
var e = [];
|
|
1217
|
-
return _s(this._root, "", !0, function(n) {
|
|
1218
|
-
return e.push(n);
|
|
1219
|
-
}, t), e.join("");
|
|
1220
|
-
}, r.prototype.update = function(t, e, n) {
|
|
1221
|
-
var i = this._comparator, o = la(t, this._root, i), s = o.left, a = o.right;
|
|
1222
|
-
i(t, e) < 0 ? a = hs(e, n, a, i) : s = hs(e, n, s, i), this._root = Ul(s, a, i);
|
|
1223
|
-
}, r.prototype.split = function(t) {
|
|
1224
|
-
return la(t, this._root, this._comparator);
|
|
1225
|
-
}, r.prototype[Symbol.iterator] = function() {
|
|
1226
|
-
var t;
|
|
1227
|
-
return zl(this, function(e) {
|
|
1228
|
-
switch (e.label) {
|
|
1229
|
-
case 0:
|
|
1230
|
-
t = this.minNode(), e.label = 1;
|
|
1231
|
-
case 1:
|
|
1232
|
-
return t ? [4, t] : [3, 3];
|
|
1233
|
-
case 2:
|
|
1234
|
-
return e.sent(), t = this.next(t), [3, 1];
|
|
1235
|
-
case 3:
|
|
1236
|
-
return [2];
|
|
1530
|
+
}, r.prototype.clear = function() {
|
|
1531
|
+
return this._root = null, this._size = 0, this;
|
|
1532
|
+
}, r.prototype.toList = function() {
|
|
1533
|
+
return Xl(this._root);
|
|
1534
|
+
}, r.prototype.load = function(t, e, n) {
|
|
1535
|
+
e === void 0 && (e = []), n === void 0 && (n = !1);
|
|
1536
|
+
var i = t.length, o = this._comparator;
|
|
1537
|
+
if (n && Cs(t, e, 0, i - 1, o), this._root === null)
|
|
1538
|
+
this._root = Es(t, e, 0, i), this._size = i;
|
|
1539
|
+
else {
|
|
1540
|
+
var s = Yl(this.toList(), ql(t, e), o);
|
|
1541
|
+
i = this._size + i, this._root = Is({ head: s }, 0, i);
|
|
1237
1542
|
}
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1543
|
+
return this;
|
|
1544
|
+
}, r.prototype.isEmpty = function() {
|
|
1545
|
+
return this._root === null;
|
|
1546
|
+
}, Object.defineProperty(r.prototype, "size", {
|
|
1547
|
+
get: function() {
|
|
1548
|
+
return this._size;
|
|
1549
|
+
},
|
|
1550
|
+
enumerable: !0,
|
|
1551
|
+
configurable: !0
|
|
1552
|
+
}), Object.defineProperty(r.prototype, "root", {
|
|
1553
|
+
get: function() {
|
|
1554
|
+
return this._root;
|
|
1555
|
+
},
|
|
1556
|
+
enumerable: !0,
|
|
1557
|
+
configurable: !0
|
|
1558
|
+
}), r.prototype.toString = function(t) {
|
|
1559
|
+
t === void 0 && (t = function(n) {
|
|
1560
|
+
return String(n.key);
|
|
1561
|
+
});
|
|
1562
|
+
var e = [];
|
|
1563
|
+
return _s(this._root, "", !0, function(n) {
|
|
1564
|
+
return e.push(n);
|
|
1565
|
+
}, t), e.join("");
|
|
1566
|
+
}, r.prototype.update = function(t, e, n) {
|
|
1567
|
+
var i = this._comparator, o = la(t, this._root, i), s = o.left, a = o.right;
|
|
1568
|
+
i(t, e) < 0 ? a = hs(e, n, a, i) : s = hs(e, n, s, i), this._root = Ul(s, a, i);
|
|
1569
|
+
}, r.prototype.split = function(t) {
|
|
1570
|
+
return la(t, this._root, this._comparator);
|
|
1571
|
+
}, r.prototype[Symbol.iterator] = function() {
|
|
1572
|
+
var t;
|
|
1573
|
+
return zl(this, function(e) {
|
|
1574
|
+
switch (e.label) {
|
|
1575
|
+
case 0:
|
|
1576
|
+
t = this.minNode(), e.label = 1;
|
|
1577
|
+
case 1:
|
|
1578
|
+
return t ? [4, t] : [3, 3];
|
|
1579
|
+
case 2:
|
|
1580
|
+
return e.sent(), t = this.next(t), [3, 1];
|
|
1581
|
+
case 3:
|
|
1582
|
+
return [
|
|
1583
|
+
2
|
|
1584
|
+
/*return*/
|
|
1585
|
+
];
|
|
1586
|
+
}
|
|
1587
|
+
});
|
|
1588
|
+
}, r;
|
|
1589
|
+
}()
|
|
1590
|
+
);
|
|
1241
1591
|
function Es(r, t, e, n) {
|
|
1242
1592
|
var i = n - e;
|
|
1243
1593
|
if (i > 0) {
|
|
@@ -1420,15 +1770,18 @@ var Hl = yr * yr, xs = function(t, e) {
|
|
|
1420
1770
|
}, Vn = /* @__PURE__ */ function() {
|
|
1421
1771
|
Ee(r, null, [{
|
|
1422
1772
|
key: "compare",
|
|
1773
|
+
// for ordering sweep events in the sweep event queue
|
|
1423
1774
|
value: function(e, n) {
|
|
1424
1775
|
var i = r.comparePoints(e.point, n.point);
|
|
1425
1776
|
return i !== 0 ? i : (e.point !== n.point && e.link(n), e.isLeft !== n.isLeft ? e.isLeft ? 1 : -1 : Mo.compare(e.segment, n.segment));
|
|
1426
1777
|
}
|
|
1778
|
+
// for ordering points in sweep line order
|
|
1427
1779
|
}, {
|
|
1428
1780
|
key: "comparePoints",
|
|
1429
1781
|
value: function(e, n) {
|
|
1430
1782
|
return e.x < n.x ? -1 : e.x > n.x ? 1 : e.y < n.y ? -1 : e.y > n.y ? 1 : 0;
|
|
1431
1783
|
}
|
|
1784
|
+
// Warning: 'point' input will be modified and re-used (for performance)
|
|
1432
1785
|
}]);
|
|
1433
1786
|
function r(t, e) {
|
|
1434
1787
|
yn(this, r), t.events === void 0 ? t.events = [this] : t.events.push(this), this.point = t, this.isLeft = e;
|
|
@@ -1444,6 +1797,8 @@ var Hl = yr * yr, xs = function(t, e) {
|
|
|
1444
1797
|
}
|
|
1445
1798
|
this.checkForConsuming();
|
|
1446
1799
|
}
|
|
1800
|
+
/* Do a pass over our linked events and check to see if any pair
|
|
1801
|
+
* of segments match, and should be consumed. */
|
|
1447
1802
|
}, {
|
|
1448
1803
|
key: "checkForConsuming",
|
|
1449
1804
|
value: function() {
|
|
@@ -1465,6 +1820,16 @@ var Hl = yr * yr, xs = function(t, e) {
|
|
|
1465
1820
|
}
|
|
1466
1821
|
return e;
|
|
1467
1822
|
}
|
|
1823
|
+
/**
|
|
1824
|
+
* Returns a comparator function for sorting linked events that will
|
|
1825
|
+
* favor the event that will give us the smallest left-side angle.
|
|
1826
|
+
* All ring construction starts as low as possible heading to the right,
|
|
1827
|
+
* so by always turning left as sharp as possible we'll get polygons
|
|
1828
|
+
* without uncessary loops & holes.
|
|
1829
|
+
*
|
|
1830
|
+
* The comparator function has a compute cache such that it avoids
|
|
1831
|
+
* re-computing already-computed values.
|
|
1832
|
+
*/
|
|
1468
1833
|
}, {
|
|
1469
1834
|
key: "getLeftmostComparator",
|
|
1470
1835
|
value: function(e) {
|
|
@@ -1485,6 +1850,19 @@ var Hl = yr * yr, xs = function(t, e) {
|
|
|
1485
1850
|
}(), Jl = 0, Mo = /* @__PURE__ */ function() {
|
|
1486
1851
|
Ee(r, null, [{
|
|
1487
1852
|
key: "compare",
|
|
1853
|
+
/* This compare() function is for ordering segments in the sweep
|
|
1854
|
+
* line tree, and does so according to the following criteria:
|
|
1855
|
+
*
|
|
1856
|
+
* Consider the vertical line that lies an infinestimal step to the
|
|
1857
|
+
* right of the right-more of the two left endpoints of the input
|
|
1858
|
+
* segments. Imagine slowly moving a point up from negative infinity
|
|
1859
|
+
* in the increasing y direction. Which of the two segments will that
|
|
1860
|
+
* point intersect first? That segment comes 'before' the other one.
|
|
1861
|
+
*
|
|
1862
|
+
* If neither segment would be intersected by such a line, (if one
|
|
1863
|
+
* or more of the segments are vertical) then the line to be considered
|
|
1864
|
+
* is directly on the right-more of the two left inputs.
|
|
1865
|
+
*/
|
|
1488
1866
|
value: function(e, n) {
|
|
1489
1867
|
var i = e.leftSE.point.x, o = n.leftSE.point.x, s = e.rightSE.point.x, a = n.rightSE.point.x;
|
|
1490
1868
|
if (a < i)
|
|
@@ -1541,12 +1919,15 @@ var Hl = yr * yr, xs = function(t, e) {
|
|
|
1541
1919
|
}
|
|
1542
1920
|
return s > a ? 1 : s < a || c < f ? -1 : c > f ? 1 : e.id < n.id ? -1 : e.id > n.id ? 1 : 0;
|
|
1543
1921
|
}
|
|
1922
|
+
/* Warning: a reference to ringWindings input will be stored,
|
|
1923
|
+
* and possibly will be later modified */
|
|
1544
1924
|
}]);
|
|
1545
1925
|
function r(t, e, n, i) {
|
|
1546
1926
|
yn(this, r), this.id = ++Jl, this.leftSE = t, t.segment = this, t.otherSE = e, this.rightSE = e, e.segment = this, e.otherSE = t, this.rings = n, this.windings = i;
|
|
1547
1927
|
}
|
|
1548
1928
|
return Ee(r, [{
|
|
1549
1929
|
key: "replaceRightSE",
|
|
1930
|
+
/* When a segment is split, the rightSE is replaced with a new sweep event */
|
|
1550
1931
|
value: function(e) {
|
|
1551
1932
|
this.rightSE = e, this.rightSE.segment = this, this.rightSE.otherSE = this.leftSE, this.leftSE.otherSE = this.rightSE;
|
|
1552
1933
|
}
|
|
@@ -1565,6 +1946,7 @@ var Hl = yr * yr, xs = function(t, e) {
|
|
|
1565
1946
|
}
|
|
1566
1947
|
};
|
|
1567
1948
|
}
|
|
1949
|
+
/* A vector from the left point to the right */
|
|
1568
1950
|
}, {
|
|
1569
1951
|
key: "vector",
|
|
1570
1952
|
value: function() {
|
|
@@ -1578,6 +1960,19 @@ var Hl = yr * yr, xs = function(t, e) {
|
|
|
1578
1960
|
value: function(e) {
|
|
1579
1961
|
return e.x === this.leftSE.point.x && e.y === this.leftSE.point.y || e.x === this.rightSE.point.x && e.y === this.rightSE.point.y;
|
|
1580
1962
|
}
|
|
1963
|
+
/* Compare this segment with a point.
|
|
1964
|
+
*
|
|
1965
|
+
* A point P is considered to be colinear to a segment if there
|
|
1966
|
+
* exists a distance D such that if we travel along the segment
|
|
1967
|
+
* from one * endpoint towards the other a distance D, we find
|
|
1968
|
+
* ourselves at point P.
|
|
1969
|
+
*
|
|
1970
|
+
* Return value indicates:
|
|
1971
|
+
*
|
|
1972
|
+
* 1: point lies above the segment (to the left of vertical)
|
|
1973
|
+
* 0: point is colinear to segment
|
|
1974
|
+
* -1: point lies below the segment (to the right of vertical)
|
|
1975
|
+
*/
|
|
1581
1976
|
}, {
|
|
1582
1977
|
key: "comparePoint",
|
|
1583
1978
|
value: function(e) {
|
|
@@ -1592,6 +1987,21 @@ var Hl = yr * yr, xs = function(t, e) {
|
|
|
1592
1987
|
var u = (e.x - n.x) / o.x, l = n.y + u * o.y;
|
|
1593
1988
|
return e.y === l ? 0 : e.y < l ? -1 : 1;
|
|
1594
1989
|
}
|
|
1990
|
+
/**
|
|
1991
|
+
* Given another segment, returns the first non-trivial intersection
|
|
1992
|
+
* between the two segments (in terms of sweep line ordering), if it exists.
|
|
1993
|
+
*
|
|
1994
|
+
* A 'non-trivial' intersection is one that will cause one or both of the
|
|
1995
|
+
* segments to be split(). As such, 'trivial' vs. 'non-trivial' intersection:
|
|
1996
|
+
*
|
|
1997
|
+
* * endpoint of segA with endpoint of segB --> trivial
|
|
1998
|
+
* * endpoint of segA with point along segB --> non-trivial
|
|
1999
|
+
* * endpoint of segB with point along segA --> non-trivial
|
|
2000
|
+
* * point along segA with point along segB --> non-trivial
|
|
2001
|
+
*
|
|
2002
|
+
* If no non-trivial intersection exists, return null
|
|
2003
|
+
* Else, return null.
|
|
2004
|
+
*/
|
|
1595
2005
|
}, {
|
|
1596
2006
|
key: "getIntersection",
|
|
1597
2007
|
value: function(e) {
|
|
@@ -1614,6 +2024,18 @@ var Hl = yr * yr, xs = function(t, e) {
|
|
|
1614
2024
|
var p = Ql(s, this.vector(), u, e.vector());
|
|
1615
2025
|
return p === null || !Vi(o, p) ? null : Qi.round(p.x, p.y);
|
|
1616
2026
|
}
|
|
2027
|
+
/**
|
|
2028
|
+
* Split the given segment into multiple segments on the given points.
|
|
2029
|
+
* * Each existing segment will retain its leftSE and a new rightSE will be
|
|
2030
|
+
* generated for it.
|
|
2031
|
+
* * A new segment will be generated which will adopt the original segment's
|
|
2032
|
+
* rightSE, and a new leftSE will be generated for it.
|
|
2033
|
+
* * If there are more than two points given to split on, new segments
|
|
2034
|
+
* in the middle will be generated with new leftSE and rightSE's.
|
|
2035
|
+
* * An array of the newly generated SweepEvents will be returned.
|
|
2036
|
+
*
|
|
2037
|
+
* Warning: input array of points is modified
|
|
2038
|
+
*/
|
|
1617
2039
|
}, {
|
|
1618
2040
|
key: "split",
|
|
1619
2041
|
value: function(e) {
|
|
@@ -1622,6 +2044,7 @@ var Hl = yr * yr, xs = function(t, e) {
|
|
|
1622
2044
|
var u = new r(o, a, this.rings.slice(), this.windings.slice());
|
|
1623
2045
|
return Vn.comparePoints(u.leftSE.point, u.rightSE.point) > 0 && u.swapEvents(), Vn.comparePoints(this.leftSE.point, this.rightSE.point) > 0 && this.swapEvents(), i && (o.checkForConsuming(), s.checkForConsuming()), n;
|
|
1624
2046
|
}
|
|
2047
|
+
/* Swap which event is left and right */
|
|
1625
2048
|
}, {
|
|
1626
2049
|
key: "swapEvents",
|
|
1627
2050
|
value: function() {
|
|
@@ -1630,6 +2053,8 @@ var Hl = yr * yr, xs = function(t, e) {
|
|
|
1630
2053
|
for (var n = 0, i = this.windings.length; n < i; n++)
|
|
1631
2054
|
this.windings[n] *= -1;
|
|
1632
2055
|
}
|
|
2056
|
+
/* Consume another segment. We take their rings under our wing
|
|
2057
|
+
* and mark them as consumed. Use for perfectly overlapping segments */
|
|
1633
2058
|
}, {
|
|
1634
2059
|
key: "consume",
|
|
1635
2060
|
value: function(e) {
|
|
@@ -1654,6 +2079,7 @@ var Hl = yr * yr, xs = function(t, e) {
|
|
|
1654
2079
|
i.rings = null, i.windings = null, i.consumedBy = n, i.leftSE.consumedBy = n.leftSE, i.rightSE.consumedBy = n.rightSE;
|
|
1655
2080
|
}
|
|
1656
2081
|
}
|
|
2082
|
+
/* The first segment previous segment chain that is in the result */
|
|
1657
2083
|
}, {
|
|
1658
2084
|
key: "prevInResult",
|
|
1659
2085
|
value: function() {
|
|
@@ -1709,6 +2135,7 @@ var Hl = yr * yr, xs = function(t, e) {
|
|
|
1709
2135
|
}
|
|
1710
2136
|
return this._afterState;
|
|
1711
2137
|
}
|
|
2138
|
+
/* Is this segment part of the final result? */
|
|
1712
2139
|
}, {
|
|
1713
2140
|
key: "isInResult",
|
|
1714
2141
|
value: function() {
|
|
@@ -1859,6 +2286,8 @@ var Hl = yr * yr, xs = function(t, e) {
|
|
|
1859
2286
|
}(), $l = /* @__PURE__ */ function() {
|
|
1860
2287
|
Ee(r, null, [{
|
|
1861
2288
|
key: "factory",
|
|
2289
|
+
/* Given the segments from the sweep line pass, compute & return a series
|
|
2290
|
+
* of closed rings from all the segments marked to be part of the result */
|
|
1862
2291
|
value: function(e) {
|
|
1863
2292
|
for (var n = [], i = 0, o = e.length; i < o; i++) {
|
|
1864
2293
|
var s = e[i];
|
|
@@ -1933,6 +2362,7 @@ var Hl = yr * yr, xs = function(t, e) {
|
|
|
1933
2362
|
value: function() {
|
|
1934
2363
|
return this._enclosingRing === void 0 && (this._enclosingRing = this._calcEnclosingRing()), this._enclosingRing;
|
|
1935
2364
|
}
|
|
2365
|
+
/* Returns the ring that encloses this one, if any */
|
|
1936
2366
|
}, {
|
|
1937
2367
|
key: "_calcEnclosingRing",
|
|
1938
2368
|
value: function() {
|
|
@@ -2066,6 +2496,8 @@ var Hl = yr * yr, xs = function(t, e) {
|
|
|
2066
2496
|
}
|
|
2067
2497
|
return i;
|
|
2068
2498
|
}
|
|
2499
|
+
/* Safely split a segment that is currently in the datastructures
|
|
2500
|
+
* IE - a segment other than the one that is currently being processed. */
|
|
2069
2501
|
}, {
|
|
2070
2502
|
key: "_splitSafely",
|
|
2071
2503
|
value: function(e, n) {
|
|
@@ -3519,6 +3951,7 @@ var $e = {
|
|
|
3519
3951
|
spaces: /\s+/,
|
|
3520
3952
|
parenComma: /\)\s*,\s*\(/,
|
|
3521
3953
|
doubleParenComma: /\)\s*\)\s*,\s*\(\s*\(/,
|
|
3954
|
+
// can't use {2} here
|
|
3522
3955
|
trimParens: /^\s*\(?(.*?)\)?\s*$/
|
|
3523
3956
|
}, jo = function(t) {
|
|
3524
3957
|
this.geometryFactory = t || new H();
|
|
@@ -3545,14 +3978,35 @@ var kn = {
|
|
|
3545
3978
|
coordinate: function(t) {
|
|
3546
3979
|
return t.x + " " + t.y;
|
|
3547
3980
|
},
|
|
3981
|
+
/**
|
|
3982
|
+
* Return a space delimited string of point coordinates.
|
|
3983
|
+
*
|
|
3984
|
+
* @param {Point}
|
|
3985
|
+
* point
|
|
3986
|
+
* @return {String} A string of coordinates representing the point.
|
|
3987
|
+
*/
|
|
3548
3988
|
point: function(t) {
|
|
3549
3989
|
return kn.coordinate.call(this, t._coordinates._coordinates[0]);
|
|
3550
3990
|
},
|
|
3991
|
+
/**
|
|
3992
|
+
* Return a comma delimited string of point coordinates from a multipoint.
|
|
3993
|
+
*
|
|
3994
|
+
* @param {MultiPoint}
|
|
3995
|
+
* multipoint
|
|
3996
|
+
* @return {String} A string of point coordinate strings representing the
|
|
3997
|
+
* multipoint.
|
|
3998
|
+
*/
|
|
3551
3999
|
multipoint: function(t) {
|
|
3552
4000
|
for (var e = this, n = [], i = 0, o = t._geometries.length; i < o; ++i)
|
|
3553
4001
|
n.push("(" + kn.point.apply(e, [t._geometries[i]]) + ")");
|
|
3554
4002
|
return n.join(",");
|
|
3555
4003
|
},
|
|
4004
|
+
/**
|
|
4005
|
+
* Return a comma delimited string of point coordinates from a line.
|
|
4006
|
+
*
|
|
4007
|
+
* @param {LineString} linestring
|
|
4008
|
+
* @return {String} A string of point coordinate strings representing the linestring.
|
|
4009
|
+
*/
|
|
3556
4010
|
linestring: function(t) {
|
|
3557
4011
|
for (var e = this, n = [], i = 0, o = t._points._coordinates.length; i < o; ++i)
|
|
3558
4012
|
n.push(kn.coordinate.apply(e, [t._points._coordinates[i]]));
|
|
@@ -3563,11 +4017,24 @@ var kn = {
|
|
|
3563
4017
|
n.push(kn.coordinate.apply(e, [t._points._coordinates[i]]));
|
|
3564
4018
|
return n.join(",");
|
|
3565
4019
|
},
|
|
4020
|
+
/**
|
|
4021
|
+
* Return a comma delimited string of linestring strings from a
|
|
4022
|
+
* multilinestring.
|
|
4023
|
+
*
|
|
4024
|
+
* @param {MultiLineString} multilinestring
|
|
4025
|
+
* @return {String} A string of of linestring strings representing the multilinestring.
|
|
4026
|
+
*/
|
|
3566
4027
|
multilinestring: function(t) {
|
|
3567
4028
|
for (var e = this, n = [], i = 0, o = t._geometries.length; i < o; ++i)
|
|
3568
4029
|
n.push("(" + kn.linestring.apply(e, [t._geometries[i]]) + ")");
|
|
3569
4030
|
return n.join(",");
|
|
3570
4031
|
},
|
|
4032
|
+
/**
|
|
4033
|
+
* Return a comma delimited string of linear ring arrays from a polygon.
|
|
4034
|
+
*
|
|
4035
|
+
* @param {Polygon} polygon
|
|
4036
|
+
* @return {String} An array of linear ring arrays representing the polygon.
|
|
4037
|
+
*/
|
|
3571
4038
|
polygon: function(t) {
|
|
3572
4039
|
var e = this, n = [];
|
|
3573
4040
|
n.push("(" + kn.linestring.apply(this, [t._shell]) + ")");
|
|
@@ -3575,17 +4042,37 @@ var kn = {
|
|
|
3575
4042
|
n.push("(" + kn.linestring.apply(e, [t._holes[i]]) + ")");
|
|
3576
4043
|
return n.join(",");
|
|
3577
4044
|
},
|
|
4045
|
+
/**
|
|
4046
|
+
* Return an array of polygon arrays from a multipolygon.
|
|
4047
|
+
*
|
|
4048
|
+
* @param {MultiPolygon} multipolygon
|
|
4049
|
+
* @return {String} An array of polygon arrays representing the multipolygon.
|
|
4050
|
+
*/
|
|
3578
4051
|
multipolygon: function(t) {
|
|
3579
4052
|
for (var e = this, n = [], i = 0, o = t._geometries.length; i < o; ++i)
|
|
3580
4053
|
n.push("(" + kn.polygon.apply(e, [t._geometries[i]]) + ")");
|
|
3581
4054
|
return n.join(",");
|
|
3582
4055
|
},
|
|
4056
|
+
/**
|
|
4057
|
+
* Return the WKT portion between 'GEOMETRYCOLLECTION(' and ')' for an
|
|
4058
|
+
* geometrycollection.
|
|
4059
|
+
*
|
|
4060
|
+
* @param {GeometryCollection} collection
|
|
4061
|
+
* @return {String} internal WKT representation of the collection.
|
|
4062
|
+
*/
|
|
3583
4063
|
geometrycollection: function(t) {
|
|
3584
4064
|
for (var e = this, n = [], i = 0, o = t._geometries.length; i < o; ++i)
|
|
3585
4065
|
n.push(e.extractGeometry(t._geometries[i]));
|
|
3586
4066
|
return n.join(",");
|
|
3587
4067
|
}
|
|
3588
4068
|
}, ui = {
|
|
4069
|
+
/**
|
|
4070
|
+
* Return point geometry given a point WKT fragment.
|
|
4071
|
+
*
|
|
4072
|
+
* @param {String} str A WKT fragment representing the point.
|
|
4073
|
+
* @return {Point} A point geometry.
|
|
4074
|
+
* @private
|
|
4075
|
+
*/
|
|
3589
4076
|
point: function(t) {
|
|
3590
4077
|
if (t === void 0)
|
|
3591
4078
|
return this.geometryFactory.createPoint();
|
|
@@ -3595,6 +4082,13 @@ var kn = {
|
|
|
3595
4082
|
Number.parseFloat(e[1])
|
|
3596
4083
|
));
|
|
3597
4084
|
},
|
|
4085
|
+
/**
|
|
4086
|
+
* Return a multipoint geometry given a multipoint WKT fragment.
|
|
4087
|
+
*
|
|
4088
|
+
* @param {String} str A WKT fragment representing the multipoint.
|
|
4089
|
+
* @return {Point} A multipoint feature.
|
|
4090
|
+
* @private
|
|
4091
|
+
*/
|
|
3598
4092
|
multipoint: function(t) {
|
|
3599
4093
|
var e = this;
|
|
3600
4094
|
if (t === void 0)
|
|
@@ -3603,6 +4097,13 @@ var kn = {
|
|
|
3603
4097
|
n = i[s].replace($e.trimParens, "$1"), o.push(ui.point.apply(e, [n]));
|
|
3604
4098
|
return this.geometryFactory.createMultiPoint(o);
|
|
3605
4099
|
},
|
|
4100
|
+
/**
|
|
4101
|
+
* Return a linestring geometry given a linestring WKT fragment.
|
|
4102
|
+
*
|
|
4103
|
+
* @param {String} str A WKT fragment representing the linestring.
|
|
4104
|
+
* @return {LineString} A linestring geometry.
|
|
4105
|
+
* @private
|
|
4106
|
+
*/
|
|
3606
4107
|
linestring: function(t) {
|
|
3607
4108
|
if (t === void 0)
|
|
3608
4109
|
return this.geometryFactory.createLineString();
|
|
@@ -3610,6 +4111,13 @@ var kn = {
|
|
|
3610
4111
|
i = e[o].trim().split($e.spaces), n.push(new d(Number.parseFloat(i[0]), Number.parseFloat(i[1])));
|
|
3611
4112
|
return this.geometryFactory.createLineString(n);
|
|
3612
4113
|
},
|
|
4114
|
+
/**
|
|
4115
|
+
* Return a linearring geometry given a linearring WKT fragment.
|
|
4116
|
+
*
|
|
4117
|
+
* @param {String} str A WKT fragment representing the linearring.
|
|
4118
|
+
* @return {LinearRing} A linearring geometry.
|
|
4119
|
+
* @private
|
|
4120
|
+
*/
|
|
3613
4121
|
linearring: function(t) {
|
|
3614
4122
|
if (t === void 0)
|
|
3615
4123
|
return this.geometryFactory.createLinearRing();
|
|
@@ -3617,6 +4125,13 @@ var kn = {
|
|
|
3617
4125
|
i = e[o].trim().split($e.spaces), n.push(new d(Number.parseFloat(i[0]), Number.parseFloat(i[1])));
|
|
3618
4126
|
return this.geometryFactory.createLinearRing(n);
|
|
3619
4127
|
},
|
|
4128
|
+
/**
|
|
4129
|
+
* Return a multilinestring geometry given a multilinestring WKT fragment.
|
|
4130
|
+
*
|
|
4131
|
+
* @param {String} str A WKT fragment representing the multilinestring.
|
|
4132
|
+
* @return {MultiLineString} A multilinestring geometry.
|
|
4133
|
+
* @private
|
|
4134
|
+
*/
|
|
3620
4135
|
multilinestring: function(t) {
|
|
3621
4136
|
var e = this;
|
|
3622
4137
|
if (t === void 0)
|
|
@@ -3625,6 +4140,13 @@ var kn = {
|
|
|
3625
4140
|
n = i[s].replace($e.trimParens, "$1"), o.push(ui.linestring.apply(e, [n]));
|
|
3626
4141
|
return this.geometryFactory.createMultiLineString(o);
|
|
3627
4142
|
},
|
|
4143
|
+
/**
|
|
4144
|
+
* Return a polygon geometry given a polygon WKT fragment.
|
|
4145
|
+
*
|
|
4146
|
+
* @param {String} str A WKT fragment representing the polygon.
|
|
4147
|
+
* @return {Polygon} A polygon geometry.
|
|
4148
|
+
* @private
|
|
4149
|
+
*/
|
|
3628
4150
|
polygon: function(t) {
|
|
3629
4151
|
var e = this;
|
|
3630
4152
|
if (t === void 0)
|
|
@@ -3633,6 +4155,13 @@ var kn = {
|
|
|
3633
4155
|
n = s[l].replace($e.trimParens, "$1"), i = ui.linestring.apply(e, [n]), o = e.geometryFactory.createLinearRing(i._points), l === 0 ? a = o : u.push(o);
|
|
3634
4156
|
return this.geometryFactory.createPolygon(a, u);
|
|
3635
4157
|
},
|
|
4158
|
+
/**
|
|
4159
|
+
* Return a multipolygon geometry given a multipolygon WKT fragment.
|
|
4160
|
+
*
|
|
4161
|
+
* @param {String} str A WKT fragment representing the multipolygon.
|
|
4162
|
+
* @return {MultiPolygon} A multipolygon geometry.
|
|
4163
|
+
* @private
|
|
4164
|
+
*/
|
|
3636
4165
|
multipolygon: function(t) {
|
|
3637
4166
|
var e = this;
|
|
3638
4167
|
if (t === void 0)
|
|
@@ -3641,6 +4170,13 @@ var kn = {
|
|
|
3641
4170
|
n = i[s].replace($e.trimParens, "$1"), o.push(ui.polygon.apply(e, [n]));
|
|
3642
4171
|
return this.geometryFactory.createMultiPolygon(o);
|
|
3643
4172
|
},
|
|
4173
|
+
/**
|
|
4174
|
+
* Return a geometrycollection given a geometrycollection WKT fragment.
|
|
4175
|
+
*
|
|
4176
|
+
* @param {String} str A WKT fragment representing the geometrycollection.
|
|
4177
|
+
* @return {GeometryCollection}
|
|
4178
|
+
* @private
|
|
4179
|
+
*/
|
|
3644
4180
|
geometrycollection: function(t) {
|
|
3645
4181
|
var e = this;
|
|
3646
4182
|
if (t === void 0)
|
|
@@ -6741,6 +7277,14 @@ $o.prototype.write = function(t) {
|
|
|
6741
7277
|
return zn[e].apply(this, [t]);
|
|
6742
7278
|
};
|
|
6743
7279
|
var en = {
|
|
7280
|
+
/**
|
|
7281
|
+
* Parse a GeoJSON Feature object
|
|
7282
|
+
*
|
|
7283
|
+
* @param {Object}
|
|
7284
|
+
* obj Object to parse.
|
|
7285
|
+
*
|
|
7286
|
+
* @return {Object} Feature with geometry/bbox converted to JSTS Geometries.
|
|
7287
|
+
*/
|
|
6744
7288
|
Feature: function(r) {
|
|
6745
7289
|
var t = {};
|
|
6746
7290
|
for (var e in r)
|
|
@@ -6753,6 +7297,14 @@ var en = {
|
|
|
6753
7297
|
}
|
|
6754
7298
|
return r.bbox && (t.bbox = en.bbox.apply(this, [r.bbox])), t;
|
|
6755
7299
|
},
|
|
7300
|
+
/**
|
|
7301
|
+
* Parse a GeoJSON FeatureCollection object
|
|
7302
|
+
*
|
|
7303
|
+
* @param {Object}
|
|
7304
|
+
* obj Object to parse.
|
|
7305
|
+
*
|
|
7306
|
+
* @return {Object} FeatureCollection with geometry/bbox converted to JSTS Geometries.
|
|
7307
|
+
*/
|
|
6756
7308
|
FeatureCollection: function(r) {
|
|
6757
7309
|
var t = this, e = {};
|
|
6758
7310
|
if (r.features) {
|
|
@@ -6762,6 +7314,14 @@ var en = {
|
|
|
6762
7314
|
}
|
|
6763
7315
|
return r.bbox && (e.bbox = this.parse.bbox.apply(this, [r.bbox])), e;
|
|
6764
7316
|
},
|
|
7317
|
+
/**
|
|
7318
|
+
* Convert the ordinates in an array to an array of Coordinates
|
|
7319
|
+
*
|
|
7320
|
+
* @param {Array}
|
|
7321
|
+
* array Array with {Number}s.
|
|
7322
|
+
*
|
|
7323
|
+
* @return {Array} Array with Coordinates.
|
|
7324
|
+
*/
|
|
6765
7325
|
coordinates: function(r) {
|
|
6766
7326
|
for (var t = [], e = 0; e < r.length; ++e) {
|
|
6767
7327
|
var n = r[e];
|
|
@@ -6769,6 +7329,14 @@ var en = {
|
|
|
6769
7329
|
}
|
|
6770
7330
|
return t;
|
|
6771
7331
|
},
|
|
7332
|
+
/**
|
|
7333
|
+
* Convert the bbox to a LinearRing
|
|
7334
|
+
*
|
|
7335
|
+
* @param {Array}
|
|
7336
|
+
* array Array with [xMin, yMin, xMax, yMax].
|
|
7337
|
+
*
|
|
7338
|
+
* @return {Array} Array with Coordinates.
|
|
7339
|
+
*/
|
|
6772
7340
|
bbox: function(r) {
|
|
6773
7341
|
return this.geometryFactory.createLinearRing([
|
|
6774
7342
|
new d(r[0], r[1]),
|
|
@@ -6778,24 +7346,64 @@ var en = {
|
|
|
6778
7346
|
new d(r[0], r[1])
|
|
6779
7347
|
]);
|
|
6780
7348
|
},
|
|
7349
|
+
/**
|
|
7350
|
+
* Convert an Array with ordinates to a Point
|
|
7351
|
+
*
|
|
7352
|
+
* @param {Array}
|
|
7353
|
+
* array Array with ordinates.
|
|
7354
|
+
*
|
|
7355
|
+
* @return {Point} Point.
|
|
7356
|
+
*/
|
|
6781
7357
|
Point: function(r) {
|
|
6782
7358
|
var t = new d(r[0], r[1]);
|
|
6783
7359
|
return this.geometryFactory.createPoint(t);
|
|
6784
7360
|
},
|
|
7361
|
+
/**
|
|
7362
|
+
* Convert an Array with coordinates to a MultiPoint
|
|
7363
|
+
*
|
|
7364
|
+
* @param {Array}
|
|
7365
|
+
* array Array with coordinates.
|
|
7366
|
+
*
|
|
7367
|
+
* @return {MultiPoint} MultiPoint.
|
|
7368
|
+
*/
|
|
6785
7369
|
MultiPoint: function(r) {
|
|
6786
7370
|
for (var t = this, e = [], n = 0; n < r.length; ++n)
|
|
6787
7371
|
e.push(en.Point.apply(t, [r[n]]));
|
|
6788
7372
|
return this.geometryFactory.createMultiPoint(e);
|
|
6789
7373
|
},
|
|
7374
|
+
/**
|
|
7375
|
+
* Convert an Array with coordinates to a LineString
|
|
7376
|
+
*
|
|
7377
|
+
* @param {Array}
|
|
7378
|
+
* array Array with coordinates.
|
|
7379
|
+
*
|
|
7380
|
+
* @return {LineString} LineString.
|
|
7381
|
+
*/
|
|
6790
7382
|
LineString: function(r) {
|
|
6791
7383
|
var t = en.coordinates.apply(this, [r]);
|
|
6792
7384
|
return this.geometryFactory.createLineString(t);
|
|
6793
7385
|
},
|
|
7386
|
+
/**
|
|
7387
|
+
* Convert an Array with coordinates to a MultiLineString
|
|
7388
|
+
*
|
|
7389
|
+
* @param {Array}
|
|
7390
|
+
* array Array with coordinates.
|
|
7391
|
+
*
|
|
7392
|
+
* @return {MultiLineString} MultiLineString.
|
|
7393
|
+
*/
|
|
6794
7394
|
MultiLineString: function(r) {
|
|
6795
7395
|
for (var t = this, e = [], n = 0; n < r.length; ++n)
|
|
6796
7396
|
e.push(en.LineString.apply(t, [r[n]]));
|
|
6797
7397
|
return this.geometryFactory.createMultiLineString(e);
|
|
6798
7398
|
},
|
|
7399
|
+
/**
|
|
7400
|
+
* Convert an Array to a Polygon
|
|
7401
|
+
*
|
|
7402
|
+
* @param {Array}
|
|
7403
|
+
* array Array with shell and holes.
|
|
7404
|
+
*
|
|
7405
|
+
* @return {Polygon} Polygon.
|
|
7406
|
+
*/
|
|
6799
7407
|
Polygon: function(r) {
|
|
6800
7408
|
for (var t = this, e = en.coordinates.apply(this, [r[0]]), n = this.geometryFactory.createLinearRing(e), i = [], o = 1; o < r.length; ++o) {
|
|
6801
7409
|
var s = r[o], a = en.coordinates.apply(t, [s]), u = t.geometryFactory.createLinearRing(a);
|
|
@@ -6803,6 +7411,14 @@ var en = {
|
|
|
6803
7411
|
}
|
|
6804
7412
|
return this.geometryFactory.createPolygon(n, i);
|
|
6805
7413
|
},
|
|
7414
|
+
/**
|
|
7415
|
+
* Convert an Array to a MultiPolygon
|
|
7416
|
+
*
|
|
7417
|
+
* @param {Array}
|
|
7418
|
+
* array Array of arrays with shell and rings.
|
|
7419
|
+
*
|
|
7420
|
+
* @return {MultiPolygon} MultiPolygon.
|
|
7421
|
+
*/
|
|
6806
7422
|
MultiPolygon: function(r) {
|
|
6807
7423
|
for (var t = this, e = [], n = 0; n < r.length; ++n) {
|
|
6808
7424
|
var i = r[n];
|
|
@@ -6810,6 +7426,14 @@ var en = {
|
|
|
6810
7426
|
}
|
|
6811
7427
|
return this.geometryFactory.createMultiPolygon(e);
|
|
6812
7428
|
},
|
|
7429
|
+
/**
|
|
7430
|
+
* Convert an Array to a GeometryCollection
|
|
7431
|
+
*
|
|
7432
|
+
* @param {Array}
|
|
7433
|
+
* array Array of GeoJSON geometries.
|
|
7434
|
+
*
|
|
7435
|
+
* @return {GeometryCollection} GeometryCollection.
|
|
7436
|
+
*/
|
|
6813
7437
|
GeometryCollection: function(r) {
|
|
6814
7438
|
for (var t = this, e = [], n = 0; n < r.length; ++n) {
|
|
6815
7439
|
var i = r[n];
|
|
@@ -6818,9 +7442,25 @@ var en = {
|
|
|
6818
7442
|
return this.geometryFactory.createGeometryCollection(e);
|
|
6819
7443
|
}
|
|
6820
7444
|
}, zn = {
|
|
7445
|
+
/**
|
|
7446
|
+
* Convert a Coordinate to an Array
|
|
7447
|
+
*
|
|
7448
|
+
* @param {Coordinate}
|
|
7449
|
+
* coordinate Coordinate to convert.
|
|
7450
|
+
*
|
|
7451
|
+
* @return {Array} Array of ordinates.
|
|
7452
|
+
*/
|
|
6821
7453
|
coordinate: function(r) {
|
|
6822
7454
|
return [r.x, r.y];
|
|
6823
7455
|
},
|
|
7456
|
+
/**
|
|
7457
|
+
* Convert a Point to a GeoJSON object
|
|
7458
|
+
*
|
|
7459
|
+
* @param {Point}
|
|
7460
|
+
* point Point to convert.
|
|
7461
|
+
*
|
|
7462
|
+
* @return {Array} Array of 2 ordinates (paired to a coordinate).
|
|
7463
|
+
*/
|
|
6824
7464
|
Point: function(r) {
|
|
6825
7465
|
var t = zn.coordinate.apply(this, [r.getCoordinate()]);
|
|
6826
7466
|
return {
|
|
@@ -6828,6 +7468,14 @@ var en = {
|
|
|
6828
7468
|
coordinates: t
|
|
6829
7469
|
};
|
|
6830
7470
|
},
|
|
7471
|
+
/**
|
|
7472
|
+
* Convert a MultiPoint to a GeoJSON object
|
|
7473
|
+
*
|
|
7474
|
+
* @param {MultiPoint}
|
|
7475
|
+
* multipoint MultiPoint to convert.
|
|
7476
|
+
*
|
|
7477
|
+
* @return {Array} Array of coordinates.
|
|
7478
|
+
*/
|
|
6831
7479
|
MultiPoint: function(r) {
|
|
6832
7480
|
for (var t = this, e = [], n = 0; n < r._geometries.length; ++n) {
|
|
6833
7481
|
var i = r._geometries[n], o = zn.Point.apply(t, [i]);
|
|
@@ -6838,6 +7486,14 @@ var en = {
|
|
|
6838
7486
|
coordinates: e
|
|
6839
7487
|
};
|
|
6840
7488
|
},
|
|
7489
|
+
/**
|
|
7490
|
+
* Convert a LineString to a GeoJSON object
|
|
7491
|
+
*
|
|
7492
|
+
* @param {LineString}
|
|
7493
|
+
* linestring LineString to convert.
|
|
7494
|
+
*
|
|
7495
|
+
* @return {Array} Array of coordinates.
|
|
7496
|
+
*/
|
|
6841
7497
|
LineString: function(r) {
|
|
6842
7498
|
for (var t = this, e = [], n = r.getCoordinates(), i = 0; i < n.length; ++i) {
|
|
6843
7499
|
var o = n[i];
|
|
@@ -6848,6 +7504,14 @@ var en = {
|
|
|
6848
7504
|
coordinates: e
|
|
6849
7505
|
};
|
|
6850
7506
|
},
|
|
7507
|
+
/**
|
|
7508
|
+
* Convert a MultiLineString to a GeoJSON object
|
|
7509
|
+
*
|
|
7510
|
+
* @param {MultiLineString}
|
|
7511
|
+
* multilinestring MultiLineString to convert.
|
|
7512
|
+
*
|
|
7513
|
+
* @return {Array} Array of Array of coordinates.
|
|
7514
|
+
*/
|
|
6851
7515
|
MultiLineString: function(r) {
|
|
6852
7516
|
for (var t = this, e = [], n = 0; n < r._geometries.length; ++n) {
|
|
6853
7517
|
var i = r._geometries[n], o = zn.LineString.apply(t, [i]);
|
|
@@ -6858,6 +7522,14 @@ var en = {
|
|
|
6858
7522
|
coordinates: e
|
|
6859
7523
|
};
|
|
6860
7524
|
},
|
|
7525
|
+
/**
|
|
7526
|
+
* Convert a Polygon to a GeoJSON object
|
|
7527
|
+
*
|
|
7528
|
+
* @param {Polygon}
|
|
7529
|
+
* polygon Polygon to convert.
|
|
7530
|
+
*
|
|
7531
|
+
* @return {Array} Array with shell, holes.
|
|
7532
|
+
*/
|
|
6861
7533
|
Polygon: function(r) {
|
|
6862
7534
|
var t = this, e = [], n = zn.LineString.apply(this, [r._shell]);
|
|
6863
7535
|
e.push(n.coordinates);
|
|
@@ -6870,6 +7542,14 @@ var en = {
|
|
|
6870
7542
|
coordinates: e
|
|
6871
7543
|
};
|
|
6872
7544
|
},
|
|
7545
|
+
/**
|
|
7546
|
+
* Convert a MultiPolygon to a GeoJSON object
|
|
7547
|
+
*
|
|
7548
|
+
* @param {MultiPolygon}
|
|
7549
|
+
* multipolygon MultiPolygon to convert.
|
|
7550
|
+
*
|
|
7551
|
+
* @return {Array} Array of polygons.
|
|
7552
|
+
*/
|
|
6873
7553
|
MultiPolygon: function(r) {
|
|
6874
7554
|
for (var t = this, e = [], n = 0; n < r._geometries.length; ++n) {
|
|
6875
7555
|
var i = r._geometries[n], o = zn.Polygon.apply(t, [i]);
|
|
@@ -6880,6 +7560,14 @@ var en = {
|
|
|
6880
7560
|
coordinates: e
|
|
6881
7561
|
};
|
|
6882
7562
|
},
|
|
7563
|
+
/**
|
|
7564
|
+
* Convert a GeometryCollection to a GeoJSON object
|
|
7565
|
+
*
|
|
7566
|
+
* @param {GeometryCollection}
|
|
7567
|
+
* collection GeometryCollection to convert.
|
|
7568
|
+
*
|
|
7569
|
+
* @return {Array} Array of geometries.
|
|
7570
|
+
*/
|
|
6883
7571
|
GeometryCollection: function(r) {
|
|
6884
7572
|
for (var t = this, e = [], n = 0; n < r._geometries.length; ++n) {
|
|
6885
7573
|
var i = r._geometries[n], o = i.getGeometryType();
|
|
@@ -14341,7 +15029,8 @@ function Vo() {
|
|
|
14341
15029
|
Vo.prototype = {
|
|
14342
15030
|
constructor: Vo,
|
|
14343
15031
|
reset: function() {
|
|
14344
|
-
this.s =
|
|
15032
|
+
this.s = // rounded value
|
|
15033
|
+
this.t = 0;
|
|
14345
15034
|
},
|
|
14346
15035
|
add: function(r) {
|
|
14347
15036
|
Sa(Co, r, this.t), Sa(this, Co.s, this.s), this.s ? this.t += Co.t : this.s = Co.t;
|
|
@@ -14898,6 +15587,8 @@ function Hc(r, t) {
|
|
|
14898
15587
|
lineEnd: function() {
|
|
14899
15588
|
g && c.lineEnd(), f = null;
|
|
14900
15589
|
},
|
|
15590
|
+
// Rejoin first and last segments if there were intersections and the first
|
|
15591
|
+
// and last points were visible.
|
|
14901
15592
|
clean: function() {
|
|
14902
15593
|
return v | (p && g) << 1;
|
|
14903
15594
|
}
|