This is my first post here, o let me say hi 🙂
I have a problem with my google map. What I try to do is to get locations from mySQL database, and set a marker for every location on the map. Seems prety basic and easy. But I have a very limited web-developer knowledge, being a chemist 😉 What my page does – it just loads one record, not two (there are only two rows in the database anyway). You can find the code here
I have checked the query with another script – sit gets both records, while loop also seems fine. But somehow i get just 1 marker on the map 🙁 COuld you have a look please and check for the mistakes? I assume something is wrong with the marker generation in the loop…
Cheers, Michal
You only have one marker.
var marker_ = new google.maps.Marker({
position: myLatLng,
map: map,
title: tytul,
zIndex: id
});
Here is a good way to handle it:
Google Maps JS API v3 – Simple Multiple Marker Example