@macrostrat/map-interface 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +112 -99
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +51 -34
- package/dist/index.css.map +1 -1
- package/dist/index.js +112 -99
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +12 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -2
- package/src/container.ts +17 -10
- package/src/dev/vector-tile-features.ts +22 -18
- package/src/expansion-panel/index.ts +1 -0
- package/src/expansion-panel/main.module.sass +3 -3
- package/src/location-panel/main.module.sass +3 -0
- package/src/main.module.sass +87 -82
- package/src/map-view/index.ts +49 -27
- package/src/map-view/main.module.sass +7 -0
package/dist/index.cjs
CHANGED
|
@@ -12,6 +12,7 @@ var $9B3TU$chromajs = require("chroma-js");
|
|
|
12
12
|
var $9B3TU$transitionhook = require("transition-hook");
|
|
13
13
|
var $9B3TU$underscore = require("underscore");
|
|
14
14
|
var $9B3TU$useresizeobserver = require("use-resize-observer");
|
|
15
|
+
require("mapbox-gl/dist/mapbox-gl.css");
|
|
15
16
|
var $9B3TU$mapboxtilebelt = require("@mapbox/tilebelt");
|
|
16
17
|
var $9B3TU$d3array = require("d3-array");
|
|
17
18
|
|
|
@@ -48,17 +49,17 @@ $parcel$export($fce5fc950d1fe35b$exports, "FloatingNavbar", () => $fce5fc950d1fe
|
|
|
48
49
|
var $7a1b0f72a2e7f87d$exports = {};
|
|
49
50
|
|
|
50
51
|
$parcel$export($7a1b0f72a2e7f87d$exports, "navbar-holder", () => $7a1b0f72a2e7f87d$export$d8779dd86528d602, (v) => $7a1b0f72a2e7f87d$export$d8779dd86528d602 = v);
|
|
51
|
-
$parcel$export($7a1b0f72a2e7f87d$exports, "status-tongue", () => $7a1b0f72a2e7f87d$export$764ade2d69041360, (v) => $7a1b0f72a2e7f87d$export$764ade2d69041360 = v);
|
|
52
|
-
$parcel$export($7a1b0f72a2e7f87d$exports, "searchbar-holder", () => $7a1b0f72a2e7f87d$export$3a39e67bbbcbd4ae, (v) => $7a1b0f72a2e7f87d$export$3a39e67bbbcbd4ae = v);
|
|
53
52
|
$parcel$export($7a1b0f72a2e7f87d$exports, "searchbar", () => $7a1b0f72a2e7f87d$export$2ac23befe9d406ee, (v) => $7a1b0f72a2e7f87d$export$2ac23befe9d406ee = v);
|
|
53
|
+
$parcel$export($7a1b0f72a2e7f87d$exports, "searchbar-holder", () => $7a1b0f72a2e7f87d$export$3a39e67bbbcbd4ae, (v) => $7a1b0f72a2e7f87d$export$3a39e67bbbcbd4ae = v);
|
|
54
|
+
$parcel$export($7a1b0f72a2e7f87d$exports, "status-tongue", () => $7a1b0f72a2e7f87d$export$764ade2d69041360, (v) => $7a1b0f72a2e7f87d$export$764ade2d69041360 = v);
|
|
54
55
|
var $7a1b0f72a2e7f87d$export$d8779dd86528d602;
|
|
55
|
-
var $7a1b0f72a2e7f87d$export$764ade2d69041360;
|
|
56
|
-
var $7a1b0f72a2e7f87d$export$3a39e67bbbcbd4ae;
|
|
57
56
|
var $7a1b0f72a2e7f87d$export$2ac23befe9d406ee;
|
|
57
|
+
var $7a1b0f72a2e7f87d$export$3a39e67bbbcbd4ae;
|
|
58
|
+
var $7a1b0f72a2e7f87d$export$764ade2d69041360;
|
|
58
59
|
$7a1b0f72a2e7f87d$export$d8779dd86528d602 = `_8hZKsW_navbar-holder`;
|
|
59
|
-
$7a1b0f72a2e7f87d$export$764ade2d69041360 = `_8hZKsW_status-tongue`;
|
|
60
|
-
$7a1b0f72a2e7f87d$export$3a39e67bbbcbd4ae = `_8hZKsW_searchbar-holder`;
|
|
61
60
|
$7a1b0f72a2e7f87d$export$2ac23befe9d406ee = `_8hZKsW_searchbar`;
|
|
61
|
+
$7a1b0f72a2e7f87d$export$3a39e67bbbcbd4ae = `_8hZKsW_searchbar-holder`;
|
|
62
|
+
$7a1b0f72a2e7f87d$export$764ade2d69041360 = `_8hZKsW_status-tongue`;
|
|
62
63
|
|
|
63
64
|
|
|
64
65
|
|
|
@@ -111,33 +112,36 @@ $parcel$export($2bc7c1e4e7da7fdf$exports, "LocationPanel", () => $2bc7c1e4e7da7f
|
|
|
111
112
|
|
|
112
113
|
var $a8d7c4c397e52cf6$exports = {};
|
|
113
114
|
|
|
114
|
-
$parcel$export($a8d7c4c397e52cf6$exports, "
|
|
115
|
-
$parcel$export($a8d7c4c397e52cf6$exports, "copy-link-button", () => $a8d7c4c397e52cf6$export$d1352d0c31a65024, (v) => $a8d7c4c397e52cf6$export$d1352d0c31a65024 = v);
|
|
115
|
+
$parcel$export($a8d7c4c397e52cf6$exports, "left-icon", () => $a8d7c4c397e52cf6$export$f750577db09821ce, (v) => $a8d7c4c397e52cf6$export$f750577db09821ce = v);
|
|
116
116
|
$parcel$export($a8d7c4c397e52cf6$exports, "infodrawer-header-item", () => $a8d7c4c397e52cf6$export$333d72514239bce8, (v) => $a8d7c4c397e52cf6$export$333d72514239bce8 = v);
|
|
117
|
+
$parcel$export($a8d7c4c397e52cf6$exports, "spacer", () => $a8d7c4c397e52cf6$export$8cc075c801fd6817, (v) => $a8d7c4c397e52cf6$export$8cc075c801fd6817 = v);
|
|
117
118
|
$parcel$export($a8d7c4c397e52cf6$exports, "infodrawer", () => $a8d7c4c397e52cf6$export$b5017f7ff265217d, (v) => $a8d7c4c397e52cf6$export$b5017f7ff265217d = v);
|
|
118
|
-
$parcel$export($a8d7c4c397e52cf6$exports, "
|
|
119
|
+
$parcel$export($a8d7c4c397e52cf6$exports, "copy-link-button", () => $a8d7c4c397e52cf6$export$d1352d0c31a65024, (v) => $a8d7c4c397e52cf6$export$d1352d0c31a65024 = v);
|
|
119
120
|
$parcel$export($a8d7c4c397e52cf6$exports, "loading", () => $a8d7c4c397e52cf6$export$46c1c92549715335, (v) => $a8d7c4c397e52cf6$export$46c1c92549715335 = v);
|
|
120
|
-
$parcel$export($a8d7c4c397e52cf6$exports, "spacer", () => $a8d7c4c397e52cf6$export$8cc075c801fd6817, (v) => $a8d7c4c397e52cf6$export$8cc075c801fd6817 = v);
|
|
121
|
-
$parcel$export($a8d7c4c397e52cf6$exports, "position-controls", () => $a8d7c4c397e52cf6$export$dfae07a3bf0fbd6, (v) => $a8d7c4c397e52cf6$export$dfae07a3bf0fbd6 = v);
|
|
122
121
|
$parcel$export($a8d7c4c397e52cf6$exports, "location-panel-header", () => $a8d7c4c397e52cf6$export$d821beb98a87c6d7, (v) => $a8d7c4c397e52cf6$export$d821beb98a87c6d7 = v);
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
$parcel$export($a8d7c4c397e52cf6$exports, "infodrawer-contents", () => $a8d7c4c397e52cf6$export$69ed3ba502fbf15b, (v) => $a8d7c4c397e52cf6$export$69ed3ba502fbf15b = v);
|
|
123
|
+
$parcel$export($a8d7c4c397e52cf6$exports, "position-controls", () => $a8d7c4c397e52cf6$export$dfae07a3bf0fbd6, (v) => $a8d7c4c397e52cf6$export$dfae07a3bf0fbd6 = v);
|
|
124
|
+
$parcel$export($a8d7c4c397e52cf6$exports, "infodrawer-body", () => $a8d7c4c397e52cf6$export$310e8f86a84c074f, (v) => $a8d7c4c397e52cf6$export$310e8f86a84c074f = v);
|
|
125
|
+
var $a8d7c4c397e52cf6$export$f750577db09821ce;
|
|
125
126
|
var $a8d7c4c397e52cf6$export$333d72514239bce8;
|
|
127
|
+
var $a8d7c4c397e52cf6$export$8cc075c801fd6817;
|
|
126
128
|
var $a8d7c4c397e52cf6$export$b5017f7ff265217d;
|
|
127
|
-
var $a8d7c4c397e52cf6$export$
|
|
129
|
+
var $a8d7c4c397e52cf6$export$d1352d0c31a65024;
|
|
128
130
|
var $a8d7c4c397e52cf6$export$46c1c92549715335;
|
|
129
|
-
var $a8d7c4c397e52cf6$export$8cc075c801fd6817;
|
|
130
|
-
var $a8d7c4c397e52cf6$export$dfae07a3bf0fbd6;
|
|
131
131
|
var $a8d7c4c397e52cf6$export$d821beb98a87c6d7;
|
|
132
|
-
$a8d7c4c397e52cf6$export$
|
|
133
|
-
$a8d7c4c397e52cf6$export$
|
|
132
|
+
var $a8d7c4c397e52cf6$export$69ed3ba502fbf15b;
|
|
133
|
+
var $a8d7c4c397e52cf6$export$dfae07a3bf0fbd6;
|
|
134
|
+
var $a8d7c4c397e52cf6$export$310e8f86a84c074f;
|
|
135
|
+
$a8d7c4c397e52cf6$export$f750577db09821ce = `VPa3-W_left-icon`;
|
|
134
136
|
$a8d7c4c397e52cf6$export$333d72514239bce8 = `VPa3-W_infodrawer-header-item`;
|
|
137
|
+
$a8d7c4c397e52cf6$export$8cc075c801fd6817 = `VPa3-W_spacer`;
|
|
135
138
|
$a8d7c4c397e52cf6$export$b5017f7ff265217d = `VPa3-W_infodrawer`;
|
|
136
|
-
$a8d7c4c397e52cf6$export$
|
|
139
|
+
$a8d7c4c397e52cf6$export$d1352d0c31a65024 = `VPa3-W_copy-link-button`;
|
|
137
140
|
$a8d7c4c397e52cf6$export$46c1c92549715335 = `VPa3-W_loading`;
|
|
138
|
-
$a8d7c4c397e52cf6$export$8cc075c801fd6817 = `VPa3-W_spacer`;
|
|
139
|
-
$a8d7c4c397e52cf6$export$dfae07a3bf0fbd6 = `VPa3-W_position-controls`;
|
|
140
141
|
$a8d7c4c397e52cf6$export$d821beb98a87c6d7 = `VPa3-W_location-panel-header`;
|
|
142
|
+
$a8d7c4c397e52cf6$export$69ed3ba502fbf15b = `VPa3-W_infodrawer-contents`;
|
|
143
|
+
$a8d7c4c397e52cf6$export$dfae07a3bf0fbd6 = `VPa3-W_position-controls`;
|
|
144
|
+
$a8d7c4c397e52cf6$export$310e8f86a84c074f = `VPa3-W_infodrawer-body`;
|
|
141
145
|
|
|
142
146
|
|
|
143
147
|
|
|
@@ -502,14 +506,12 @@ $parcel$export($35f1bc0112883d51$exports, "map-scale-control", () => $35f1bc0112
|
|
|
502
506
|
$parcel$export($35f1bc0112883d51$exports, "detail-panel-enter", () => $35f1bc0112883d51$export$e017ebf46ba443ed, (v) => $35f1bc0112883d51$export$e017ebf46ba443ed = v);
|
|
503
507
|
$parcel$export($35f1bc0112883d51$exports, "infodrawer-stack", () => $35f1bc0112883d51$export$69fa1b5d46c139b9, (v) => $35f1bc0112883d51$export$69fa1b5d46c139b9 = v);
|
|
504
508
|
$parcel$export($35f1bc0112883d51$exports, "detail-panel", () => $35f1bc0112883d51$export$c6930745f2610de0, (v) => $35f1bc0112883d51$export$c6930745f2610de0 = v);
|
|
505
|
-
$parcel$export($35f1bc0112883d51$exports, "panel-
|
|
506
|
-
$parcel$export($35f1bc0112883d51$exports, "layers", () => $35f1bc0112883d51$export$7be255094ccdc533, (v) => $35f1bc0112883d51$export$7be255094ccdc533 = v);
|
|
507
|
-
$parcel$export($35f1bc0112883d51$exports, "settings", () => $35f1bc0112883d51$export$a5a6e0b888b2c992, (v) => $35f1bc0112883d51$export$a5a6e0b888b2c992 = v);
|
|
509
|
+
$parcel$export($35f1bc0112883d51$exports, "context-panel-holder", () => $35f1bc0112883d51$export$1113ec858cdbc244, (v) => $35f1bc0112883d51$export$1113ec858cdbc244 = v);
|
|
508
510
|
$parcel$export($35f1bc0112883d51$exports, "detail-panel-from", () => $35f1bc0112883d51$export$419647d5ce4279cb, (v) => $35f1bc0112883d51$export$419647d5ce4279cb = v);
|
|
509
511
|
$parcel$export($35f1bc0112883d51$exports, "detail-panel-leave", () => $35f1bc0112883d51$export$1d0f1d0b062c3bee, (v) => $35f1bc0112883d51$export$1d0f1d0b062c3bee = v);
|
|
510
|
-
$parcel$export($35f1bc0112883d51$exports, "context-panel", () => $35f1bc0112883d51$export$b4dbb67ffc3cc7a9, (v) => $35f1bc0112883d51$export$b4dbb67ffc3cc7a9 = v);
|
|
511
512
|
$parcel$export($35f1bc0112883d51$exports, "context-panel-from", () => $35f1bc0112883d51$export$90f42dafd5c24d2d, (v) => $35f1bc0112883d51$export$90f42dafd5c24d2d = v);
|
|
512
513
|
$parcel$export($35f1bc0112883d51$exports, "context-panel-enter", () => $35f1bc0112883d51$export$9ea3835d1b44cc08, (v) => $35f1bc0112883d51$export$9ea3835d1b44cc08 = v);
|
|
514
|
+
$parcel$export($35f1bc0112883d51$exports, "context-panel", () => $35f1bc0112883d51$export$b4dbb67ffc3cc7a9, (v) => $35f1bc0112883d51$export$b4dbb67ffc3cc7a9 = v);
|
|
513
515
|
var $35f1bc0112883d51$export$5ec584901c06c5b9;
|
|
514
516
|
var $35f1bc0112883d51$export$2a73fca7b70dce31;
|
|
515
517
|
var $35f1bc0112883d51$export$cc73204c64cc0950;
|
|
@@ -549,14 +551,12 @@ var $35f1bc0112883d51$export$b56f659d649f0d92;
|
|
|
549
551
|
var $35f1bc0112883d51$export$e017ebf46ba443ed;
|
|
550
552
|
var $35f1bc0112883d51$export$69fa1b5d46c139b9;
|
|
551
553
|
var $35f1bc0112883d51$export$c6930745f2610de0;
|
|
552
|
-
var $35f1bc0112883d51$export$
|
|
553
|
-
var $35f1bc0112883d51$export$7be255094ccdc533;
|
|
554
|
-
var $35f1bc0112883d51$export$a5a6e0b888b2c992;
|
|
554
|
+
var $35f1bc0112883d51$export$1113ec858cdbc244;
|
|
555
555
|
var $35f1bc0112883d51$export$419647d5ce4279cb;
|
|
556
556
|
var $35f1bc0112883d51$export$1d0f1d0b062c3bee;
|
|
557
|
-
var $35f1bc0112883d51$export$b4dbb67ffc3cc7a9;
|
|
558
557
|
var $35f1bc0112883d51$export$90f42dafd5c24d2d;
|
|
559
558
|
var $35f1bc0112883d51$export$9ea3835d1b44cc08;
|
|
559
|
+
var $35f1bc0112883d51$export$b4dbb67ffc3cc7a9;
|
|
560
560
|
$35f1bc0112883d51$export$5ec584901c06c5b9 = "map-page_4c0a66";
|
|
561
561
|
$35f1bc0112883d51$export$2a73fca7b70dce31 = "fit-viewport_4c0a66";
|
|
562
562
|
$35f1bc0112883d51$export$cc73204c64cc0950 = "compass-control_4c0a66";
|
|
@@ -596,14 +596,12 @@ $35f1bc0112883d51$export$b56f659d649f0d92 = "map-scale-control_4c0a66";
|
|
|
596
596
|
$35f1bc0112883d51$export$e017ebf46ba443ed = "detail-panel-enter_4c0a66";
|
|
597
597
|
$35f1bc0112883d51$export$69fa1b5d46c139b9 = "infodrawer-stack_4c0a66";
|
|
598
598
|
$35f1bc0112883d51$export$c6930745f2610de0 = "detail-panel_4c0a66";
|
|
599
|
-
$35f1bc0112883d51$export$
|
|
600
|
-
$35f1bc0112883d51$export$7be255094ccdc533 = "layers_4c0a66";
|
|
601
|
-
$35f1bc0112883d51$export$a5a6e0b888b2c992 = "settings_4c0a66";
|
|
599
|
+
$35f1bc0112883d51$export$1113ec858cdbc244 = "context-panel-holder_4c0a66";
|
|
602
600
|
$35f1bc0112883d51$export$419647d5ce4279cb = "detail-panel-from_4c0a66";
|
|
603
601
|
$35f1bc0112883d51$export$1d0f1d0b062c3bee = "detail-panel-leave_4c0a66";
|
|
604
|
-
$35f1bc0112883d51$export$b4dbb67ffc3cc7a9 = "context-panel_4c0a66";
|
|
605
602
|
$35f1bc0112883d51$export$90f42dafd5c24d2d = "context-panel-from_4c0a66";
|
|
606
603
|
$35f1bc0112883d51$export$9ea3835d1b44cc08 = "context-panel-enter_4c0a66";
|
|
604
|
+
$35f1bc0112883d51$export$b4dbb67ffc3cc7a9 = "context-panel_4c0a66";
|
|
607
605
|
|
|
608
606
|
|
|
609
607
|
|
|
@@ -687,25 +685,28 @@ function $c3311f59335df34d$var$_MapAreaContainer({ children: children , classNam
|
|
|
687
685
|
the search bar on mobile platforms
|
|
688
686
|
- These styles are doubly applied so we can have both namespaced and
|
|
689
687
|
outside-accessible styles for each case.
|
|
690
|
-
*/ const
|
|
691
|
-
searching: false,
|
|
688
|
+
*/ const mainUIClassName = (0, ($parcel$interopDefault($9B3TU$classnames)))({
|
|
692
689
|
"detail-panel-open": _detailPanelOpen,
|
|
693
|
-
"map-context-open":
|
|
694
|
-
"fit-viewport": fitViewport
|
|
690
|
+
"map-context-open": contextPanelOpen
|
|
695
691
|
}, `context-panel-${contextPanelTrans.stage}`, `map-context-${contextPanelTrans.stage}`, `detail-panel-${detailPanelTrans.stage}`, `map-detail-${detailPanelTrans.stage}`);
|
|
696
692
|
return $c3311f59335df34d$var$h($c3311f59335df34d$export$fa395a37c3898ae3, {
|
|
697
|
-
className: (0, ($parcel$interopDefault($9B3TU$classnames)))("map-page", className
|
|
693
|
+
className: (0, ($parcel$interopDefault($9B3TU$classnames)))("map-page", className, {
|
|
694
|
+
"fit-viewport": fitViewport
|
|
695
|
+
}),
|
|
698
696
|
mapPosition: mapPosition
|
|
699
697
|
}, [
|
|
700
698
|
$c3311f59335df34d$var$h("div.main-ui", {
|
|
701
|
-
className:
|
|
699
|
+
className: mainUIClassName,
|
|
702
700
|
...rest
|
|
703
701
|
}, [
|
|
704
|
-
$c3311f59335df34d$var$h("div.context-stack",
|
|
702
|
+
$c3311f59335df34d$var$h("div.context-stack", [
|
|
705
703
|
navbar,
|
|
706
|
-
$c3311f59335df34d$var$h
|
|
707
|
-
|
|
708
|
-
|
|
704
|
+
$c3311f59335df34d$var$h("div.context-panel-holder", [
|
|
705
|
+
$c3311f59335df34d$var$h.if(contextPanelTrans.shouldMount)([
|
|
706
|
+
contextPanel
|
|
707
|
+
]),
|
|
708
|
+
]),
|
|
709
|
+
$c3311f59335df34d$var$h("div.spacer"),
|
|
709
710
|
]),
|
|
710
711
|
//h(MapView),
|
|
711
712
|
children ?? mainPanel,
|
|
@@ -724,7 +725,7 @@ function $c3311f59335df34d$var$_MapAreaContainer({ children: children , classNam
|
|
|
724
725
|
const $c3311f59335df34d$var$MapProviders = ({ children: children })=>$c3311f59335df34d$var$h((0, $9B3TU$macrostratuicomponents.ToasterContext), $c3311f59335df34d$var$h((0, $9B3TU$macrostratmapboxreact.MapboxMapProvider), children));
|
|
725
726
|
const $c3311f59335df34d$export$9fa5da0bcfd0a290 = (props)=>$c3311f59335df34d$var$h($c3311f59335df34d$var$MapProviders, $c3311f59335df34d$var$h($c3311f59335df34d$var$_MapAreaContainer, props));
|
|
726
727
|
function $c3311f59335df34d$export$fa395a37c3898ae3({ className: className , children: children }) {
|
|
727
|
-
const
|
|
728
|
+
const mapPosition = (0, $9B3TU$macrostratmapboxreact.useMapPosition)();
|
|
728
729
|
if (mapPosition != null) {
|
|
729
730
|
const { mapIsRotated: mapIsRotated , mapUse3D: mapUse3D , mapIsGlobal: mapIsGlobal } = (0, $9B3TU$macrostratmapboxutils.mapViewInfo)(mapPosition);
|
|
730
731
|
className = (0, ($parcel$interopDefault($9B3TU$classnames)))(className, {
|
|
@@ -949,8 +950,11 @@ $parcel$export($12b6032029db16d4$exports, "MapTerrainManager", () => $12b6032029
|
|
|
949
950
|
var $094b46e231302b09$exports = {};
|
|
950
951
|
|
|
951
952
|
$parcel$export($094b46e231302b09$exports, "map-view-container", () => $094b46e231302b09$export$11aa7dc57218208d, (v) => $094b46e231302b09$export$11aa7dc57218208d = v);
|
|
953
|
+
$parcel$export($094b46e231302b09$exports, "mapbox-map", () => $094b46e231302b09$export$d0dcaf774d09fc4c, (v) => $094b46e231302b09$export$d0dcaf774d09fc4c = v);
|
|
952
954
|
var $094b46e231302b09$export$11aa7dc57218208d;
|
|
955
|
+
var $094b46e231302b09$export$d0dcaf774d09fc4c;
|
|
953
956
|
$094b46e231302b09$export$11aa7dc57218208d = `-mD4Aa_map-view-container`;
|
|
957
|
+
$094b46e231302b09$export$d0dcaf774d09fc4c = `-mD4Aa_mapbox-map`;
|
|
954
958
|
|
|
955
959
|
|
|
956
960
|
|
|
@@ -1004,11 +1008,13 @@ function $ecfbeec2ae4211a4$var$getTerrainSourceID(map) {
|
|
|
1004
1008
|
|
|
1005
1009
|
|
|
1006
1010
|
|
|
1011
|
+
|
|
1007
1012
|
const $12b6032029db16d4$var$h = (0, ($parcel$interopDefault($9B3TU$macrostrathyper))).styled({
|
|
1008
1013
|
...(0, (/*@__PURE__*/$parcel$interopDefault($094b46e231302b09$exports))),
|
|
1009
1014
|
...(0, (/*@__PURE__*/$parcel$interopDefault($35f1bc0112883d51$exports)))
|
|
1010
1015
|
});
|
|
1011
|
-
function $12b6032029db16d4$var$
|
|
1016
|
+
function $12b6032029db16d4$var$defaultInitializeMap(container, args = {}) {
|
|
1017
|
+
const { mapPosition: mapPosition , ...rest } = args;
|
|
1012
1018
|
const map = new (0, ($parcel$interopDefault($9B3TU$mapboxgl))).Map({
|
|
1013
1019
|
container: container,
|
|
1014
1020
|
maxZoom: 18,
|
|
@@ -1017,8 +1023,10 @@ function $12b6032029db16d4$var$initializeMap(container, args = {}) {
|
|
|
1017
1023
|
trackResize: true,
|
|
1018
1024
|
antialias: true,
|
|
1019
1025
|
optimizeForTerrain: true,
|
|
1020
|
-
...
|
|
1026
|
+
...rest
|
|
1021
1027
|
});
|
|
1028
|
+
// set initial map position
|
|
1029
|
+
if (mapPosition != null) (0, $9B3TU$macrostratmapboxutils.setMapPosition)(map, mapPosition);
|
|
1022
1030
|
//setMapPosition(map, mapPosition);
|
|
1023
1031
|
return map;
|
|
1024
1032
|
}
|
|
@@ -1031,7 +1039,7 @@ const $12b6032029db16d4$var$defaultMapPosition = {
|
|
|
1031
1039
|
};
|
|
1032
1040
|
function $12b6032029db16d4$export$ab1e7a67d6ec5ad8(props) {
|
|
1033
1041
|
let { terrainSourceID: terrainSourceID } = props;
|
|
1034
|
-
const { enableTerrain: enableTerrain = true , style: style ,
|
|
1042
|
+
const { enableTerrain: enableTerrain = true , style: style , mapPosition: mapPosition = $12b6032029db16d4$var$defaultMapPosition , initializeMap: initializeMap = $12b6032029db16d4$var$defaultInitializeMap , children: children , accessToken: accessToken , infoMarkerPosition: infoMarkerPosition , transformRequest: transformRequest , projection: projection , onMapLoaded: onMapLoaded = null , onStyleLoaded: onStyleLoaded = null , ...rest } = props;
|
|
1035
1043
|
if (enableTerrain) terrainSourceID ??= "mapbox-3d-dem";
|
|
1036
1044
|
if (accessToken != null) (0, ($parcel$interopDefault($9B3TU$mapboxgl))).accessToken = accessToken;
|
|
1037
1045
|
const dispatch = (0, $9B3TU$macrostratmapboxreact.useMapDispatch)();
|
|
@@ -1040,47 +1048,45 @@ function $12b6032029db16d4$export$ab1e7a67d6ec5ad8(props) {
|
|
|
1040
1048
|
const parentRef = (0, $9B3TU$react.useRef)();
|
|
1041
1049
|
// Keep track of map position for reloads
|
|
1042
1050
|
(0, $9B3TU$react.useEffect)(()=>{
|
|
1043
|
-
if (style == null
|
|
1044
|
-
if (mapRef
|
|
1045
|
-
|
|
1046
|
-
|
|
1051
|
+
if (style == null) return;
|
|
1052
|
+
if (mapRef.current != null) {
|
|
1053
|
+
console.log("Setting style", style);
|
|
1054
|
+
mapRef.current.setStyle(style);
|
|
1055
|
+
return;
|
|
1056
|
+
}
|
|
1057
|
+
const map = initializeMap(ref.current, {
|
|
1047
1058
|
style: style,
|
|
1048
|
-
|
|
1049
|
-
|
|
1059
|
+
projection: projection,
|
|
1060
|
+
mapPosition: mapPosition,
|
|
1061
|
+
...rest
|
|
1062
|
+
});
|
|
1063
|
+
map.on("style.load", ()=>{
|
|
1064
|
+
onStyleLoaded?.(map);
|
|
1065
|
+
dispatch({
|
|
1066
|
+
type: "set-style-loaded",
|
|
1067
|
+
payload: true
|
|
1068
|
+
});
|
|
1050
1069
|
});
|
|
1070
|
+
onMapLoaded?.(map);
|
|
1051
1071
|
dispatch({
|
|
1052
1072
|
type: "set-map",
|
|
1053
1073
|
payload: map
|
|
1054
1074
|
});
|
|
1055
|
-
console.log("Map initialized");
|
|
1056
|
-
return ()=>{
|
|
1057
|
-
map.remove();
|
|
1058
|
-
dispatch({
|
|
1059
|
-
type: "set-map",
|
|
1060
|
-
payload: null
|
|
1061
|
-
});
|
|
1062
|
-
};
|
|
1063
1075
|
}, [
|
|
1064
|
-
transformRequest,
|
|
1065
|
-
dispatch,
|
|
1066
1076
|
style
|
|
1067
1077
|
]);
|
|
1068
1078
|
// Map style updating
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
}, [
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
(
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
}, [
|
|
1081
|
-
mapRef.current
|
|
1082
|
-
]);
|
|
1083
|
-
const { mapPosition: _computedMapPosition } = (0, $9B3TU$macrostratmapboxreact.useMapStatus)();
|
|
1079
|
+
// useEffect(() => {
|
|
1080
|
+
// if (mapRef?.current == null || style == null) return;
|
|
1081
|
+
// mapRef?.current?.setStyle(style);
|
|
1082
|
+
// }, [mapRef.current, style]);
|
|
1083
|
+
// Set map position if it changes
|
|
1084
|
+
// useEffect(() => {
|
|
1085
|
+
// const map = mapRef.current;
|
|
1086
|
+
// if (map == null || mapPosition == null) return;
|
|
1087
|
+
// setMapPosition(map, mapPosition);
|
|
1088
|
+
// }, [mapPosition]);
|
|
1089
|
+
const _computedMapPosition = (0, $9B3TU$macrostratmapboxreact.useMapPosition)();
|
|
1084
1090
|
const { mapUse3D: mapUse3D , mapIsRotated: mapIsRotated } = (0, $9B3TU$macrostratmapboxutils.mapViewInfo)(_computedMapPosition);
|
|
1085
1091
|
// Get map projection
|
|
1086
1092
|
const _projection = mapRef.current?.getProjection()?.name ?? "mercator";
|
|
@@ -1219,8 +1225,10 @@ function $abbe8d0af34cbbed$export$86c09739b12f23cd({ tile: tile , color: color =
|
|
|
1219
1225
|
|
|
1220
1226
|
var $db14eb7a5c07abdb$exports = {};
|
|
1221
1227
|
|
|
1228
|
+
$parcel$export($db14eb7a5c07abdb$exports, "FeatureProperties", () => $db14eb7a5c07abdb$export$2906e7f4b228efe9);
|
|
1222
1229
|
$parcel$export($db14eb7a5c07abdb$exports, "FeatureRecord", () => $db14eb7a5c07abdb$export$dc87b4d46cea200d);
|
|
1223
1230
|
$parcel$export($db14eb7a5c07abdb$exports, "FeatureSelectionHandler", () => $db14eb7a5c07abdb$export$214daccdda0f4ac6);
|
|
1231
|
+
$parcel$export($db14eb7a5c07abdb$exports, "Features", () => $db14eb7a5c07abdb$export$617d79dae526d2cf);
|
|
1224
1232
|
$parcel$export($db14eb7a5c07abdb$exports, "TileInfo", () => $db14eb7a5c07abdb$export$43c75dec9d0b96c);
|
|
1225
1233
|
$parcel$export($db14eb7a5c07abdb$exports, "FeaturePanel", () => $db14eb7a5c07abdb$export$43277c51a01761c1);
|
|
1226
1234
|
|
|
@@ -1238,6 +1246,7 @@ $parcel$export($750d69d73bfbdc9a$exports, "ExpansionPanel", () => $750d69d73bfbd
|
|
|
1238
1246
|
$parcel$export($750d69d73bfbdc9a$exports, "SubExpansionPanel", () => $750d69d73bfbdc9a$export$d7160281aff7c3b8);
|
|
1239
1247
|
$parcel$export($750d69d73bfbdc9a$exports, "ExpandableDetailsPanel", () => $750d69d73bfbdc9a$export$44ad9ff780615135);
|
|
1240
1248
|
$parcel$export($750d69d73bfbdc9a$exports, "ExpansionBody", () => $750d69d73bfbdc9a$export$263416b670b3f129);
|
|
1249
|
+
$parcel$export($750d69d73bfbdc9a$exports, "PanelSubhead", () => $a0970d22776f9f4c$export$ed081779ec3709aa);
|
|
1241
1250
|
|
|
1242
1251
|
|
|
1243
1252
|
|
|
@@ -1416,28 +1425,27 @@ function $750d69d73bfbdc9a$export$263416b670b3f129({ title: title , className: c
|
|
|
1416
1425
|
|
|
1417
1426
|
|
|
1418
1427
|
const $db14eb7a5c07abdb$var$h = (0, ($parcel$interopDefault($9B3TU$macrostrathyper))).styled((0, (/*@__PURE__*/$parcel$interopDefault($33088e8384af337c$exports))));
|
|
1419
|
-
function $db14eb7a5c07abdb$
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1428
|
+
function $db14eb7a5c07abdb$export$2906e7f4b228efe9({ data: data , ...rest }) {
|
|
1429
|
+
return $db14eb7a5c07abdb$var$h("div.feature-properties", [
|
|
1430
|
+
$db14eb7a5c07abdb$var$h((0, $9B3TU$macrostratuicomponents.JSONView), {
|
|
1431
|
+
data: data,
|
|
1432
|
+
hideRoot: true,
|
|
1433
|
+
...rest
|
|
1434
|
+
}),
|
|
1435
|
+
]);
|
|
1425
1436
|
}
|
|
1426
1437
|
function $db14eb7a5c07abdb$export$dc87b4d46cea200d({ feature: feature }) {
|
|
1427
1438
|
const props = feature.properties;
|
|
1428
1439
|
return $db14eb7a5c07abdb$var$h("div.feature-record", [
|
|
1429
|
-
$db14eb7a5c07abdb$var$h.if(Object.keys(props).length > 0)(
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
hideRoot: true
|
|
1433
|
-
}),
|
|
1434
|
-
]),
|
|
1440
|
+
$db14eb7a5c07abdb$var$h.if(Object.keys(props).length > 0)($db14eb7a5c07abdb$export$2906e7f4b228efe9, {
|
|
1441
|
+
data: props
|
|
1442
|
+
}),
|
|
1435
1443
|
]);
|
|
1436
1444
|
}
|
|
1437
1445
|
function $db14eb7a5c07abdb$export$214daccdda0f4ac6({ selectedLocation: selectedLocation , setFeatures: setFeatures , radius: radius = 2 }) {
|
|
1438
1446
|
const mapRef = (0, $9B3TU$macrostratmapboxreact.useMapRef)();
|
|
1439
1447
|
const { isLoading: isLoading } = (0, $9B3TU$macrostratmapboxreact.useMapStatus)();
|
|
1440
|
-
const prevLocation = $
|
|
1448
|
+
const prevLocation = (0, $9B3TU$macrostratuicomponents.usePrevious)(selectedLocation);
|
|
1441
1449
|
(0, $9B3TU$react.useEffect)(()=>{
|
|
1442
1450
|
const map = mapRef?.current;
|
|
1443
1451
|
if (map == null) return;
|
|
@@ -1509,7 +1517,7 @@ function $db14eb7a5c07abdb$var$LoadingAwareFeatureSet({ features: features , sou
|
|
|
1509
1517
|
sourceFeatures.length
|
|
1510
1518
|
]);
|
|
1511
1519
|
if (!isLoaded1) return $db14eb7a5c07abdb$var$h((0, $9B3TU$blueprintjscore.Spinner));
|
|
1512
|
-
return $db14eb7a5c07abdb$var$h($db14eb7a5c07abdb$
|
|
1520
|
+
return $db14eb7a5c07abdb$var$h($db14eb7a5c07abdb$export$617d79dae526d2cf, {
|
|
1513
1521
|
features: sourceFeatures
|
|
1514
1522
|
});
|
|
1515
1523
|
}
|
|
@@ -1590,27 +1598,32 @@ function $db14eb7a5c07abdb$export$43277c51a01761c1({ features: features , focuse
|
|
|
1590
1598
|
className: "basemap-features",
|
|
1591
1599
|
expanded: focusedSource == null
|
|
1592
1600
|
}, [
|
|
1593
|
-
$db14eb7a5c07abdb$var$h($db14eb7a5c07abdb$var$
|
|
1601
|
+
$db14eb7a5c07abdb$var$h($db14eb7a5c07abdb$var$FeatureGroups, {
|
|
1594
1602
|
features: filteredFeatures
|
|
1595
1603
|
}),
|
|
1596
1604
|
]),
|
|
1597
1605
|
]);
|
|
1598
1606
|
}
|
|
1599
|
-
function $db14eb7a5c07abdb$var$
|
|
1607
|
+
function $db14eb7a5c07abdb$var$FeatureGroups({ features: features1 }) {
|
|
1600
1608
|
/** Group features by source and sourceLayer */ if (features1 == null) return null;
|
|
1601
1609
|
const groups = (0, $9B3TU$d3array.group)(features1, (d)=>`${d.source} - ${d.sourceLayer}`);
|
|
1602
|
-
return $db14eb7a5c07abdb$var$h("div.
|
|
1610
|
+
return $db14eb7a5c07abdb$var$h("div.feature-groups", Array.from(groups).map(([key, features])=>{
|
|
1603
1611
|
return $db14eb7a5c07abdb$var$h("div.feature-group", [
|
|
1604
1612
|
$db14eb7a5c07abdb$var$h($db14eb7a5c07abdb$var$FeatureHeader, {
|
|
1605
1613
|
feature: features[0]
|
|
1606
1614
|
}),
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
})),
|
|
1615
|
+
$db14eb7a5c07abdb$var$h($db14eb7a5c07abdb$export$617d79dae526d2cf, {
|
|
1616
|
+
features: features
|
|
1617
|
+
}),
|
|
1611
1618
|
]);
|
|
1612
1619
|
}));
|
|
1613
1620
|
}
|
|
1621
|
+
function $db14eb7a5c07abdb$export$617d79dae526d2cf({ features: features }) {
|
|
1622
|
+
return $db14eb7a5c07abdb$var$h("div.features", features.map((feature, i)=>$db14eb7a5c07abdb$var$h($db14eb7a5c07abdb$export$dc87b4d46cea200d, {
|
|
1623
|
+
key: i,
|
|
1624
|
+
feature: feature
|
|
1625
|
+
})));
|
|
1626
|
+
}
|
|
1614
1627
|
|
|
1615
1628
|
|
|
1616
1629
|
let $6f5ca387ac26c0b5$export$dce4b6e67bb5f25a;
|