1

Following code gives compile error in order to get location info from gps for smartface 4.5 for android and ios. How to get loctaion with SMF 4.5?

// Get location
* @this SMF.Net.Eventsfunction Global_Events_OnLocationChanged(e){
alert(e.lat);
alert(e.lng);
}
Alex Guba
  • 134
  • 1
  • 10

1 Answers1

0

You should set GPS status as true before Global_Events_OnLocationChanged event.

Device.setGPSStatus(true);

* @this SMF.Net.Events
*/
function Global_Events_OnLocationChanged(e){
   alert("myLat : " + e.lat);
   alert("myLng :" + e.lng);
}
Ed Glazer
  • 121
  • 3