Problems with Google Maps API v3 + jQuery UI Tabs

Note: this answer received an invalid 3rd party edit which essentially replaced its content, something that a 3rd party editor should not do. However, the result may be more useful than the original, so both versions are now given below:


  • Original author Anon’s version from 2010, after one edit by Anon

    google.maps.event.trigger(map, ‘resize’);
    map.setZoom( map.getZoom() );

is suggested by
http://code.google.com/p/gmaps-api-issues/issues/detail?id=1448 as a
v3 substitute for v2’s checkResize().

Blech – bad google, no cookie.


  • User Eugeniusz Fizdejko’s complete rewrite form 2012:

For me works when adding a marker:

var marker = new google.maps.Marker({
    position: myLatlng,
    title:"Hello World!"
});

google.maps.event.addListener(map, "idle", function(){
    marker.setMap(map);
});

Leave a Comment