From wiki.ginstr.com
Jump to: navigation, search
(Action signatures)
(Calculate driving distance and store resuklt into rows)
Line 40: Line 40:
 
<hr>
 
<hr>
  
===Calculate driving distance and store resuklt into [[Datatypes#rows|rows]]===
+
===Calculate driving distance and store result into [[Datatypes#rows|rows]]===
  
:;<code>[gn:act_calculateDrivingDistance]|[target,source1,source2;eventWidgetId,event]</code>
+
:;<code>[gn:act_calculateDrivingDistance]|[rowsTarget,location1,location2,searchColumnName,searchColumnValue,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 72: Line 72:
 
:<code>@+id/onDistanceReceive</code> - callback widget<br>
 
:<code>@+id/onDistanceReceive</code> - callback widget<br>
 
:<code>gn:act_set</code> - callback action<br>
 
:<code>gn:act_set</code> - callback action<br>
:; ⤷ <code>[gn:act_calculateDrivingDistance]|[@+id/deviceKm,@+id/gpsInput,@+id/deviceGps;@+id/onDistanceReceive,gn:act_set]</code>
+
:; ⤷ <code>[gn:act_calculateDrivingDistance]|[@variable/finalDeviceList,@+id/gpsInput,@+id/deviceGps,devices_inventoryNumber,@variable/deviceNumber,device_km;@+id/onDistanceArrived,gn:act_set]</code>
 
<hr>
 
<hr>
  

Revision as of 16:24, 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,location1,location2,searchColumnName,searchColumnValue,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

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]