Hi im doing a webpage that will ask user to input date range and time range
and it will ouput tabular data and below that it will plot it on googlemap
its working fine but it only show one marker on google map
i need it to show all the data marker inshort multiple marker
this is my php query code
[php]while($row = mysqli_fetch_array($query)){
$station = $row[‘STATION’];
$pei = $row[‘PEIS’];
$pga= $row[‘PGA’];
$pgv= $row[‘PGV’];
$lat = $row[‘LAT’];
$lon = $row[‘LON’];
//$timestamp = strtotime()
echo '<tr><td>'.$station.'</td><td>'.$pei.'</td><td>'.$pga.'</td><td>'.$pgv.'</td></tr>';
}
}
}[/php]
this is my javascript code
[code][code]
function initMap() {
var myLatLng = {lat: <?php echo $lat; ?>, lng: <?php echo $lon; ?>};
var map = new google.maps.Map(document.getElementById(‘map’),
{
zoom: 4,
center: myLatLng
});
var marker = new google.maps.Marker({
position: myLatLng,
map: map,
title: ‘Hello World!’
});
}
</script>[/code][/code]