> About var declaration. In my understanding if I declare a variable using
> "var" in a function, it makes it available only in that function. Therefor,
> if I use << var map = new GMap2(document.getElementById("map_canvas")); >>
> it makes the function setBMSMakers() unable to find "map" and it returnes
> "map is not defined"

Yes.
That is why you would declare
 var map ;
outside of any function at all, in order to create a global variable
called 'map'.
Then
    map = new GMap2(...
with no 'var' re-uses the global variable and populates it as a GMap2
object.
It's basic javascript, no map trickery involved.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API V2" 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