MCPcopy Create free account
hub / github.com/ecto/muni / useMapDrawHandleIcon

Function useMapDrawHandleIcon

depot/console/src/components/ui/map.tsx:1413–1423  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1411}
1412
1413function useMapDrawHandleIcon() {
1414 const { L } = useLeaflet()
1415 if (!L) return null
1416
1417 return L.divIcon({
1418 iconAnchor: [8, 8],
1419 html: renderToString(
1420 <CircleIcon className="fill-primary stroke-primary size-4 transition-transform hover:scale-110" />
1421 ),
1422 })
1423}
1424
1425function useLeaflet() {
1426 const [L, setL] = useState<typeof import("leaflet") | null>(null)

Callers 3

MapDrawPolylineFunction · 0.85
MapDrawPolygonFunction · 0.85
MapDrawEditFunction · 0.85

Calls 1

useLeafletFunction · 0.85

Tested by

no test coverage detected