标签:success point function nbsp ant javascrip ati oca this
// 获取用户当前位置 var geolocation = new BMap.Geolocation(); geolocation.getCurrentPosition(function(r){ if(this.getStatus() == BMAP_STATUS_SUCCESS){ var mk = new BMap.Marker(r.point); map.addOverlay(mk); map.panTo(r.point); alert(‘您的位置:‘+r.point.lng+‘,‘+r.point.lat); } else { alert(‘failed‘+this.getStatus()); } });
标签:success point function nbsp ant javascrip ati oca this
原文地址:https://www.cnblogs.com/xhrr/p/11640818.html