Skip to content

Commit 3e40f9b

Browse files
committed
Updated map ingestion page
1 parent 350f230 commit 3e40f9b

File tree

3 files changed

+30
-8
lines changed

3 files changed

+30
-8
lines changed

pages/maps/ingestion/@id/components/main.module.sass

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,9 @@
2424
.single-map
2525
flex-grow: 1
2626
min-height: 20%
27+
28+
.map-controls
29+
margin: 5px
30+
background-color: var(--background-color)
31+
pointer-events: all
32+
width: fit-content

pages/maps/ingestion/@id/components/map-interface.ts

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Radio, RadioGroup, Spinner } from "@blueprintjs/core";
1+
import { Button, Radio, RadioGroup, Spinner } from "@blueprintjs/core";
22
import { SETTINGS, tileserverDomain } from "@macrostrat-web/settings";
33
import hyper from "@macrostrat/hyper";
44
import {
@@ -7,6 +7,7 @@ import {
77
MapMarker,
88
MapView,
99
PanelCard,
10+
useMapMarker,
1011
} from "@macrostrat/map-interface";
1112
import { NonIdealState, Switch } from "@blueprintjs/core";
1213
import { buildMacrostratStyle } from "@macrostrat/map-styles";
@@ -23,6 +24,8 @@ import { MapNavbar } from "~/components/map-navbar";
2324
import styles from "./main.module.sass";
2425
import { asChromaColor, toRGBAString } from "@macrostrat/color-utils";
2526
import { boundingGeometryMapStyle } from "~/map-styles";
27+
import { Popover2 } from "@blueprintjs/popover2";
28+
import { MapboxMapProvider } from "@macrostrat/mapbox-react";
2629

2730
const h = hyper.styled(styles);
2831

@@ -229,21 +232,33 @@ export function MapInterface({
229232
h(BaseLayerSelector, { layer, setLayer }),
230233
]);
231234

235+
const settingsPopoverButton = h(
236+
"div.map-controls",h(
237+
Popover2,
238+
{
239+
content: contextPanel,
240+
},
241+
h(Button, {
242+
icon: "cog",
243+
})
244+
));
245+
232246
if (mapStyle == null) {
233247
return h(Spinner);
234248
}
235249

236250
return h(
237-
MapAreaContainer,
251+
MapboxMapProvider,
238252
{
239-
className: "single-map",
240-
navbar: h(MapNavbar, { isOpen, setOpen, minimal: true }),
241-
contextPanel,
242-
contextPanelOpen: isOpen,
243-
detailPanelOpen: false,
244-
fitViewport: false,
253+
//className: "single-map",
254+
//navbar: h(MapNavbar, { isOpen, setOpen, minimal: true }),
255+
// contextPanel: null,
256+
// //contextPanelOpen: isOpen,
257+
// detailPanelOpen: false,
258+
// fitViewport: false,
245259
},
246260
[
261+
settingsPopoverButton,
247262
h(MapView, {
248263
style: mapStyle,
249264
mapboxToken: SETTINGS.mapboxAccessToken,

pages/maps/ingestion/@id/main.module.sass

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
.map-legend-container
1919
overflow-y: scroll
2020

21+
2122
.map-legend
2223
margin: 1em
2324

0 commit comments

Comments
 (0)