1- import { Radio , RadioGroup , Spinner } from "@blueprintjs/core" ;
1+ import { Button , Radio , RadioGroup , Spinner } from "@blueprintjs/core" ;
22import { SETTINGS , tileserverDomain } from "@macrostrat-web/settings" ;
33import hyper from "@macrostrat/hyper" ;
44import {
77 MapMarker ,
88 MapView ,
99 PanelCard ,
10+ useMapMarker ,
1011} from "@macrostrat/map-interface" ;
1112import { NonIdealState , Switch } from "@blueprintjs/core" ;
1213import { buildMacrostratStyle } from "@macrostrat/map-styles" ;
@@ -23,6 +24,8 @@ import { MapNavbar } from "~/components/map-navbar";
2324import styles from "./main.module.sass" ;
2425import { asChromaColor , toRGBAString } from "@macrostrat/color-utils" ;
2526import { boundingGeometryMapStyle } from "~/map-styles" ;
27+ import { Popover2 } from "@blueprintjs/popover2" ;
28+ import { MapboxMapProvider } from "@macrostrat/mapbox-react" ;
2629
2730const 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 ,
0 commit comments