I want to give user the opportunity to draw polygons and load stored
polygons from a database. I want to have only one polygon at one time
so I'd like to disable the "draw function" if there already is one
polygon on the map.
How can I achive this?
Thanks
JML
Enoch Lau (Google Employee)
unread,
Jan 24, 2012, 4:02:14 PM1/24/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
You could set the drawing modes visible on the control to be an empty array; that way, the only control visible is the 'hand', that lets them pan the map.
Enoch
JML
unread,
Jan 25, 2012, 3:26:07 AM1/25/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Maps JavaScript API v3
How can I set the ooptions to an empty array? Can you give me an
example?
JML
unread,
Jan 25, 2012, 3:52:25 AM1/25/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Maps JavaScript API v3
This is how I did it:
drawingManager.setOptions({drawingControlOptions: {drawingModes: new
Array()}});