This action will allow the user to trace the route from one location to another using the Map UI Part. To know more about the action please follow the steps given below:
Step 1: Open a Free Layout Page.
a.Drag and drop a Map Control UI Part and a RoundButton UI Part on the Page.
b.Browse to the "Functions" section on "Properties Palette window" of RoundButton for applying actions.
c.Click on the corresponding Edit(0) button of the Function on which user wants to apply the Action. To know more about the Functions click here.
Step 2: Click on "Add" button on the Actions window to add an action.To know more about actions click here.
Step 3: Select the Actions Category as “Map Route Control”.
Step 4: Click on the "Map Route Control" and then click on “Show Route” action.
Click here to know about "Doc" Button.
Step 5: Enter Action parameters:-
Parameter |
Description |
Page Name |
Select Page Name from the Drop Down. |
Name |
Select the name of the map UI part from the Drop Down. |
From Location |
Enter the location from where the user wants to start in "From location" column. |
To Location |
Enter the destination name in "To location" column. |
Best Route |
Select the mode of transport, user can select "car" or "walk" from the list. |
Equivalent Exchange |
User can set the amount of Elevation (m) which is equal with Distance ( Km). |
Unit |
User can select Unit as Imperial or Metric. |
Time Calculation |
Time Calculation parameter allows user to calculate Arrival Time and Departure Time. |
Step 6: Click on "OK" button if the user doesn't want to add more actions.
Note: Define condition if required, by clicking on "+" Condition Button on the left. Click here to know more.
For Map Control user need to Add Google Map API
Map Variables
If Show Route Action is applied using Map Control without adding Google Map API , then Error is triggered. User can display this Error using the Map Variables.
1. User can apply "Alert" action on "Error" event of Show Route Action.
2. Enter "__ERR_CODE__" in the Alert Title parameter.
3. Enter "__ERR__MSG__" in the Alert Message parameter.
Map Variables |
||
S. No. |
Variable Name |
Description |
1 |
_ERR_CODE_ |
ERROR CODE is the Name of the Error which is triggered during Map Action. |
2 |
_ERR_MSG_ |
ERR_MSG is the Error Message of the Error which is triggered during Map Action. |
Show Route Variables:
1) Add two Two TextFields displaying ROUTEDISTANCE and ROUTETIME variables as shown in the image below.
Show Route Variables |
||
S. No. |
Variable Name |
Description |
1 |
_ROUTEDISTANCE_ |
Route distance is the distance of the route between given two different locations. |
2 |
_ROUTETIME_ |
Route Time is the time taken to cover the given route distance. |
2) Apply "Reload Update Data" action on Success of "Show Route" action. The variable values will be shown once the page is reloaded.