Call location coordinates from outside the function
问题 I'm try to access the lat and long from getCurrentPosition so that I can create a URL to use with an API. This is working if you call it from within the function or if you set a timeout on an alert(outside the function), as the current position takes a few moments to determine the coordinates. How can I access coords variables and/or the URL one? Thank you var coords1; var coords2; if (Ti.Geolocation.locationServicesEnabled) { Titanium.Geolocation.purpose = 'Get Current Location'; Titanium