获取到当前位置的经纬度(这个获取到的是百度地图坐标的经纬度)

var geolocation = new BMap.Geolocation();
geolocation.getCurrentPosition(function(r){
if(this.getStatus() == BMAP_STATUS_SUCCESS){
alert('您的位置:'+r.point.lng+','+r.point.lat);
}
else {
alert('failed'+this.getStatus());
}
});

相关文章:

  • 2021-12-04
  • 2021-06-07
  • 2021-06-05
  • 2021-12-31
  • 2021-12-20
  • 2021-09-23
  • 2021-05-18
猜你喜欢
  • 2021-08-16
  • 2021-09-27
  • 2021-12-10
  • 2022-12-23
  • 2021-11-17
  • 2022-12-23
  • 2021-11-17
相关资源
相似解决方案