M
M
MeloD2017-08-17 05:07:44
JavaScript
MeloD, 2017-08-17 05:07:44

How to remove a polygon in google map?

All good...!
Here is a link to the snippet https://jsfiddle.net/SlaXe/44s4885r/12/
If you just draw and then clear, then everything works, but if you first draw and then move the map, then the polygon is not deleted.
Same problem with markers.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freeExec, 2017-08-17
@freeExec

Because your poly object is redefined every time, and the link to the old one is lost, so you can no longer remove them.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question