I also have an interface where a user can manage several locations for his business, add additional places and delete places that they no longer need.
In my interface, I display a list of places, each with its own map.
My question is how to lock the map so that the user cannot pan or move the marker until he clicks the "change location" button?
Is there any toggleMapLock function?
So far, I have had the following two methods. Castle(); the method works fine, but unlock (); for some reason the method does not work.
lock: function() {
this.map.disableDoubleClickZoom = true;
this.map.draggable = false;
this.map.keyboardShortcuts = false;
this.map.navigationControl = false;
this.map.scaleControl = false;
this.map.scrollwheel = false;
this.map.streetViewControl = false;
this.marker.draggable = false;
},
unlock: function() {
this.map.disableDoubleClickZoom = false;
this.map.draggable = true;
this.map.keyboardShortcuts = true;
this.map.navigationControl = true;
this.map.scaleControl = true;
this.map.scrollwheel = true;
this.map.streetViewControl = true;
this.marker.draggable = true;
console.log("unlock");
},