var marker = new google.maps.Marker({
position: myLatlng,
map: map,
title:"Hello World!"
});
<?php
$fd = fopen ("landmarks.csv", "r");
echo "var latlngarr=new Array();";
$i=0;
echo "var markerarr=new Array();";
while (!feof ($fd)) {
$buffer = fgetcsv($fd, 4096);
echo "var latlngarr[$i] = new google.maps.LatLng($buffer[2],$buffer[3]);";
echo "var markerarr[$i] = new google.maps.Marker({
position: latlngarr[$i],
map: map,
title:$buffer[1]";
});
$i++;
}
fclose ($fd);
?>
I want to create multiple markers in google maps..the first entry works…but the other ones, from the csv file dont work? Is there something wron with the mixed php and Javscript code?
Add quotes around strings and fix missing
}