I create it in a local scope, but within the function so it should see it. Here's a question, if I create tempMarker(1, 1) and then later on create tempMarker(1,1) are those not the same thing? Do I need to declare them globally? Thanks,
On Aug 6, 2:44 pm, Rossko <[email protected]> wrote: > > I try to hide the marker but it doesn't work. Is it because I don't > > load it on the page load? > > Might be a scope issue. tempMarker is created in local scope, within > a function. > By the time the click listener is activated, that parent function has > long since closed and local variables are no longer > accessible.http://econym.org.uk/gmap/scope.htm --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
