var geolocation = new BMap.Geolocation(); geolocation.getCurrentPosition(function(r){ if(this.getStatus() == BMAP_STATUS_SUCCESS){ var mk = new BMap.Marker(r.point); //所在區(qū)域中心點 map.addOverlay(mk); map.panTo(r.point); alert('您的位置坐標為:'+r.point.lng+','+r.point.lat); } else { //alert('failed'+this.getStatus()); } },{enableHighAccuracy: true});我在pc端可以在百度地圖獲取到當前位置。為什么到了手機中就沒有顯示了呢?謝謝
關(guān)于百度地圖問題。
牛魔王的故事
2018-11-14 18:25:29