On Aug 21, 9:47 am, pezholio <[email protected]> wrote:
> OK, I've declared the variable outside like so:
>
> var exmll = new EGeoXml;

Just var exml; would have done. You don't need to create a new EGeoXml
object, because you're just going to overwrite it with another one
when you actually use the variable. You also need to be careful to
copy and paste code, not retype it, even for short lines. You've
included an error here which isn't actually in your code.

> and now clicking on the markers work, but the sidebar is still
> throwing up the error 'a is undefined'

Line 60
  var exml = new EGeoXml("exml", mmap, ... )
still uses the "var" keyword, so *that* exml is different to the
global variable you created. It's still local to the function
toggleMarker.

Remove the var keyword there so it uses the global variable.

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