Skip to content

Commit

Permalink
feat: map minimum height of 200px (#213)
Browse files Browse the repository at this point in the history
* fix: reset lastKnownState for planned route and traffic if NO_GUIDANCE

* feat: map minimum height of 200px
  • Loading branch information
regeter authored Feb 13, 2025
1 parent aa6fe34 commit ed7c8e6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ class App extends React.Component {
<div style={{ display: "flex", height: "100vh" }}>
<div style={{ width: "70%", display: "flex", flexDirection: "column" }}>
<div style={{ height: "33vh", display: "flex", flexDirection: "column" }}>
<div style={{ flex: 1 }}>
<div className="map-container" style={{ flex: 1 }}>
<Map
key={`map-${this.state.activeDatasetIndex}`}
logData={this.props.logData}
Expand Down
6 changes: 5 additions & 1 deletion src/TripLogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,11 @@ function processRawLogs(rawLogs, solutionType) {
log("Updating last known location:", lastKnownState.location);
}

if (currentRouteSegment) {
// If Navigation SDK is NO_GUIDANCE, reset the lastKnownState planned route and traffic.
if (_.get(newLog, `${vehiclePath}.navstatus`) == "NAVIGATION_STATUS_NO_GUIDANCE") {
lastKnownState.routeSegment = null;
lastKnownState.routeSegmentTraffic = null;
} else if (currentRouteSegment) {
lastKnownState.routeSegment = currentRouteSegment;
lastKnownState.routeSegmentTraffic = currentRouteSegmentTraffic;
log("Updating last known route segment");
Expand Down
6 changes: 6 additions & 0 deletions src/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,9 @@
.map-button:hover {
background: #f1f1f1;
}

.map-container {
min-height: 200px;
display: flex;
flex-direction: column;
}

0 comments on commit ed7c8e6

Please sign in to comment.