How do I Add and Remove Polygons on Google Maps v3?

前端 未结 2 1029
伪装坚强ぢ
伪装坚强ぢ 2021-02-07 08:33

I\'m trying to show and remove polygons onto a Google Map, using v3 of the API. In my JavaScript, I\'ve already got an MVCArray of some custom Lat-Longs.

I\'m trying to

2条回答
  •  故里飘歌
    2021-02-07 08:57

    I'm not sure if this answer applies to javascript, but definitely applies to java.

    If you have a reference to the polygon object you want to remove, then simply call the remove() method of that polygon. Refer to the documentation linked below.

    https://developers.google.com/android/reference/com/google/android/gms/maps/model/Polygon.html#remove()

提交回复
热议问题