X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plugins%2Fgooglemaps%2Fstatic%2Fjs%2Fgooglemaps.js;h=d72e2773ea774c3d366677b291ceb39b1680947b;hb=c82cd94c927d1f2ccf60a0f3b1a014c1425b1727;hp=e97d1f5f5bd7bca26434dd32d548b16a11fd6bad;hpb=8c344999d6ee3b3a9172a1068a77c83af77a7aee;p=myslice.git diff --git a/plugins/googlemaps/static/js/googlemaps.js b/plugins/googlemaps/static/js/googlemaps.js index e97d1f5f..d72e2773 100644 --- a/plugins/googlemaps/static/js/googlemaps.js +++ b/plugins/googlemaps/static/js/googlemaps.js @@ -121,14 +121,15 @@ addInfoWindow: function(marker, map) { + var self = this; google.maps.event.addListener(marker, 'click', function () { - if(object.infowindow){ - object.infowindow.close(); + if(self.infowindow){ + self.infowindow.close(); } - object.infowindow.setContent(marker.content);// = new google.maps.InfoWindow({ content: marker.content }); - object.infowindow.open(map, marker); + self.infowindow.setContent(marker.content);// = new google.maps.InfoWindow({ content: marker.content }); + self.infowindow.open(map, marker); // onload of the infowindow on the map, bind a click on a button - google.maps.event.addListener(object.infowindow, 'domready', function() { + google.maps.event.addListener(self.infowindow, 'domready', function() { jQuery('.map-button').unbind('click'); // jQuery(".map-button").click({instance: instance_, infoWindow: object.infowindow}, button_click); });