diff --git a/src/App.tsx b/src/App.tsx
index 3d63f4c..c3ba803 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -1,8 +1,7 @@
import "leaflet/dist/leaflet.css";
-import { Index } from "./pages/Index";
import { Route, HashRouter } from "@solidjs/router";
import { Editor } from "./pages/Editor";
-import { Index2 } from "./pages/Index2";
+import { Index } from "./pages/Index";
import { Arrow } from "./pages/Arrow";
export default function() {
@@ -10,7 +9,6 @@ export default function() {
<>
-
diff --git a/src/pages/Index.tsx b/src/pages/Index.tsx
index 9c5d18b..1c3f33c 100644
--- a/src/pages/Index.tsx
+++ b/src/pages/Index.tsx
@@ -1,39 +1,38 @@
-import { Map, map, polyline, tileLayer } from "leaflet";
-import { createEffect, createResource, For, onMount, Suspense } from "solid-js";
-import { Line, RouteWrapper, Route, LineWrapper, PointsWrapper } from "../types";
+import L from "leaflet";
+import { createEffect, createResource, createSignal, For, onMount, Suspense } from "solid-js";
import { LineSegmentsIcon } from "../icons/LineSegmentsIcon";
+import { Line, Lines, Route, Routes } from "../new_types";
-let g_map: Map | null = null;
+let global_map: L.Map | null = null;
+const [global_count, set_global_count] = createSignal(0);
export function Index() {
- const container =
;
+ const container = ;
onMount(() => {
- const l_map = map(container as HTMLElement)
+ global_map = L.map(container as HTMLElement)
.setView([-16.40171, -71.53040], 13);
- g_map = l_map;
- tileLayer("/tiles/{z}/{x}/{y}.jpg", {
+ L.tileLayer("/tiles/{z}/{x}/{y}.jpg", {
maxZoom: 17,
minZoom: 12,
- attribution: "© Map data OpenStreetMap",
- }).addTo(l_map);
+ attribution: "Map data © OpenStreetMap",
+ }).addTo(global_map);
});
return (
-