diff --git a/src/pages/viewer/components/LegendWidget.jsx b/src/pages/viewer/components/LegendWidget.jsx
index dd80edd..79b9dde 100644
--- a/src/pages/viewer/components/LegendWidget.jsx
+++ b/src/pages/viewer/components/LegendWidget.jsx
@@ -2,11 +2,13 @@ import { useContext, useMemo } from "react"
import { MapContext } from "../contexts"
import { Box } from "react-bulma-components";
import SequentialLegend from "./legend-types/Sequential";
+import IntervalLegend from "./legend-types/Interval";
function LegendRender({ type, ...data }) {
switch(type) {
case 'sequential': return ;
+ case 'interval': return ;
default: null;
}
}
diff --git a/src/pages/viewer/components/legend-types/Interval.jsx b/src/pages/viewer/components/legend-types/Interval.jsx
new file mode 100644
index 0000000..68662ee
--- /dev/null
+++ b/src/pages/viewer/components/legend-types/Interval.jsx
@@ -0,0 +1,16 @@
+import { Columns, Media } from "react-bulma-components";
+
+const { Column } = Columns;
+
+export default function IntervalLegend({ intervals }) {
+ return (
+ intervals.map(({ background, description }) => (
+
+
+
+
+ {description}
+
+ ))
+ )
+}
\ No newline at end of file
diff --git a/src/styles/app.scss b/src/styles/app.scss
index 0b90f7f..8966161 100644
--- a/src/styles/app.scss
+++ b/src/styles/app.scss
@@ -91,7 +91,7 @@ $footer-height: 40px;
}
#legend-box {
- width: 200px;
+ width: 250px;
position: absolute;
bottom: 25px + $footer-height;
right: 0;
@@ -121,6 +121,22 @@ $footer-height: 40px;
padding: 0.2rem;
}
}
+
+ .interval-legend-entry {
+ margin-top: 0.1rem;
+ margin-left: 0;
+ margin-right: 0;
+ margin-bottom: 0;
+ width: 100%;
+
+ .column {
+ padding: 0.2rem ;
+ }
+ .bar {
+ max-width: 25px;
+ }
+ }
+
}
#basemap {