Don't require a second click to create an OpenStreetBug
[rails.git] / app / views / site / index.html.erb
index b668627a0bd6be427af77b3747882fd17d0f9157..681924444a7fefaf5aaa6d830fb00c5292b3008c 100644 (file)
@@ -161,8 +161,10 @@ end
       map.addControl(map.osbControl);
                
          var lBug = document.getElementById('ReportBug');
       map.addControl(map.osbControl);
                
          var lBug = document.getElementById('ReportBug');
+     /* lBug.addEventListener('click',function (e) {
+               map.osbControl.activate(); document.getElementById("OpenLayers.Map_18_OpenLayers_Container").style.cursor = "crosshair" },false); */
       lBug.addEventListener('click',function (e) {
       lBug.addEventListener('click',function (e) {
-               map.osbControl.activate(); document.getElementById("OpenLayers.Map_18_OpenLayers_Container").style.cursor = "crosshair" },false);
+               map.osbControl.activate(); map.osbControl.addTemporaryMarker(map.getCenter());},false);
 
      map.events.register("zoomend",map,function () { var zoom = map.getZoom(); var lBug = document.getElementById('ReportBug')
         if (zoom > 11) { lBug.style.visibility = 'visible';} else {lBug.style.visibility = "hidden";}});
 
      map.events.register("zoomend",map,function () { var zoom = map.getZoom(); var lBug = document.getElementById('ReportBug')
         if (zoom > 11) { lBug.style.visibility = 'visible';} else {lBug.style.visibility = "hidden";}});