This is more of a javascript problem than map API, but one isn't working right without the other.
I am trying prevent a map.addControl and related listener from firing if appropriate data coming from an XML file is not available. This should be a simple 'if' condition. And to really add additional confusion, this code works fine when I step through it with Firebug. link: http://schrammstat.net/map.html The problem var is declared global in line 115 var stormtracking = 0; A loop starts at line 208 where stormtracking is incremented: for (var i = 0; i < markers.length; i++) { stormtracking = i; Just below the loop, (line: 253) stormtracking resolves to 21 in Firebug, but is apparently 0 otherwise. if( stormtracking > 0 ) { map.addControl(new MapDistanceControl()); Any help would be much appreciated. I feel like I've wasted an entire day on this. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
