added in Milestone 102
gn:act_openGoogleMapsDriveRoute
- Description
- Loads route information from rows and opens google maps with driving instructions based on the route
- Action returns
- void
Action signature
[gn:act_openGoogleMapsDriveRoute]|[sourceOfCurrentGpsLocationId,sourceOfCheckPointsId;checkPointsGPSColumnNameId;isCircularRouteSourceId]
Parameter | Description |
---|---|
sourceOfCurrentGpsLocationId
|
source source which contains current gps location |
sourceOfCheckPointsId
|
target source from which route points are collected |
checkPointsGPSColumnNameId
|
source source which contains id of column which contains gps coordinates in <cdoe>sourceOfCheckPointsId source |
isCircularRouteSourceId
|
source source which contains id of column which contains information if route is circular or not. If route is circular the starting point of route will be added as destination of route. |
Example
variables.xml
<variable id="checkPointColumnGpsId" type="text">stopPoint_GPS</variable> <variable id="isCircularTourColumnId" type="text">isCircular</variable> <variable id="gpsPosition" type="GPS"/> <variable id="isCirucularRoute" type="status">false</variable>
screen.xml
<FrameLayout android:id="@+id/getClickedTourData" android:layout_width="match_parent" android:layout_height="wrap_content" gn:act_set="[gn:act_openGoogleMapsDriveRoute]|[@variable/gpsPosition,@variable/stopPointsRows,@variable/checkPointColumnGpsId,@variable/isCirucularRoute]"/>
on action execution
action will collect all rows from stopPointsRows
go trough them and collect data from column checkPointColumnGpsId
. It will set gpsPosition
as start point of route and it will not add it as start because route is not circular isCirucularRoute
after action execution
google maps application will open with route open where gpsPosition
is location from where you start, first waypoint (or last if route has only one waypoint) on route where you go next will be first item from source stopPointsRows