How do I detect a click event on a google map through an overlay?
Posted
by freddoo
on Stack Overflow
See other posts from Stack Overflow
or by freddoo
Published on 2010-03-21T18:26:30Z
Indexed on
2010/03/21
18:31 UTC
Read the original article
Hit count: 415
google-maps-api
|google-maps
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
© Stack Overflow or respective owner