How i add my own image or drawing option on google map drawing
google-maps, google-maps-api-3, javascript
Solution
I don't think you can add a custom control to the Drawing Manager controls as stated in the comments. But with a little bit of styling, you can add your own control next to it and make it look like it's part of the group.
What you need for that is to add your custom control to the same control position than your drawing controls:
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]
}
map.controls[google.maps.ControlPosition.TOP_CENTER].push(yourCustomControl);
Check the demo. It might not be perfect but you get the idea.
JSFiddle demo
Problem
I want to add my own `button` to enable my feature in `Google map drawing`. Here is the link for the sample drawing page Google Developers Drawing tools Here you can see 6 options for drawing. I want to add my option in these 6 option, How can I do that?