Difference between revisions of "Component: Location ( Data)"

From Flowcode Help
Jump to navigationJump to search
(Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | MatrixTSL |- | width="20%" style="color:gray;" | Version | 1.0 |- | width="20%" style="color:gray;...")
 
 
Line 13: Line 13:
  
 
==Location component==
 
==Location component==
Component that provides the mobile device's physical location
+
Component that provides the mobile device's physical location.
 +
 
  
 
==Version information==
 
==Version information==
Line 21: Line 22:
 
   
 
   
  
 +
==Detailed description==
  
==Detailed description==
+
Many mobile devices have the capability of reporting the physical location of the device (e.g. by using an internal GPS sensor).
 +
 
 +
This component allows access to this information.
  
''No detailed description exists yet for this component''
 
  
 
==Examples==
 
==Examples==
  
''<span style="color:red;">No additional examples</span>''
+
===Plotting geolocation data===
 +
This example regularly plots the current location of the device onto a canvas object.
 +
 
 +
{{Fcfile|GeolocationPlotter.fcweb|GeolocationPlotter.fcweb}}
  
 +
The web app created by this example can be viewed here: [https://www.flowcode.co.uk/example/WebComps/GeolocationPlotter.html GeolocationPlotter Example]
  
  

Latest revision as of 15:52, 27 April 2026

Author MatrixTSL
Version 1.0
Category Data


Location component

Component that provides the mobile device's physical location.


Version information

Library Version, Component Version, Date, Author, Info
1, 1.0, 23-04-26, ST, Created

Detailed description

Many mobile devices have the capability of reporting the physical location of the device (e.g. by using an internal GPS sensor).

This component allows access to this information.


Examples

Plotting geolocation data

This example regularly plots the current location of the device onto a canvas object.

FC6 Icon.png GeolocationPlotter.fcweb

The web app created by this example can be viewed here: GeolocationPlotter Example


Macro reference

Cancel

Fc9-comp-macro.png Cancel
Cancels any continuous retrieval of location information. 
Fc9-void-icon.png - VOID Return


GetPosition

Fc9-comp-macro.png GetPosition
Asks the device to return position information. The OnSuccess callback will be called with appropriate location information is successful. If unsuccessful, the OnFailure callback will provide the reason for failure. Returns false if geolocation is not supported by the browser. 
Fc9-bool-icon.png - BOOL Continuous
Set to true to continually monitor the position and receive a callback whenever the location has changed 
Fc9-bool-icon.png - BOOL Return


Property reference

Fc9-prop-icon.png Properties
Fc9-type-24-icon.png OnSuccess
Called when position info is successfully found. Latitude, longitude and altitude are provided as parameters. The raw object is also provided for advanced information. 
Fc9-type-24-icon.png OnFailure
Called when position info is not returned successfully 
Fc9-conn-icon.png Options
Fc9-type-21-icon.png MaximumAge
Maximum age (in ms) of a possible cached position that is acceptable to return. A value of 0 means the device must always attempt to retrieve to actual current position. 
Fc9-type-21-icon.png Timeout
The maximum time (in ms) that the device can take when trying to retrieve a position. 
Fc9-type-7-icon.png HighAccuracy
Using High Accuracy will provide a more accurate position, but may be slower and increase power consumption. 

Component Source Code

Please click here to download the component source project: FC_Comp_Source_WEBEXP_Geolocation.fcsx

Please click here to view the component source code (Beta): FC_Comp_Source_WEBEXP_Geolocation.fcsx