I do not know why my google markers are not showing. I am using PHP and Java Script. I checked to make sure $DNB had elements in it. Here is my code:
while($DNB -> fetch())
{
?>
var point = new GLatLng(<?php echo intval($lat) ?>, <?php echo intval($lon) ?>);
var marker = new google.maps.Marker({position: point, map:map});
<?php
}
From the code you provided, while your
$DNBmight have contents inside, it looks like your $lat and $lon are not initialized.If that doesn’t solve your problem, please refer to the working example I have below: