Skip to content

Commit

Permalink
Merge pull request #23 from ibi-group/vehicle-rental-overlay
Browse files Browse the repository at this point in the history
Add vehicle rental overlay
  • Loading branch information
fpurcell authored Jan 24, 2020
2 parents 7e767ed + 3cb940b commit 71a1368
Show file tree
Hide file tree
Showing 8 changed files with 11,626 additions and 161 deletions.
32 changes: 15 additions & 17 deletions packages/core-utils/src/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const languageConfigType = PropTypes.shape({
stopViewer: PropTypes.string
});

export const mapSymbolsType = PropTypes.arrayOf(
export const vehicleRentalMapOverlaySymbolsType = PropTypes.arrayOf(
PropTypes.shape({
dockStrokeColor: PropTypes.string,
fillColor: PropTypes.string,
Expand Down Expand Up @@ -87,7 +87,7 @@ export const configType = PropTypes.shape({
* The applicable map symbols. Only applicable in vehicle rental
* overlays.
*/
mapSymbols: mapSymbolsType,
mapSymbols: vehicleRentalMapOverlaySymbolsType,
/**
* Only used during park and ride queries. This will filter out P&Rs
* that are futher than the specified number of meters from a transit
Expand Down Expand Up @@ -405,23 +405,21 @@ export const transitiveDataType = PropTypes.shape({
});

/**
* This models data about vehicle rental stations as obtained from various
* This models data about a vehicle rental station as obtained from various
* vehicle rental API endpoints from OTP.
*/
export const stationsType = PropTypes.arrayOf(
PropTypes.shape({
bikesAvailable: PropTypes.number,
id: PropTypes.string.isRequired,
isFloatingBike: PropTypes.bool,
isFloatingCar: PropTypes.bool,
isFloatingVehicle: PropTypes.bool,
name: PropTypes.string,
networks: PropTypes.arrayOf(PropTypes.string.isRequired).isRequired,
spacesAvailable: PropTypes.number,
x: PropTypes.number.isRequired,
y: PropTypes.number.isRequired
}).isRequired
);
export const stationType = PropTypes.shape({
bikesAvailable: PropTypes.number,
id: PropTypes.string.isRequired,
isFloatingBike: PropTypes.bool,
isFloatingCar: PropTypes.bool,
isFloatingVehicle: PropTypes.bool,
name: PropTypes.string,
networks: PropTypes.arrayOf(PropTypes.string.isRequired).isRequired,
spacesAvailable: PropTypes.number,
x: PropTypes.number.isRequired,
y: PropTypes.number.isRequired
});

/**
* Utility function to help create chained validators
Expand Down
2 changes: 2 additions & 0 deletions packages/vehicle-rental-overlay/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
__mocks__
Loading

0 comments on commit 71a1368

Please sign in to comment.