Tried it and tested it...but failed :/
---------------
google.load("maps", "2.x");
var map;
function initialize() {
map = new google.maps.Map2(document.getElementById("map"));
map.setCenter(new google.maps.LatLng(52.36889, 4.92151), 13);
}
google.setOnLoadCallback(initialize);
---------------
And :
---------------
$("#showmap").click(function() {
map.checkResize();
$("#map").show();
$("#textdiv").hide();
});
---------------
So this didn't fix my problem in FF. In IE6+IE7 still no problems..
Version two is at this location: http://www.viapasso.nl/googlemaps2/
What is wrong with my code?
Can you provide me with the right code or am i asking too much? :)
Thanks.
On 24 jan, 19:56, "warden [Andrew Leach - Maps API Guru]"
<[email protected]> wrote:
> On Jan 24, 5:33 pm, juno <[email protected]> wrote:
>
>
>
> > So i googled a bit and found out that checkresize() might be the
> > answer for my problem.
> > I've tried it...and now it's working fine in IE7 but still not in FF3 :
> > (
>
> > Link to the page:http://www.viapasso.nl/googlemaps/
>
> > Am i doing something wrong?
> > Placing checkresize in the $("#showmap").click(function() didn't
> > worked out either..
>
> Your "map" variable needs to be global. Currently it's local to
> initialize().
>
> In your showmap() function, don't use window.onload. That's for the
> whole page, not the div you're unhiding. Replace that line with
> map.checkResize();
> having first made your map variable global.
>
> Alternatively, use the {size} option when you create your map. But
> using window.onload is still wrong.
>
> 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
-~----------~----~----~----~------~----~------~--~---