にエラーコード3をタイムアウトになりました。 コルドバプラグインジオロケーションは、バージョン2.2.0です。コルドバイオンジオロケーションは失敗:位置の取得は、私がコルドバとイオンを使用して、アプリ、IOS /アンドロイドに取り組んでいるのiOS
それはアンドロイドに良い取り組んでいます。 が、iOSでは、ウォッチャ4回から新しい位置を受け取った後、私は次のエラーを持っている:
PositionError {code: 3, message: "Position retrieval timed out.", PERMISSION_DENIED: 1, POSITION_UNAVAILABLE: 2, TIMEOUT: 3}
誰かが解決策を持っていますか?ここ
私のコードの一部:
var posOptions = {
timeout : 10000,
enableHighAccuracy: false
};
var watchOptions = {
timeout : 10000,
enableHighAccuracy: false // may cause errors if true
};
/**
* Sets initial user position.
*/
$ionicPlatform.ready(function() {
console.log('ready');
$cordovaGeolocation
.getCurrentPosition(posOptions)
.then(function (position) {
setLocationData(position);
}, function (err) {
// error
});
/**
* Watches for user position.
*/
$timeout(function() {
console.log(watchOptions);
var watch = $cordovaGeolocation.watchPosition(watchOptions);
watch.then(
null,
function (err) {
// error
console.log(watchOptions);
console.log(err);
alert(err);
},
function (position) {
console.log(watchOptions);
console.log('refresh')
alert('refresh');
setLocationData(position);
});
}, 10000);
});
をはいアプリがアクセス権を求めますそれは非常に行く動作するため それは奇妙だ、アプリケーションが4時間に私の右の位置を与える、と私はエラーを取得した後、「位置検索がタイムアウトしました」アンドロイドにod – Jeffrey