On Sep 24, 6:43 am, Josh Carroll <[EMAIL PROTECTED]> wrote: > I am pretty new to the API, so please forgive me if I'm missing > something obvious. > > What am I missing here?
Apart from a link? Variable scope. The first time the button is clicked, rectangle1 is created and added. It's local to the function, so although it persists on the map, all reference to it is lost when the function ends. When you next click the button, you attempt to remove something called rectangle1, which no longer exists. If you need to have references last beyond the execution of a function, they need to be global like showrec is. 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 -~----------~----~----~----~------~----~------~--~---
