diff --git a/src/__routes.svelte b/src/__routes.svelte
index 7f7adf2..7a52957 100644
--- a/src/__routes.svelte
+++ b/src/__routes.svelte
@@ -54,6 +54,10 @@
path: '/profile/:erantId',
component: () => import('$routes/profile/profile.svelte'),
},
+ {
+ path: '/map',
+ component: () => import('$routes/map/map.svelte'),
+ },
].map((routes) => {
return { ...routes, layout: NavigationBarLayout }
}),
@@ -86,10 +90,7 @@
path: '/test',
component: () => import('$routes/test.svelte'),
},*/
- {
- path: '/map',
- component: () => import('$root/src/routes/map/map.svelte'),
- },
+
{
path: '/profile/',
component: () => import('$src/__error.svelte'),
diff --git a/src/lib/components/Map/Erantmap.svelte b/src/lib/components/Map/Erantmap.svelte
index f3b4749..08cb445 100644
--- a/src/lib/components/Map/Erantmap.svelte
+++ b/src/lib/components/Map/Erantmap.svelte
@@ -43,8 +43,10 @@
const userCenter = () => {
// @ts-ignore
- document.getElementsByClassName('mapboxgl-ctrl-geolocate')[0].click()
+ if (trigger) trigger()
}
+
+ let trigger
@@ -54,6 +56,7 @@