From the screen capture you added code to "googlemap.ide.js".
There should also be code added to "googlemap.runtime.js" which makes the approate updates.
The updates include adding the option "drawingControl: true," to options when the item is checked.
You also added the drawing library:
googleMapsConnectionString = _invoker.result.rows[0].GetGoogleMapsConnectionString + "&libraries=drawing";
When defining an instance of the Google Map you need to create an instance of the map object. This looks like
= new google.maps.Map(document.getElementById("map"),
from the Google Maps Documentation. When reviewing the "googlemap.runtime.js" we find:
thisWidget.map = new google.maps.Map(document.getElementById(thisWidget.jqElementId), options);
This creates a Google Map object. From the google documents you need to load the drawing manager. You need to add code which looks like:
thisWidget.drawingManager = new google.maps.drawing.DrawingManager({
drawingMode: google.maps.drawing.OverlayType.MARKER,
drawingControl: true,
drawingControlOptions: {
position: google.maps.ControlPosition.TOP_CENTER,
drawingModes: [
google.maps.drawing.OverlayType.MARKER,
google.maps.drawing.OverlayType.CIRCLE,
google.maps.drawing.OverlayType.POLYGON,
google.maps.drawing.OverlayType.POLYLINE,
google.maps.drawing.OverlayType.RECTANGLE,
],
},
markerOptions: {
icon: "https://developers.google.com/maps/documentation/javascript/examples/full/images/beachflag.png",
},
circleOptions: {
fillColor: "#ffff00",
fillOpacity: 1,
strokeWeight: 5,
clickable: false,
editable: true,
zIndex: 1,
},
});
thisWidget.drawingManager.setMap(thisWidget.map);
The above is based on the Google Maps https://developers.google.com/maps/documentation/javascript/examples/drawing-tools
Let me know if you have any questions.
Peter
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.

