Hello Everyone, so after days of shooting myself in the foot, I figured I would ask the experts.
I am trying to make something like this. http://www.dickinson.edu/alumni/alumnihomes.cfm I have a database of addresses and able to select the address based on the specified zip code and send them to the map. Here is where I hit a wall. The information in the markers markers always display the last data of my array. After some poking around I found out that I was only creating one instance of the marker variable. After some googling I was able to make the createMarkers method as suggested. However The same problem is still occurring. I have tried many things. I am now at the point where I have the createMarkers method embedded in a for loop for when I cycle through my array. and still it is not working properly. After setting some break points I noticed the loop is only going to the function(point) line then going back to the top of the loop. Any Idea why? Unfortunately I am unable to provide a Link at this time, the program is using ASP and I'm using Linux server. (The program is for someone else.) And I just tried 3 different free hosting sites all to no avail. However the code Is pretty concise and is definitely where the error is. This is the for Loop for (i=0;i<JSArray.length-1;i++) { var ZipC = JSArray[i]; var Amount = JSArray[i+1]; geocoder.getLatLng(JSArray[i], function(point) { <<<<<reaches this line then goes back top of loop if (!point) { alert(ZipC + " not found"); } else { map.setCenter(point, 13); var marker = createMarker (point,ZipC,Amount); map.addOverlay(marker); } } ); i++; } JSArray is built as such [0] = zipcode [1] = amount of people living in that zip code [2] zipcode so on and so forth I will try to get a link up as soon as possible. Cheers! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en -~----------~----~----~----~------~----~------~--~---
