This object provides information about the device's location, such as latitude and longitude.
Description
Configures the parameters for the GPS search. When successful, the oe_success event will be triggered; when failed, the oe_error event will be triggered.
Syntax
of_configure
( eon_str_cordova_gps
astr_gps
)
Parameter
astr_gps
- This structure carries the
following values:
-
desiredaccuracy
- The desired accuracy of the geolocation system. Values: 0 (highest power, highest accuracy), 10, 100, 1000 (lowest power, lowest accuracy). -
stationaryRadius
- When stopped, the minimum distance the device must move beyond the stationary location for aggressive background-tracking to engage. -
distanceFilter
- The minimum distance (measured in meters) a device must move horizontally before an update event is generated.
Return value
None.
Description
Connects with the Cordova geolocation plugin, detects if the plugin is available to call, and binds the current PowerBuilder object with the JavaScript object defined by the plugin. After that, the PowerBuilder object has all of the methods and properties that the JavaScript object has.
Syntax
of_init
( )
Return value
Integer.
1 - Success.
-1 - It is called in PowerBuilder or Appeon Web, or there is an error.
Description
Occurs when the function is successfully executed. If the
JavaScript function in the Cordova plugin returns any value, that
value will be passed to the as_message
parameter.
Syntax
oe_success
( string
as_message
)
Parameter
as_message
- A JSON-format string which
contains the location data.
Return value
None
eon_str_cordova_gps_info ieon_gps_info
The structure for storing the detailed location data.
oleobject ieon_ole
PowerBuilder OLEObject object to be connected with the Cordova plugin.
powerobject ipo_bindevent
PowerBuilder object to be bound with the JavaScript object.
string is_errorevent
Stores the error event name of the PowerBuilder object.
string is_errorText
Stores the error information returned by the JavaScript function when execution failed.
string is_jserrorText
Stores the JavaScript error information when JavaScript call fails.
string is_successevent
Stores the success event name of the PowerBuilder object.
string is_successText
Stores the value returned by the JavaScript function when execution is successful.
Description
Struct.
Stores the information of the device GPS.
Property
Type |
Variable Name |
Description |
---|---|---|
long |
|
The desired accuracy of the geolocation system. |
long |
stationaryradius |
When stopped, the minimum distance the device must move beyond the stationary location for aggressive background-tracking to engage. |
long |
|
The minimum distance (measured in meters) a device must move horizontally before an update event is generated. |
Description
Struct.
Stores the information of the device's location.
Property
Type |
Variable Name |
Description |
---|---|---|
long |
|
The timestamp of the location. |
decimal { 2 } |
speed |
The speed. |
decimal { 2 } |
|
The altitude of the location. |
decimal { 2 } |
|
The bearing of the location |
decimal { 2 } |
|
The longitude of the location. |
decimal { 2 } |
|
The latitude of the location. |
decimal { 2 } |
|
The accuracy of the location. |
string |
|
The GPS service provider. |
boolean |
|