How do I detect a click event on a google map through an overlay?
- by freddoo
My problem is that I have a circle map overlay but I want to be able to move the circle by clicking the map to set the new center, the actual problem is that when I click on the overlay and call my method 'setCenter(overlay, latlng) ' , I get undefined latlang and a valid overlay.
here is an example that can illustrate the problem, if you click the map a polygon is drawn and if you click inside the polygon no new polygon is drawn, if you click anywhere else on the map a polygon is drawn
http://code.google.com/apis/maps/documentation/examples/polygon-simple.html
I want to be able to click the polygon and draw a new one making them overlap
thanks