Removing a Google maps Circle/shape

后端 未结 4 1963
长情又很酷
长情又很酷 2021-02-03 21:40

I am creating a Circle using the google.maps.Circle() method. This all works fine and dandy, but how can I remove said circle?

My code:

var populationOpt         


        
4条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-03 22:19

    You need to call the setMap method on the Circle object to null:

    cityCircle.setMap(null);
    

提交回复
热议问题