方法转自百度地图论坛@ hx863975383:http://bbs.lbsyun.baidu.com/forum.php?mod=viewthread&tid=82409

让tilesloaded只触发一次可以这样,先注册tilesloaded事件,然后在它的回调函数中注销掉就可以了:
function add(){
    var point = new BMap.Point(116.404031, 39.915023);
    var marker = new BMap.Marker(point);           
    map.addOverlay(marker);
    map.removeEventListener("tilesloaded",add);
  }
  map.addEventListener("tilesloaded",add);

相关文章:

  • 2021-11-15
  • 2021-10-19
  • 2021-04-05
  • 2021-04-27
  • 2022-12-23
  • 2022-01-25
  • 2022-12-23
  • 2021-11-15
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-03
  • 2021-06-03
  • 2022-12-23
  • 2021-10-19
相关资源
相似解决方案