1
我试图做几个小时,并没有成功。
我有一个承诺$ cordovaGeolocation返回的经度和纬度非常基本等于ngCordova文档。
我想知道如何返回我在函数外部的数组中的经度和纬度。
我该怎么做?
遵循代码结构。
$cordovaGeolocation.getCurrentPosition().then(function(position) {
var lat = position.coords.latitude;
var long = position.coords.longitude;
alert(lat + " | " + long);
}, function (err) {
console.log("fail");
});
var deviceInfo = {
uuid: uuid,
dataDevice: [
{
model: model
}
]
};
谢谢
谁能帮助? 感谢:D – estevammr