Problem to show info window on clicking of every marker in gmap display only markers but not show info window..
var map;
var cPoly = null;
var cPolyM = null;
var cPts;
function linesMap() {
if (GBrowserIsCompatible()) {
var myString = document.getElementById('HF_LataLonList').value;
var myString1 = document.getElementById('hfroute1').value;
if (myString != '') {
var map = new GMap2(document.getElementById('mapLines'));
var splitted = myString.split(" ");
map.visible = true;
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
map.addControl(new GScaleControl());
map.setCenter(new GLatLng(splitted[0], splitted[1]), 15);
map.enableContinuousZoom();
map.enableDoubleClickZoom();
var pts1 = new Array();
// alert(splitted.length);
for (var i = 0; i < splitted.length; i++) {
pts1.push(new GLatLng(splitted[i], splitted[i + 1]));
var poly1 = new GPolyline(pts1, "#FF0000", 2, 0.5);
map.addOverlay(poly1);
map.addOverlay(new GMarker(new GLatLng(splitted[i], splitted[i + 1])));
var content = "Testing"
var infowindow = new google.maps.InfoWindow()
google.maps.event.addListener(GMarker, 'click', (function(GMarker, content, infowindow) {
return function() {
infowindow.setContent(content);
infowindow.open(map, GMarker);
};
})(GMarker, content, infowindow));
i++;
}
display only markers but not show info window.