User Tools

Site Tools


built_in:locator

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
built_in:locator [2014/12/18 19:52]
bcarroll created
built_in:locator [2015/03/22 00:46] (current)
Line 1: Line 1:
-====== Location control ======+====== Locator control ======
 Use GPS and/or network to find location Use GPS and/or network to find location
  
-===== Create ===== +===== Description ===== 
-Create a Locator object using the CreateLocator function of the app object:+Create a Locator object using the **CreateLocator** function of the **[[built_in:app|app]]** object:
 <code>sns = app.CreateLocator( provider );</code> <code>sns = app.CreateLocator( provider );</code>
-Location providers available are: "GPS""Network""GPS,Network".+Location providers available are:  
 +  * **"GPS"** 
 +  * **"Network"** 
 +  * **"GPS,Network"**
  
-You can use the SetOnChange function of the Locator to set the name of a function you want to be called when a the changes occur.+You can use the **SetOnChange** function of the Locator to set the name of a function you want to be called when a the changes occur.
  
-Change the rate that a Locator checks for changes with the SetRate method.+Change the rate that a Locator checks for changes with the **SetRate** method.
 ===== Methods ===== ===== Methods =====
 ^Method ^Description ^ ^Method ^Description ^
-|Locator.SetOnChange( callback ) | | 
-|Locator.SetRate( seconds ) |Set Locator update frequency in seconds | 
-|Locator.Start() | | 
-|Locator.GetDistanceTo() |Returns the approximate distance in meters between this location and the given location. | 
 |Locator.GetBearingTo() |Returns the approximate initial bearing in degrees East of true North when traveling along the shortest path between this location and the given location. | |Locator.GetBearingTo() |Returns the approximate initial bearing in degrees East of true North when traveling along the shortest path between this location and the given location. |
 +|Locator.GetDistanceTo() |Returns the approximate distance in meters between this location and the given location. |
 +|Locator.SetOnChange(callback) | |
 +|Locator.SetRate(seconds) |Set Locator update frequency in seconds |
 +|Locator.Start() | |
 +|Locator.Stop() | |
 +
built_in/locator.1418932333.txt.gz · Last modified: 2014/12/19 03:52 (external edit)