On Jan 26, 2:10 am, Adam <[email protected]> wrote: > > The browser seems to be throwing an error at the first line of the > mapclick function, 'if (marker) map.removeOverlay(marker);' , the > browser says that marker is undefined!??
Yes. That's because it is. All your "marker"s are local to their own functions. Why not move the line var marker = null; into global scope so that you have a variable which can be shared between functions as required? [Keep the var keyword in createMarker: that needs to be local] 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 -~----------~----~----~----~------~----~------~--~---
