Skip to content

Commit

Permalink
feat(visualizer): add icons for bicycles and busses in WebVisualizer (#…
Browse files Browse the repository at this point in the history
…419)

* chore: `npm run-script debug` output is now spanning multiple lines
* fix: remove double bookkeeping (equippedVehicles) and directly add vehicles to the map, although there's no position yet
* fix: take into account the vehicleClass, show 'unknown' if not a car
* swap icons
* feat: add bicycle and bus icons
* refactor: remove line that has no effect
* refactor: change tab size from 2 to 4
* fix: only display equipped traffic lights
* fix: replace non-existing link
  • Loading branch information
hoelger authored Sep 30, 2024
1 parent e9a86ee commit 8d16c36
Show file tree
Hide file tree
Showing 21 changed files with 712 additions and 679 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
<subscription id="V2xMessageTransmission" enabled="true"/>
<subscription id="VehicleRegistration" enabled="true"/>
<subscription id="RsuRegistration" enabled="true"/>
<subscription id="TrafficLightRegistration" enabled="true"/>
</subscriptions>
</output>

Expand Down
22 changes: 17 additions & 5 deletions fed/mosaic-output/src/main/resources/web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Only NodeJS (https://nodejs.org/en/download/)

## Install Development Requirements

Change to the visualizr directory:
Change to the visualizer directory:
`cd <MOSAIC_SOURCE>/fed/mosaic-output/src/main/resources/web`

Install required modules for development and deployment (defined in package.json):
Expand All @@ -20,12 +20,24 @@ It is recommended to use VSCode (https://code.visualstudio.com/download) for the
If you want to make changes you need to make them in the `visualizer-dev.js`.
You can install eslint (https://eslint.org/) globally with `npm i -g eslint` to support you to write correct code.

### Markers / Icons
Icons are form [https://mapicons.mapsmarker.com/](https://mapicons.mapsmarker.com/). \
Please use the 3rd icon, which has a slight color gradient in the background.\
Please use following colors: \
grey `6d6d6d` \
black `080808` \
green `23ff23` \
red `ff1c1c`


## Building visualizer.js

To deploy your changes you have two possibilites:
To deploy your changes you have three possibilities:
1. Creating a readable version with `npm run-script build`.
2. Creating a non-readable version with `npm run-script buildUgly`. This version is loaded faster by the browser.

To debug your changes create `visualizer.js` with the command `npm run-script debug`.
2. Creating a non-readable version with `npm run-script buildUgly`. This version is loaded faster by the browser. Use this command for the final version of your MR, otherwise the compiled files will be blown-up in size.
3. To debug your changes create `visualizer.js` with the command `npm run-script debug`.
This will add debugging information to `visualizer.js` which will be parsed by a modern browser,
such that you backtrack error to individual javascript files using the browser's developer tools.

Given that you develop with the IntelliJ IDE you have to run `mvn validate` in the "Eclipse MOSAIC Starter" so that the files are copied to the `target` folder.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 8d16c36

Please sign in to comment.