> ...But what do you mean with " try specifying the map
> size in the GMap2 setting"

In your code, map = GMap2(...) builds the map.
That can accept an optional parameter speciying the size of the map
container in pixels
   map = new GMap2(... , {size:new GSize(w,h)});
replace w and h with the size of your map div
This allows the API to work out the visible area without asking the
browser, which in some circumstances (eg. when the div is hidden) will
say zero-size.  If the API gets the display size wrong, it'll put the
centre wrong, get the auto-zoom levels wrong, which sounds like what
happens to you.

You ought to address the variable scope issue too.
   map = xxx
does NOT create a global variable in every browser by default, and in
some browsers will cause it to misuse anything else called 'map' or
perhaps 'Map' that it can find.
  Outside of your map intializing function, just add a simple
  var map;
to create an empty global javascript variable, that later on can be
populated with the map object proper.

cheers, Ross K

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