Skip to content

Commit

Permalink
update navigation.js
Browse files Browse the repository at this point in the history
  • Loading branch information
afonsosousah committed May 1, 2024
1 parent 5aed2d2 commit db387c1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,8 @@ function updateRotation() {
});
*/
view.setRotation(angleRad);
if (navigationMode === "bike") view.centerOn(userPosition, mapSize, [mapSize[0] / 2, mapSize[1] * 0.9]);
else view.centerOn(userPosition, mapSize, [mapSize[0] / 2, mapSize[1] * 0.85]);

// Check if user is near to dropoff station, and prompt them if they reached the dropoff station
let distanceToDropoffStation = distance(currentPosition, [dropoffStation.longitude, dropoffStation.latitude]);
Expand Down Expand Up @@ -401,6 +403,7 @@ function updateRotation() {
});
*/
view.setRotation(angleRad);
view.centerOn(userPosition, mapSize, [mapSize[0] / 2, mapSize[1] * 0.85]);

}
}
Expand Down

0 comments on commit db387c1

Please sign in to comment.