samedi 22 mars 2014

Sencha / Cordova geolocation

Hi



In my project im using the gps for devices and html5 geolocation api for the rest



I can get the current location by "Ext.util.Geolocation" and "Ext.device.Geolocation.getCurrentPosition" but when i try to store the current location in global variable in the Controller to be used by the others events i can't retreive it



To store the current location in the global variable with "Ext.device.Geolocation.getCurrentPosition" for example, i do :




Code:



this.Lat = position.coords.latitude;

this.Lng = position.coords.longitude;



BRGD




Aucun commentaire:

Enregistrer un commentaire