feat: 침수심 범례 UI 구현 (기능 추가 구현 필요)
This commit is contained in:
@@ -7,6 +7,7 @@ import GisApp from "@common/business_components/ui/map/lib/gis.core";
|
||||
import SearchModal from "./searchModal/searchModal";
|
||||
import FeatureClickEventPopup from "./components/popupComponent/featureClickEventPopup";
|
||||
import { SearchBar } from "./searchBar/searchBar";
|
||||
import { WaterDepth } from "./waterDepth/waterDepth";
|
||||
|
||||
// 타입 정의 추가
|
||||
export type LyrStngProps = {
|
||||
@@ -116,6 +117,8 @@ const Map = () => {
|
||||
setIsOpen(true);
|
||||
setIsSearchModalOpen(false);
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
<div className="bg-container">
|
||||
<Gis
|
||||
@@ -134,6 +137,7 @@ const Map = () => {
|
||||
isSearchModalOpen={isSearchModalOpen}
|
||||
onCheckedLayersChange={undefined}
|
||||
searchBar={SearchBar}
|
||||
waterDepth={WaterDepth}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
"use client";
|
||||
|
||||
import React, { useRef, useEffect, useState } from "react";
|
||||
import { Label } from "@common/components/ui/label";
|
||||
|
||||
export function WaterDepth({ onClose }: { onClose?: () => void }) {
|
||||
const [isPlaying, setIsPlaying] = useState<boolean>(false);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="fixed top-8 left-8 z-50 bg-white rounded-lg shadow-lg border border-gray-200 w-[160px] px-4 py-3">
|
||||
<div className="card-header flex items-center justify-between">
|
||||
<Label className="text-3xl text-gray-900 font-bold">침수심 범례</Label>
|
||||
<button
|
||||
type="button"
|
||||
className="ml-2"
|
||||
onClick={() => setIsPlaying((prev) => !prev)}
|
||||
>
|
||||
{isPlaying ? (
|
||||
<img
|
||||
src="/images/map/toolbar/pause_button.png"
|
||||
alt="pause"
|
||||
className="w-6 h-6 object-contain"
|
||||
/>
|
||||
) : (
|
||||
<img
|
||||
src="/images/map/toolbar/play_button_arrowhead.png"
|
||||
alt="play"
|
||||
className="w-6 h-6 object-contain"
|
||||
/>
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
<div className="border-b border-gray-300 mb-2" />
|
||||
<div className="w-[140px] mx-auto flex flex-col items-center">
|
||||
<div className="bg-blue-900 text-white text-2xl text-center py-1 mb-2 rounded w-full">침 수 심</div>
|
||||
<div className="space-y-1 w-full">
|
||||
<LegendItem color="#0000ff" label="0.3~0.5m 미만" />
|
||||
<LegendItem color="#00e8fe" label="0.5~1.0m 미만" />
|
||||
<LegendItem color="#00fdb7" label="1.0~1.5m 미만" />
|
||||
<LegendItem color="#00fe4e" label="1.5~2.0m 미만" />
|
||||
<LegendItem color="#fce800" label="2.0~3.0m 미만" />
|
||||
<LegendItem color="#fe0000" label="3.0m 이상" />
|
||||
</div>
|
||||
<div className="border-t-4 border-gray-900 mt-2 mx-auto w-full" />
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function LegendItem({ color, label }: { color: string; label: string }) {
|
||||
return (
|
||||
<div className="flex items-center gap-2 w-full">
|
||||
<span
|
||||
className="inline-block w-16 h-6"
|
||||
style={{ backgroundColor: color, border: "1px solid #ccc" }}
|
||||
/>
|
||||
<span className="text-xl text-gray-900 font-bold">{label}</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 479 B |
Binary file not shown.
|
After Width: | Height: | Size: 774 B |
Reference in New Issue
Block a user