How to add onClick the "Draw Shape" button in Google Maps Api?

0

I would like to add the "onClick" event in the "Draw Form" of the "Drawing Controller" of google maps api v3.

I could not find the documentation and can not right-click the button to check if it has an "id".

Would anyone know how to do this?

    
asked by anonymous 19.12.2017 / 15:10

1 answer

0

Just get the shape by pointing your variable. For example, let's say you have a location pointer. You call its variable and insert an event with:

marker.addListener ('click', function () {     // action code here ... });

I advise you to iterate on the points or objects that you want to have actions. Create a function for this face, then you will see that it will be needed on a larger scale.

    
19.12.2017 / 15:18