On Feb 12, 10:20 am, "Nampol L." <[email protected]> wrote:
> this function will use in body onload="initialize()" for Set map
>
> the problem is in case that i have other fuction for use after click
> some button
>

So make "map" global.

var map;
function initialize() {
  map = new GMap2(...)
  ...
  }
function showAllmarker() {
  map.addOverlay(createMarker())
  }

That way you have only one map variable and every function uses it.

Before using the Maps API, you really do need to know Javascript.

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