On Dec 28, 1:33 pm, Michael Drayson <michael.dray...@gmail.com> wrote: > Hello all, > > I am a relative newbie, and have been recently trying to get to grips with > the Google Maps v3 API. > > I'm hoping someone here will be kind enough to take pity and help me with > some difficulty I am having. > > First, let me set the scene. ...
If you cut to the chase you'll help us help you. Personally, I have no time to read dozens of novels a day. :-) > > However, I am getting confused regarding the markers, it would seem like my > code (which can be found below) is iterating through all of the companies, > and then setting just one marker for all points? > Look up function closure: http://econym.org.uk/gmap/closure.htm You need to create the markers in a separate function, otherwise the variable contentString will always get the last value in the loop. > The code can be found athttp://paste.bradleygill.com/index.php?paste_id=348277 No need for that. We know how to view source. -- Marcelo - http://maps.forum.nu -- > > I am hoping you can see what I'm doing here. The PHP script is printing > HTML / JavaScript code to the page, which includes a foreach loop, which > grabs the long lats and puts them into google.maps.LatLng > > I am just just struggling with the markers - and I cannot see where I've > gone wrong! > > Thanks so much in advance for any help you can provide me! > > All the best, and Merry Christmas, > > Michael -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to google-maps-js-api-v3@googlegroups.com. To unsubscribe from this group, send email to google-maps-js-api-v3+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.