From 2e29f756157451bc649c5fb1e1afd90d6e34f53a Mon Sep 17 00:00:00 2001 From: Leo PERNELLE Date: Mon, 6 Jan 2025 14:29:04 +0100 Subject: [PATCH] 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({});