Webcomponents meant for displaying different mobility layers which currently are also shown on http://mobility.meran.eu
You can download the packaged/build components and include them in your website or link the resources directly by means of a CDN (e.g. jsDelivr) service.
<!-- include self-hosted component -->
<script src="./smartmobility.min.js"></script>
<!-- include from CDN -->
<script src="https://cdn.jsdelivr.net/gh/noi-techpark/webcomp-smartmobility@master/dist/smartmobility.min.js"></script>
Once the component is correctly included, the following custom tag can be used
<smart-mobility endpoint="https://[SERVER]"></smart-mobility>
Valid base url to the server providing the required API. This attribute is required.
Regular expression that will filter the routes that the webcomponent will consider and display. This attribute is not required.
The following shows all routes for the city of Bozen-Bolzano:
routes="^.* BZ$"
All relevant files can be found in the src
folder.
- Node
- NPM
Download and install all necessary dependencies. Requires the npm
command/tool installed at the system level.
npm install
Build a minified file/asset in the dist
folder.
npm run build
Starts watching the source files and recompiles them if necessary. Provides website at http://0.0.0.0:8080
that reloads itself automatically.
npm run watch