소스 검색

修改ios定位

墨云 2 년 전
부모
커밋
648f71a1f3
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      whepi-ui/templates/home/getLocation.js

+ 2 - 2
whepi-ui/templates/home/getLocation.js

@@ -61,8 +61,8 @@ function getLocation() {
         }
       })
       var coord = new qq.maps.LatLng(res.latitude, res.longitude)
-      longitude = res.longitude;
-      latitude = res.latitude;
+      longitude = parseFloat(res.longitude);
+      latitude = parseFloat(res.latitude);
       $("#commit").removeAttr("disabled",true).css("pointer-events","");
       $("#commit").css("background-color","#1AAD19").css("color","#FFFFFF");
       $("#dingwei").hide();