views:

55

answers:

1

The question is clear on the title I guess?

"How to get GMap2 object after initialized?"

=> I would like to extend this question:

Is there any method to retrieve all existing google markers from GMap2 object?

Thanks in advance.

+1  A: 
var map = new GMap2(document.getElementById("map_canvas"));

I suppose you are looking for the map variable.

Dan Dumitru
Yes, the map variable.But any chance I get the map variable by finding the ID map_canvasI can not create new GMAp2 again.Thanks in advance!
JoesyXHN
You just have to pass the variable around, in your Javascript. You could make a global variable *map*, and then you can access it in your JS, even if the JS is located in another file.
Dan Dumitru
haha the problem is that I am using a google map wrapper, I dont know what is tha global variable... i am stuck on it. Therefore, it could be a chance to find that variable by using its ID :DThanks!
JoesyXHN
I see now... You should update your question to provide as many details about your usage as possible, and then maybe someone will be able to help you out.
Dan Dumitru
yes. thanks! I just have updated my question...
JoesyXHN