Created
October 7, 2011 17:31
-
-
Save aaronksaunders/1270873 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Titanium.Geolocation.accuracy = Titanium.Geolocation.ACCURACY_BEST; | |
| Titanium.Geolocation.distanceFilter = .25; | |
| Ti.Geolocation.purpose = "Callbacks Are Your Friend"; | |
| // make the API call | |
| Ti.Geolocation.getCurrentPosition(function(e) { | |
| // do this stuff when you have a position, OR an error | |
| if (e.error) { | |
| Ti.API.error('geo - current position' + e.error); | |
| return; | |
| } | |
| // got the location information | |
| Ti.App.info('got a location ',JSON.stringify(e)); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment