Skip to content

Commit

Permalink
Merge pull request #290 from bikehopper/elevation-graph
Browse files Browse the repository at this point in the history
Add Elevation Graph Display
  • Loading branch information
abhumbla authored Jan 30, 2024
2 parents d0dc69e + 9f1f99e commit e9412d4
Show file tree
Hide file tree
Showing 11 changed files with 12,806 additions and 16 deletions.
12,445 changes: 12,438 additions & 7 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"@babel/core": "^7.16.0",
"@formatjs/intl-listformat": "^7.1.7",
"@headlessui/react": "^1.7.14",
"@nivo/core": "^0.83.0",
"@nivo/line": "^0.83.0",
"@placemarkio/geo-viewport": "^1.0.0",
"@radix-ui/react-dialog": "^1.0.3",
"@radix-ui/react-dropdown-menu": "^2.0.4",
Expand Down
13 changes: 9 additions & 4 deletions src/components/BikehopperMap.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ import {
} from '../lib/layout';

import './BikehopperMap.css';
import { DEFAULT_BIKE_COLOR, DEFAULT_INACTIVE_COLOR } from '../lib/colors';
import {
BIKE_LANE_COLOR,
CYCLE_TRACK_COLOR,
DEFAULT_BIKE_COLOR,
DEFAULT_INACTIVE_COLOR,
} from '../lib/colors';

const _isTouch = 'ontouchstart' in window;

Expand Down Expand Up @@ -736,9 +741,9 @@ const bikeColorStyle = [
propIs('cycleway', 'track'),
propIs('road_class', ...BIKEABLE_HIGHWAYS),
],
'#006600',
propIs('cycleway', 'lane', 'shared_lane'),
'#33cc33',
CYCLE_TRACK_COLOR,
propIs('cycleway', 'lane', 'shared lane'),
BIKE_LANE_COLOR,
DEFAULT_BIKE_COLOR,
],
];
Expand Down
2 changes: 1 addition & 1 deletion src/components/Itinerary.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@
}

.Itinerary_timeline {
margin: 32px 0;
margin: 0;
}
4 changes: 4 additions & 0 deletions src/components/Itinerary.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Icon from './Icon';
import ItineraryBikeLeg from './ItineraryBikeLeg';
import ItineraryHeader from './ItineraryHeader';
import ItineraryTransitLeg from './ItineraryTransitLeg';
import ItineraryElevationProfile from './ItineraryElevationProfile';

import { ReactComponent as NavLeftArrow } from 'iconoir/icons/nav-arrow-left.svg';
import { ReactComponent as ArriveIcon } from 'iconoir/icons/triangle-flag.svg';
Expand Down Expand Up @@ -124,6 +125,9 @@ export default function Itinerary({
</h3>
</div>
</div>
<div className="Itinerary_elevation">
<ItineraryElevationProfile route={route} />
</div>
<div className="Itinerary_timeline">
{renderedLegs}
<ItineraryHeader icon={arriveIcon} iconColor="#ea526f">
Expand Down
Empty file.
Loading

0 comments on commit e9412d4

Please sign in to comment.