Draw polygon without using the mouse

37 views
Skip to first unread message

Gilson Carvalho

unread,
Oct 1, 2015, 8:44:15 PM10/1/15
to Google Maps JavaScript API v3
I need to create a tool to draw polygons (using the existing polygon tool) without using the mouse.
I thought it would be easy emulating the click event, but it worked.

https://jsfiddle.net/1ffurnj9/
(Add a coordinate ( lat and lng ) at a time and click the Add button. My code does not work , just to demonstrate what I need.)

I do not know if I can use the "new google.maps.Polygon()", because I have to add one point at a time.

Can anyone help me?

Thanks.

[Sorry my bad english]
Reply all
Reply to author
Forward
0 new messages