From 2e29f756157451bc649c5fb1e1afd90d6e34f53a Mon Sep 17 00:00:00 2001 From: Leo PERNELLE Date: Mon, 6 Jan 2025 14:29:04 +0100 Subject: [PATCH 1/2] fix: edit center of the map --- samples/transit-advanced/index.ts | 5 +++-- samples/transit-roadbook/index.ts | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/samples/transit-advanced/index.ts b/samples/transit-advanced/index.ts index 367d11a7..2f2bace9 100644 --- a/samples/transit-advanced/index.ts +++ b/samples/transit-advanced/index.ts @@ -193,6 +193,7 @@ function toggleProgress() { function displayTransitRoute(routes: woosmap.map.transit.TransitRoute[]) { transitRenderer.setRoutes(routes); + console.log(map.getCenter()) } function calculateTransit(): void { @@ -397,8 +398,8 @@ function initUI(): void { function initMap(): void { map = new woosmap.map.Map(document.getElementById("map") as HTMLElement, { - center: { lat: 51.5074, lng: -0.1478 }, - zoom: 10, + center: { lat: 45.482604, lng: 9.16924 }, + zoom: 11, }); transitService = new woosmap.map.TransitService(); transitRenderer = new woosmap.map.TransitRenderer({}); diff --git a/samples/transit-roadbook/index.ts b/samples/transit-roadbook/index.ts index 093a66d7..09bd776a 100644 --- a/samples/transit-roadbook/index.ts +++ b/samples/transit-roadbook/index.ts @@ -525,8 +525,8 @@ function initUI(): void { function initMap(): void { map = new woosmap.map.Map(document.getElementById("map") as HTMLElement, { - center: { lat: 51.5074, lng: -0.1478 }, - zoom: 10, + center: { lat: 45.482604, lng: 9.16924 }, + zoom: 11, }); transitService = new woosmap.map.TransitService(); transitRenderer = new woosmap.map.TransitRenderer({}); From 22803eff467a5f2d98783e07b7aba50b305b1dbd Mon Sep 17 00:00:00 2001 From: "Leo PERNELLE (Woosmap)" Date: Mon, 6 Jan 2025 14:30:37 +0100 Subject: [PATCH 2/2] fix: remove console log --- samples/transit-advanced/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/samples/transit-advanced/index.ts b/samples/transit-advanced/index.ts index 2f2bace9..4a503c77 100644 --- a/samples/transit-advanced/index.ts +++ b/samples/transit-advanced/index.ts @@ -193,7 +193,6 @@ function toggleProgress() { function displayTransitRoute(routes: woosmap.map.transit.TransitRoute[]) { transitRenderer.setRoutes(routes); - console.log(map.getCenter()) } function calculateTransit(): void {