diff --git a/index.html b/index.html
index 2455855..ba03fec 100644
--- a/index.html
+++ b/index.html
@@ -5,6 +5,7 @@
+
GeoView Demo Page
diff --git a/src/components/GeoViewMap.tsx b/src/components/GeoViewMap.tsx
index f346e5d..d5dff07 100644
--- a/src/components/GeoViewMap.tsx
+++ b/src/components/GeoViewMap.tsx
@@ -10,17 +10,18 @@ import ArrowBackIcon from '@mui/icons-material/ArrowBack';
import { useNavigate } from 'react-router-dom';
import { CodeSnippet } from './CodeSnippet';
import { EventsLog } from './EventsLog';
+import { LegendLayerStatusTable } from './LegendLayerStatusTable';
interface GeoViewMapProps {
showConfigEditor?: boolean;
showEventsLog?: boolean;
+ showLegendLayerStatus?: boolean;
config: string | object;
configIsFilePath?: boolean;
codeSnippet?: string;
children?: React.ReactNode;
top?: React.ReactNode;
bottom?: React.ReactNode;
-
}
function GeoViewMap(props: GeoViewMapProps) {
@@ -35,6 +36,7 @@ function GeoViewMap(props: GeoViewMapProps) {
const {
showConfigEditor = true,
showEventsLog = true,
+ showLegendLayerStatus = true,
config = DEFAULT_CONFIG,
configIsFilePath,
codeSnippet,
@@ -86,6 +88,7 @@ function GeoViewMap(props: GeoViewMapProps) {
{showConfigEditor && }
{codeSnippet && }
{showEventsLog && }
+ {showLegendLayerStatus && }
@@ -104,6 +107,11 @@ function GeoViewMap(props: GeoViewMapProps) {
}
+ {showLegendLayerStatus &&
+
+
+ }
+
);
};
diff --git a/src/components/LegendLayerStatusTable.tsx b/src/components/LegendLayerStatusTable.tsx
new file mode 100644
index 0000000..b5a5dd5
--- /dev/null
+++ b/src/components/LegendLayerStatusTable.tsx
@@ -0,0 +1,47 @@
+import { useContext } from 'react';
+import { CGPVContext } from '../providers/cgpvContextProvider/CGPVContextProvider';
+import { Box, Paper, Table, TableBody, TableCell, TableContainer, TableHead, TableRow } from '@mui/material';
+
+
+export function LegendLayerStatusTable() {
+ const cgpvContext = useContext(CGPVContext);
+
+ if (!cgpvContext) {
+ throw new Error('CGPVContent must be used within a CGPVProvider');
+ }
+
+ const { legendLayerStatusList } = cgpvContext;
+
+
+ return (
+
+ Legend Layer Status
+
+
+
+
+
+ Layer Name
+ Status
+
+
+
+ {legendLayerStatusList.map((row, index) => (
+
+
+ {row.layerName}
+
+ {row?.status}
+
+ ))}
+
+
+
+
+ );
+
+
+};
\ No newline at end of file
diff --git a/src/components/SplitButton.tsx b/src/components/SplitButton.tsx
index 09ba5b8..39bc415 100644
--- a/src/components/SplitButton.tsx
+++ b/src/components/SplitButton.tsx
@@ -28,7 +28,7 @@ export default function SplitButton({ options, label, title, onClick }: SplitBut
}
};
- const handleMenuItemClick = (event: React.MouseEvent, index: number) => {
+ const handleMenuItemClick = (index: number) => {
setSelectedIndex(index);
setOpen(false);
};
@@ -84,7 +84,7 @@ export default function SplitButton({ options, label, title, onClick }: SplitBut