Skip to content
This repository has been archived by the owner on May 11, 2020. It is now read-only.

turning drawing manager on and off on click #494

Closed
samriddhi opened this issue Jan 26, 2016 · 3 comments
Closed

turning drawing manager on and off on click #494

samriddhi opened this issue Jan 26, 2016 · 3 comments

Comments

@samriddhi
Copy link

Hi @allenhwkim!
I have been trying to turn drawing manager on by changing drawingControl dynamically using multiple scope variables, even the provided ones.
$scope.vm.map.mapDrawingManager[0].drawingControl = false;
$scope.vm.map.drawingControl = true;

That doesnt seem to turn on drawing manager. I did manage to do it with native google code by initializing the manager but then I couldn't get any data back. Is there a way I can turn this feature on and off without having to duplicate the map?

@allenhwkim
Copy link
Owner

Documentation here. https://developers.google.com/maps/documentation/javascript/overlays#drawing_tools

Try this map.mapDrawingManager[0].setOptions({drawingControl:false})

@beaver71
Copy link

why not observe also drawingControl attribute changes?

@samriddhi
Copy link
Author

I have tried that before it changes the object but doesn't affect the map itself.
Also looking into the code it seems you have a TODO listed on the drawing manager area to implement it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants