> The map variable is declare in a function call "readMap" with the > "var" expression / all in the <script></script> of the <head> section.
Yes, it was local in scope to the readMap() function. Nothing outside the readMap() function could use the same 'map' variable. The click handler runs outside the readMap() function when it is clicked, so 'map' was null inside teh click handler. > I try to declare it global outside the function, but the problem is > the same (seem to be worth because all the rest doesn't work anymore) Then you've done that wrong. Good luck with that, but if you still want help now is the time to put your code somewhere and share a link to it. . -- 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.
