added grafana, map react-leaflet
This commit is contained in:
27
apps/dispatch/app/(dispatch)/_components/map/Map.tsx
Normal file
27
apps/dispatch/app/(dispatch)/_components/map/Map.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
"use client";
|
||||
import { useEffect, useRef } from "react";
|
||||
|
||||
import L from "leaflet";
|
||||
import "leaflet/dist/leaflet.css";
|
||||
import ToastCard from "../toast/ToastCard";
|
||||
import { Toast, ToastBar, Toaster, toast } from "react-hot-toast";
|
||||
import { useMapStore } from "_store/mapStore";
|
||||
import { MapContainer } from "react-leaflet";
|
||||
import { BaseMaps } from "(dispatch)/_components/map/BaseMaps";
|
||||
import { ContextMenu } from "(dispatch)/_components/map/ContextMenu";
|
||||
|
||||
export default () => {
|
||||
const { map } = useMapStore();
|
||||
|
||||
return (
|
||||
<MapContainer
|
||||
className="h-full w-full"
|
||||
center={map.center}
|
||||
zoom={map.zoom}
|
||||
scrollWheelZoom={true}
|
||||
>
|
||||
<BaseMaps />
|
||||
<ContextMenu />
|
||||
</MapContainer>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user