Skip to content

Commit

Permalink
Adjust styling on dev map pages
Browse files Browse the repository at this point in the history
  • Loading branch information
davenquinn committed Nov 16, 2024
1 parent 13ab315 commit f61f81a
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions packages/map-interface/src/dev/map-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export function MapInspector({
focusedSource = null,
focusedSourceTitle = null,
fitViewport = true,
styleType = "macrostrat",
}: {
headerElement?: React.ReactNode;
transformRequest?: mapboxgl.TransformRequestFunction;
Expand All @@ -48,6 +49,7 @@ export function MapInspector({
mapPosition?: MapPosition;
bounds?: [number, number, number, number];
fitViewport?: boolean;
styleType: "standard" | "macrostrat";
}) {
/* We apply a custom style to the panel container when we are interacting
with the search bar, so that we can block map interactions until search
Expand All @@ -63,9 +65,15 @@ export function MapInspector({
mapboxgl.accessToken = mapboxToken;
}

style ??= isEnabled
? "mapbox://styles/mapbox/dark-v10"
: "mapbox://styles/mapbox/light-v10";
if (styleType == "macrostrat") {
style ??= isEnabled
? "mapbox://styles/jczaplewski/cl5uoqzzq003614o6url9ou9z?optimize=true"
: "mapbox://styles/jczaplewski/clatdbkw4002q14lov8zx0bm0?optimize=true";
} else {
style ??= isEnabled
? "mapbox://styles/mapbox/dark-v10"
: "mapbox://styles/mapbox/light-v10";
}

const [isOpen, setOpen] = useState(false);

Expand Down

0 comments on commit f61f81a

Please sign in to comment.