Skip to content

Commit

Permalink
Make map always zoom smoothly
Browse files Browse the repository at this point in the history
  • Loading branch information
CatMe0w committed Jul 31, 2024
1 parent d37c970 commit f81d448
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web/src/ferrostar-core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,10 @@ export class FerrostarCore extends LitElement {
},
});

this.map?.setCenter(route.geometry[0]);
this.map?.easeTo({
center: route.geometry[0],
bearing: startingLocation.courseOverGround?.degrees || 0,
});

this.currentLocationMapMarker = new maplibregl.Marker().setLngLat(route.geometry[0]).addTo(this.map!);
}
Expand Down

0 comments on commit f81d448

Please sign in to comment.