On Jun 29, 2:26 pm, LaPistola <[email protected]> wrote:
> Thank you for the reply!
>
> The whole script is above, i taken the zoom code from a website as an
> example as did the rest of the map code.
>
> i did at somepoint make the map global but it just didn't create the
> map on page load?

You need to make the map variable global, but still initialize it
inside the onload function.

To make it global, move:
var map;
just before but outside of the initialize function.

change:
var map = new GMap2(document.getElementById("map_canvas"));
to:
     map = new GMap2(document.getElementById("map_canvas"));

Fix this:
  newzoom = getBoundsZoomLevel(bounds);

to be this:
var newzoom = map.getBoundsZoomLevel(bounds);
(a method of your GMap2 object...)

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