diff --git a/src/components/Map.svelte b/src/components/Map.svelte index 3dd82fa..4122553 100644 --- a/src/components/Map.svelte +++ b/src/components/Map.svelte @@ -8,11 +8,22 @@ let div = null; onMount(() => { let map = L.map(div, { - center: [17.385044, 78.486671], - zoom: 10 + center: [49.41607523, 8.67220049], + zoom: 44 + }); - + var latlngs = [ + [49.41607523, 8.67220049], + [49.416224, 8.67174849], + [49.41601524,8.67263096], + [49.41615261,8.67304132], + [49.41592224,8.67258877] + ]; + L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map); + //var marker = L.marker([49.41607523,8.67220049]).addTo(map); + var polyline = L.polyline(latlngs, {color: 'red'}).addTo(map); + map.fitBounds(polyline.getBounds()); });