我正在尝试在Sencha Touch 2中获取用户位置:
var geo = new Ext.util.Geolocation({
autoUpdate: true,
allowHighAccuracy: true,
listeners: {
locationupdate: function(geo) {
lat = geo.getLatitude();
lon = geo.getLongitude();
// here comes processing the coordinates
}
}
});
但是我只从网络中获取到坐标。在Android设备上没有GPS图标,也没有指示我正在使用GPS。而且当我关闭互联网连接时它不起作用。如何启用GPS定位?在清单文件中启用了GPS。