getlocationpoint:function () { if (navigator.geolocation){ navigator.geolocation.getCurrentPosition( function (position) { latitude = position.coords.latitude;//獲取緯度 longitude = position.coords.longitude;//獲取經度 }); }else{ alert("不支持定位功能"); } }
坑: ios獲取地理定位需要https請求,因此頁面放的服務器爲https服務器。
訪問路徑如下:https://appinter.sunwoda.com/download/pda/busfoeweixin/busfoweixin/busall.html