Skip to content Skip to sidebar Skip to footer

Google Maps- Multiple Infowindows

I have a javascript code as below var markers = response.d.split('^^'); var latlng = new google.maps.LatLng(51.474634, -0.195791); var mapOptions1 = {

Solution 1:

pass the infowindow as argument to the function that returns the click-callback:

            google.maps.event.addListener(marker, 'click', (function (infowindow) {
                return function () {
                    infowindow.open(map, this);
                }
            })(infowindow));

Post a Comment for "Google Maps- Multiple Infowindows"