【发布时间】:2012-03-29 12:27:24
【问题描述】:
我正在尝试在 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 定位?在 Manifest 文件中启用 GPS。
【问题讨论】:
标签: android sencha-touch