On Aug 10, 4:56 pm, Michael Andrews <[email protected]> wrote:
> My function works fine to add the marker, however it won't remove the
> marker. I cannot figure out why.

You create a local reference to your marker (tempMarker) and use that
to add the marker to the map. That's fine as far as it goes; but the
reference is destroyed when you exit the function, so you can't get at
the marker again after that.

Any variable you need to use more than once must be global.

You'll need to be careful of just using "arrOfCord" inside a function
too. That should be explicitly defined as a global variable so that
the code behaves identically in different browsers.

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
-~----------~----~----~----~------~----~------~--~---

Reply via email to