Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change for drawing Manager selection option by default?

I use google.maps.drawing.DrawingManager that seems like:

drawingManager = new google.maps.drawing.DrawingManager({
    drawingMode: google.maps.drawing.OverlayType.MARKER,
    markerOptions: {
        draggable: true,
        optimized: false,
        icon: new google.maps.MarkerImage('uxt/images/ap_gif.gif')
    },
    drawingControlOptions: {
        position: google.maps.ControlPosition.TOP_CENTER,
        drawingModes: [
        google.maps.drawing.OverlayType.MARKER,
        google.maps.drawing.OverlayType.POLYGON
        ]
    },

    polygonOptions: {
        fillColor: '#1E90FF',
        strokeWeight: 0,
        fillOpacity: 0.3,
        editable: true
    },
    map: mapA
});

so my toolbar looks like: enter image description here

As you see by default (after page reload) Marker is selected but i need "the hand" ('Stop drawing') to be selected. enter image description here

How can I configure drawingManager to make this?

Thank you.

like image 598
Maxim Shoustin Avatar asked Feb 17 '13 12:02

Maxim Shoustin


1 Answers

Just set drawingMode in options to null:

drawingManager = new google.maps.drawing.DrawingManager({
    drawingMode: null,
    ...
like image 176
dimusic Avatar answered Sep 18 '22 20:09

dimusic