On Dec 30, 9:27 am, tonyg <[email protected]> wrote: > Can anyone help me figure out what is wrong with the following code? > I have been banging my head all night since I am new to javascript. I > am specifically having problems with the myclick function. i want to > have a link <a href="javascript:myclick(0)">map it</a>, but I do not > seem to be able to get it to recognize. any suggestions? All help > appreciated.
Please provide a link, not code. Code listings are difficult to debug. Your function myclick(i) triggers a click on newpoints[i]. Say i=0: you trigger a click on newpoints[0]. newpoints[0] is set to an array, new Array(41.8756794 , -87.6400772, icon0, 's', 's'); I'm surprised you don't get an error! I think what you want to do is trigger a click on the marker which is located at a particular place. To do that you need to maintain a global array of markers: when you create a marker, push it on to the global array so that you can refer to it in your myclick function. Andrew --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
