function onPlusReady() {
plus.geolocation.watchPosition(function(p) {
var longitude = forDight(p.coords.longitude, 6);
var latitude = forDight(p.coords.latitude, 6);
var altitude = forDight(p.coords.altitude, 2);
var accuracy = forDight(p.coords.accuracy, 2);
document.getElementById("longitude").innerHTML = "经度:" + longitude;
document.getElementById("longitudeInput").value = longitude;
document.getElementById("latitude").innerHTML = "纬度:" + latitude;
document.getElementById("latitudeInput").value = latitude;
document.getElementById("altitude").innerHTML = "海拔:" + altitude +"米";
document.getElementById("altitudeInput").value = altitude;
document.getElementById("accuracy").innerHTML = "定位精度:" + accuracy + "米";
document.getElementById("accuracyInput").value = accuracy;
document.getElementById("zuobiao").innerHTML = "座标系:" + p.coordsType;
}, function(e) {
document.getElementById("longitude").innerHTML = "定位失败!";
document.getElementById("latitude").innerHTML = "";
document.getElementById("altitude").innerHTML = "";
}, function(e){}, {provider:'baidu'});
}
TeRny (作者)
而且我发现了一个问题,明明都配置了provider:baidu,安卓的变成了bd09ll,苹果怎么还是wgs84
2016-04-14 16:54
Android_XR
嗯,QQ聊吧:1913686263
2016-04-14 17:03
DCloud_IOS_XTY
而且我发现了一个问题,明明都配置了provider:baidu,苹果怎么还是wgs84,经测试未发现有你说的问题
2016-04-14 17:52
DCloud_IOS_XTY
请提供可以复现问题的demo
2016-04-14 17:57
TeRny (作者)
回复 Android_XR:好,我明天找你,今天下班了
2016-04-14 19:57