@@ -15,6 +15,7 @@ import mapboxgl from "mapbox-gl"
1515import { pbdbDomain , tileserverDomain } from "@macrostrat-web/settings" ;
1616import { buildMacrostratStyle } from "@macrostrat/map-styles" ;
1717import { getExpressionForFilters } from "./filter-helper" ;
18+ import { navigate } from "vike/client/router" ;
1819
1920const _macrostratStyle = buildMacrostratStyle ( {
2021 tileserverDomain,
@@ -35,9 +36,9 @@ function ColumnsMapInner({
3536 columnIDs = null ,
3637 className = "map-container" ,
3738 columns = null ,
38- lex = false ,
3939 fossilsData = [ ] ,
4040 filters = [ ] ,
41+ mapUrl = ""
4142} ) {
4243 const [ showSatellite , setShowSatellite ] = useState ( true ) ;
4344 const [ showFossils , setShowFossils ] = useState ( false ) ;
@@ -59,8 +60,10 @@ function ColumnsMapInner({
5960 setShowOutcrop ( ! showOutcrop ) ;
6061 }
6162
63+ const map = "/map/layers#" + mapUrl
6264
6365 return h ( 'div.lex-controls' , [
66+ h . if ( mapUrl !== "" ) ( 'div.btn' , { onClick : ( ) => navigate ( map ) } , h ( Icon , { icon : "map" , className : 'icon' } ) ) ,
6467 h . if ( fossilsExist ) ( 'div.btn' , { onClick : handleFossils } , h ( Icon , { icon : "mountain" , className : 'icon' } ) ) ,
6568 h . if ( filters . length > 0 ) ( 'div.btn' , { onClick : handleOutcrop } , h ( Icon , { icon : "excavator" , className : 'icon' } ) ) ,
6669 h ( 'div.btn' , { onClick : handleSatellite } , h ( Icon , { icon : "satellite" , className : 'icon' } ) ) ,
0 commit comments