

Therefore we will need to enhance the require statement at the head of the widget.js. Pprior we will prepare the map to hold the coordinates for the start and stop as well as three graphic overlays. We will geocode the address line to work as an input for the ORS routing, so we create a function to geocode the given address. This is somehow the two major ingredients besides others like travel mode, travel time, etc…Īs described above, we will need to alter the widget.html file for this to allow a user to make some input and to trigger the route calculation with ORS: Progressive websites are rapidly growing in popularity as a way to build apps with JavaScript, CSS, and HTML that have a level of performance and usability. We will not cover this for this basic example! Setting up the user dialog for routingĪny routing application demands a user to put in the start as well as the end location for the demanded route. You might have noticed the ShowVertexFeatureAction in our Demo widget. setting/Setting.js – the JS actions which we will use inside the setting dialog.setting/Setting.html – the setting dialog if you create a new app with this widget.widget.html – the html element which shows up in the app In this module, youll learn how to: Create a basic web page using HTML.widget.js – which holds all JS code for the widget itself.config.json – which is filled when we save the app in the WAB.The widget of an app The folder/file structure for a widget
