Commit dddea87f authored by xxx's avatar xxx

1

parent df9253ad
...@@ -361,17 +361,18 @@ export default { ...@@ -361,17 +361,18 @@ export default {
navigator.geolocation.getCurrentPosition( navigator.geolocation.getCurrentPosition(
//locationSuccess 获取成功的话 //locationSuccess 获取成功的话
function(position) { function(position) {
console.log(position);
let LoaObj1 = {}; let LoaObj1 = {};
let LoaObj1xy = {}; let LoaObj1xy = {};
//判断该车是否在行驶状态 //判断该车是否在行驶状态
let drivingDistance = that.getDistanceIndex(that.navigatorXY.y,that.navigatorXY.x,position.coords.latitude,position.coords.longitude); let drivingDistance = that.getDistanceIndex(that.navigatorXY.y,that.navigatorXY.x,position.coords.latitude,position.coords.longitude);
//console.log(drivingDistance); console.log(drivingDistance);
if(drivingDistance <= 1){ if(drivingDistance <= 1){
that.leftBtnDisable = true; that.leftBtnDisable = true;
}else{ }else{
that.leftBtnDisable = false; that.leftBtnDisable = false;
} }
if(drivingDistance > 15 && drivingDistance < 10000){ if(drivingDistance > 100 && drivingDistance < 10000){
LoaObj1xy.x = that.navigatorXY.x; LoaObj1xy.x = that.navigatorXY.x;
LoaObj1xy.y = that.navigatorXY.y; LoaObj1xy.y = that.navigatorXY.y;
LoaObj1.gndRate = ''; LoaObj1.gndRate = '';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment