Commits

Colin Copeland  committed b0fabf8

close info window when clicking on empty area of map

  • Participants
  • Parent commits a3edb01

Comments (0)

Files changed (1)

File lib/copelco/apps/estate/static/js/estate.js

     table.append($('<thead>').append(tr));
     
     var infowindow = new google.maps.InfoWindow({ 
-        size: new google.maps.Size(150,50)
-      });
+        size: new google.maps.Size(150, 50)
+    });
+    
+    google.maps.event.addListener(map, 'click', function() {
+        infowindow.close();
+    });
       
     $.getJSON('/houses/map/markers/', function(data) {
         $(data).each(function (idx, item) {