title: Google maps API dblclick markers, open new window and add Info
body: <p>The global idea: at first user can add markers and polyline. Then he can add Infowindow for every markers through new window by dblclick. But unfortunately dblclick to marker does not work. And can you give some advice: How to make adding information to the marker through jQuery?</p>
  
  <pre><code>     var all_overlays = [];
  
  function writeInfo() {
              alert("привет!");
          }
  
  function addPolyline() {
              drawingManager.setDrawingMode(google.maps.drawing.OverlayType.POLYLINE);
        }
  
        function addMarker() {
              drawingManager.setDrawingMode(google.maps.drawing.OverlayType.MARKER);
        }
  function initialize() {
          var map = new google.maps.Map(document.getElementById('map'), {
            zoom: 4,
            //maxZoom:7,
            minZoom: 2,
            disableDoubleClickZoom: true,
            center: new google.maps.LatLng(59.32522, 18.07002),
            mapTypeId: google.maps.MapTypeId.ROADMAP,
            disableDefaultUI: true,
            zoomControl: true
          });
  
          var polyOptions = {
            strokeWeight: 0,
            fillOpacity: 0.45,
            editable: true
          };
  
          drawingManager = new google.maps.drawing.DrawingManager({
          drawingControl: false,
          drawingControlOptions: {
              position: google.maps.ControlPosition.TOP_CENTER,
              drawingModes: [
                  google.maps.drawing.OverlayType.MARKER,
                  polyLine = google.maps.drawing.OverlayType.POLYLINE,
              ]
          },
            markerOptions: {
              draggable: true,
              animation: google.maps.Animation.DROP
            },
            polylineOptions: {
              editable: true,
              geodesic: true
            },
            map: map
          });
  
         google.maps.event.addListener(drawingManager, 'overlaycomplete', function(e) {
              var allOverlays = all_overlays.push(e);
              if (e.type != google.maps.drawing.OverlayType.MARKER) {
               var line = e;
               line.type = e.type;
               var newShape = e.overlay;
               newShape.type = e.type;
  
              google.maps.event.addListener(newShape, 'click', function() {
                setSelection(newShape);
              });
              setSelection(newShape);
              }
          });
  
          google.maps.event.addListener(all_overlays, 'dblclick', writeInfo);
  </code></pre>
  
  <p>google.maps.event.addListener("this must be variable where object is stored, yes?", 'dblclick', writeInfo);</p>