Skip to content

Commit bbef3b7

Browse files
authored
fix: Modify map fit bounds and set heading (#763)
Reduced padding and set heading for a better visual appearance.
1 parent 729e8b9 commit bbef3b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

samples/routes-get-alternatives/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ async function getDirections() {
6969
if (primaryRoute) {
7070
drawRoute(primaryRoute, true);
7171
await primaryRoute.createWaypointAdvancedMarkers({ map: innerMap });
72-
innerMap.fitBounds(primaryRoute.viewport, 100);
72+
innerMap.fitBounds(primaryRoute.viewport, 50);
73+
innerMap.setHeading(70);
7374
}
7475
// [END maps_routes_get_alternatives_compute]
7576
// [END maps_routes_get_alternatives_request_full]

0 commit comments

Comments
 (0)