The Locator component can be used to find your whereabouts on the planet using either your device's GPS or information from your network.
loc = app.CreateLocator(
→ app object:
The provider specifies where the locator should retreive its information from . “Network” means get the location from the cell network and wifi, “GPS” tells the locator to use the device's GPS
To Start the locator use the Start method. You can also stop it with Stop.
To get regulat updates about your current positino use the SetOnChange function.
Example - Get Location Updates
loc = app.CreateLocator("GPS,Network");
var msg = pos.latitude + ", " + pos.longitude;
app.ShowPopup( msg );
The following methods are available on the Locator object:
string: comma “,” separated
string: comma “,” separated: “GPS”, “Network”
Returns the approximate initial bearing in degrees East of true North when traveling along the shortest path between this location and the given location.
Returns the approximate distance in meters between this location and the given location.
Returns the control class name.
Define a function which is called when some of the values changed.
Set Locator update frequency in seconds
Start the locator.
Stop the locator.