使用高德地图开发需要注意的一些点

一,使用Autocomplete和PlaceSearch查询出来的点如何清空?

  

if(this.placeSearch){
   this.placeSearch.clear();
   if(this.placeSearch.render){
       this.placeSearch.render.markerList.clear();
   }
}

 

this.placeSearch是一个创建的PlaceSearch对象

二,很多情况下调用marker的show()或者hide()方法不生效?

   这种情况可以用marker的setMap(this.map),setMap(null)来代替show()和hide()方法。

posted @ 2018-06-26 15:25  尹言覃少  阅读(1389)  评论(0编辑  收藏  举报