I am trying to pop open the info window after clicking the marker in Google Map, but it's not showing... Am I missing anything in my code? Any advice will be appreciated! Thx.
MY CODE:
var myLatlng = new google.maps.LatLng(21.291334,-157.840791);
var mapOptions = {
zoom: 5,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP,
}
var marker = new google.maps.Marker({
position: myLatlng,
title: "Testmarker1"
});
var infowindow = new google.maps.InfoWindow({
content: 'Hello'
});
//clicklistener
google.maps.event.addListener(marker,'click', function()
{
infowindow.open(map, marker);
});
Tiggr("googlemap1").options.mapElement.gmap('addMarker',marker);
Tiggr("googlemap1").options.mapElement.gmap(mapOptions);
Tiggr("googlemap1").options.mapElement.gmap("refresh");