From wiki.ginstr.com
Jump to: navigation, search
(Calculate driving distance and store resuklt into rows)
(Calculate driving distance and store result into rows)
Line 42: Line 42:
 
===Calculate driving distance and store result into [[Datatypes#rows|rows]]===
 
===Calculate driving distance and store result into [[Datatypes#rows|rows]]===
  
:;<code>[gn:act_calculateDrivingDistance]|[rowsTarget,location1,location2,searchColumnName,searchColumnValue,targetColumnName;eventWidgetId,event]</code>
+
:;<code>[gn:act_calculateDrivingDistance]|[rowsTarget,source1,source2,searchColumnName,searchColumnValueId,targetColumnName;eventWidgetId,event]</code>
  
 
:{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 
:{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
Line 60: Line 60:
 
|-
 
|-
 
| <code>[[source|source2]]</code>
 
| <code>[[source|source2]]</code>
 +
| [[target]] into which calculated driving distance will be stored
 +
* Valid [[source|sources]]:
 +
:*<code>[[Datatypes#gps|gps]]</code>
 +
|-
 +
| <code>[[source|searchColumnName]]</code>
 +
| [[target]] into which calculated driving distance will be stored
 +
* Valid [[source|sources]]:
 +
:*<code>[[Datatypes#gps|gps]]</code>
 +
|-
 +
| <code>[[source|searchColumnValueId]]</code>
 +
| [[target]] into which calculated driving distance will be stored
 +
* Valid [[source|sources]]:
 +
:*<code>[[Datatypes#gps|gps]]</code>
 +
|-
 +
| <code>[[source|targetColumnName]]</code>
 +
| [[target]] into which calculated driving distance will be stored
 +
* Valid [[source|sources]]:
 +
:*<code>[[Datatypes#gps|gps]]</code>
 +
|-
 +
| <code>[[source|eventWidgetId]]</code>
 +
| [[target]] into which calculated driving distance will be stored
 +
* Valid [[source|sources]]:
 +
:*<code>[[Datatypes#gps|gps]]</code>
 +
|-
 +
| <code>[[source|event]]</code>
 
| [[target]] into which calculated driving distance will be stored
 
| [[target]] into which calculated driving distance will be stored
 
* Valid [[source|sources]]:
 
* Valid [[source|sources]]:

Revision as of 16:25, 20 July 2017

gn:act_calculateDrivingDistance

Description
Action is used to calculate driving distance between two GPS coordinates and store the result into target
Action returns
void

Action signatures

Calculate driving distance

[gn:act_calculateDrivingDistance]|[target,source1,source2]
Parameter Description
target target into which calculated driving distance will be stored
source1 target into which calculated driving distance will be stored
source2 target into which calculated driving distance will be stored

Example

@+id/deviceKm - target
@+id/gpsInput - source1
@+id/deviceGps - source2
[gn:act_calculateDrivingDistance]|[@+id/deviceKm,@+id/gpsInput,@+id/deviceGps]

Calculate driving distance and store result into rows

[gn:act_calculateDrivingDistance]|[rowsTarget,source1,source2,searchColumnName,searchColumnValueId,targetColumnName;eventWidgetId,event]
Parameter Description
target target into which calculated driving distance will be stored
source1 target into which calculated driving distance will be stored
source2 target into which calculated driving distance will be stored
searchColumnName target into which calculated driving distance will be stored
searchColumnValueId target into which calculated driving distance will be stored
targetColumnName target into which calculated driving distance will be stored
eventWidgetId target into which calculated driving distance will be stored
event target into which calculated driving distance will be stored

Example

@+id/deviceKm - target
@+id/gpsInput - source1
@+id/deviceGps - source2
@+id/onDistanceReceive - callback widget
gn:act_set - callback action
[gn:act_calculateDrivingDistance]|[@variable/finalDeviceList,@+id/gpsInput,@+id/deviceGps,devices_inventoryNumber,@variable/deviceNumber,device_km;@+id/onDistanceArrived,gn:act_set]

Calculate driving distance with callback action

[gn:act_calculateDrivingDistance]|[target,source1,source2;eventWidgetId,event]
Parameter Description
target target into which calculated driving distance will be stored
source1 target into which calculated driving distance will be stored
source2 target into which calculated driving distance will be stored

Example

@+id/deviceKm - target
@+id/gpsInput - source1
@+id/deviceGps - source2
@+id/onDistanceReceive - callback widget
gn:act_set - callback action
[gn:act_calculateDrivingDistance]|[@+id/deviceKm,@+id/gpsInput,@+id/deviceGps;@+id/onDistanceReceive,gn:act_set]