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?
Change how a map looks Open a map you can edit or create a map. To choose a style, click one of the images.
Open Google Maps and click the menu button in the top left corner. Click Your Places > Maps > Create Map. Name your map and enter in a description. Add markers for your desired locations.
On your computer, open Google Maps. Your contributions. Under the "Contribute" tab, click Add your photos to Maps. You only get this option if you take photos on your phone and we can find their location.
Start by adding your own button in HTML
<button id="custom-BtnPolygon">Draw</button>
<button id="custom-BtnPolyline">Draw</button>
and call it from your javascript to invoke google drawingManager
$("#custom-BtnPolygon").click( function(){
drawingManager.setDrawingMode(google.maps.drawing.OverlayType.POLYGON);
});
$("#custom-BtnPolyline").click( function(){
drawingManager.setDrawingMode(google.maps.drawing.OverlayType.POLYLINE);
});
Initiate polygon drawing from custom button
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With