墨云 %!s(int64=2) %!d(string=hai) anos
pai
achega
61e0c1f573
Modificáronse 1 ficheiros con 5 adicións e 2 borrados
  1. 5 2
      whepi-ui/templates/home/getLocation.js

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

@@ -19,6 +19,7 @@ function getLocation() {
 
       var geocoder = new qq.maps.Geocoder({
         complete: function (result) {
+          alert(JSON.stringify(result.detail.addressComponents));
           // alert(JSON.stringify(result.detail.addressComponents));
           if ('武汉市' === result.detail.addressComponents.city) {
             autoLocal = '武汉市';
@@ -61,8 +62,10 @@ function getLocation() {
         }
       })
       var coord = new qq.maps.LatLng(res.latitude, res.longitude)
-      longitude = parseFloat(res.longitude);
-      latitude = parseFloat(res.latitude);
+      longitude = res.longitude;
+      latitude = res.latitude;
+      alert(longitude)
+      alert(latitude)
       $("#commit").removeAttr("disabled",true).css("pointer-events","");
       $("#commit").css("background-color","#1AAD19").css("color","#FFFFFF");
       $("#dingwei").hide();