Skip to content

Commit

Permalink
fix: edit center of the map
Browse files Browse the repository at this point in the history
  • Loading branch information
lpernelle-woosmap committed Jan 6, 2025
1 parent 1104935 commit 2e29f75
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions samples/transit-advanced/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ function toggleProgress() {

function displayTransitRoute(routes: woosmap.map.transit.TransitRoute[]) {
transitRenderer.setRoutes(routes);
console.log(map.getCenter())
}

function calculateTransit(): void {
Expand Down Expand Up @@ -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({});
Expand Down
4 changes: 2 additions & 2 deletions samples/transit-roadbook/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({});
Expand Down

0 comments on commit 2e29f75

Please sign in to comment.