Browse Source

fix:热点当前坐标经纬度 ,转为浮点型

jinx 3 năm trước cách đây
mục cha
commit
c25575719f
1 tập tin đã thay đổi với 7 bổ sung0 xóa
  1. 7 0
      main.js

+ 7 - 0
main.js

@@ -80182,6 +80182,13 @@ and limitations under the License.
           (t.prototype.location = function (e) {
             if (this.filter.lon) throw new Error('location method can only be called once');
             var n = e.toArray();
+         
+            if(typeof(n[0])=="string"){
+              n[0] = parseFloat(n[0])
+            }
+            if(typeof(n[1])=="string"){
+              n[1] = parseFloat(n[1])
+            }
             console.log('n[0]',n)
             console.log('n[0].typeof',typeof(n[0]))
             return (