On Aug 17, 8:39 am, wweyland <[email protected]> wrote:
> I have existing google map that has been created somewhere in the
> code.
>
> I need to get the bounds of the map with getBounds(). How can I load
> the existing map to a variable? I only know the id of the div element
> containing the map.

No. Once the map has been created, you can't get a reference to it.
The reference must be made when the map is created with something like
var map = new GMap2(...);

In fact, if you have a map, there *must* be a line like that in the
code somewhere. Find it and you have your reference (although there
may be issues with the scope of the variable). You may be able to use
something like Firebug: in the DOM tab, you should look for "Object
{ wo = Object ... }" which will give you the variable name in the left-
hand column. This is also affected by the variable's scope, and the
API version. In v=2 or v=2.260, it's wo; it will be a different name
in other versions.

-- 
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