aboutsummaryrefslogtreecommitdiff
path: root/src/controls/LocateControl.ts
diff options
context:
space:
mode:
authorAriel Costas Guerrero <94913521+arielcostas@users.noreply.github.com>2025-03-04 00:17:11 +0100
committerAriel Costas Guerrero <94913521+arielcostas@users.noreply.github.com>2025-03-04 00:17:11 +0100
commitf94bb4470652d819df0821daf9446189e0790eb2 (patch)
tree19e29df4c2c03d9bbed876e76423cb30ed973417 /src/controls/LocateControl.ts
parentcf525fe1cc12d4355482a506fd59cdf506d4e5db (diff)
Add location button to map
Diffstat (limited to 'src/controls/LocateControl.ts')
-rw-r--r--src/controls/LocateControl.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/controls/LocateControl.ts b/src/controls/LocateControl.ts
new file mode 100644
index 0000000..4ef8243
--- /dev/null
+++ b/src/controls/LocateControl.ts
@@ -0,0 +1,7 @@
+import {createControlComponent} from '@react-leaflet/core';
+import {LocateControl as LeafletLocateControl} from 'leaflet.locatecontrol';
+import "leaflet.locatecontrol/dist/L.Control.Locate.min.css";
+
+export const LocateControl = createControlComponent(
+ (props) => new LeafletLocateControl(props)
+); \ No newline at end of file