Skip to content

Commit

Permalink
Merge pull request #389 from MapsPeople/bugfix/wayfinding-skipping-se…
Browse files Browse the repository at this point in the history
…cond-step-on-first-view

Bugfix for wayfinding skipping first step
  • Loading branch information
ammapspeople authored Sep 12, 2024
2 parents 1dbbdab + 27159a6 commit 2b6cf3f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions packages/map-template/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.54.7] - 2024-09-12

### Fixed

- Fix bug where wayfinding steps were misaligned.

## [1.54.6] - 2024-09-03

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ function Directions({ isOpen, onBack, onSetSize, snapPointSwiped, onRouteFinishe
}
});

directionsRenderer.setRoute(directions.directionsResult);

// Set the step index to be 0 in order to display the correct instruction on the map.
directionsRenderer.setStepIndex(0);
directionsRenderer.setRoute(directions.directionsResult).then(() => {
// Set the step index to be 0 in order to display the correct instruction on the map.
directionsRenderer.setStepIndex(0);
});

destinationInfoElement.current.location = directions.destinationLocation;

Expand Down

0 comments on commit 2b6cf3f

Please sign in to comment.