Locator creates a Locator object to find the user's current location using either the device's GPS or information from the cell network and wifi.
app.CreateLocator(
type,
options ) ->
app object - Locator
Example - Example
function OnStart()
{
loc = app.CreateLocator("GPS,Network");
loc.SetOnChange(loc_OnChange);
loc.Start();
app.ShowPopup("Locating");
}
function loc_OnChange(pos)
{
var msg = pos.latitude + ", " + pos.longitude;
app.ShowPopup( msg );
}
The following methods are avaiable on the Locator object: