From: Rick Waldron Date: Mon, 9 May 2011 13:22:24 +0000 (-0400) Subject: [#506] Apply fixes as recommended; X-Git-Tag: v0.6~30^2~2^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=918d6f2f9ecadf3a18bf6843a9beb53f9cf9d758;p=popcorn-js.git [#506] Apply fixes as recommended; --- diff --git a/plugins/googlemap/popcorn.googlemap.js b/plugins/googlemap/popcorn.googlemap.js index 311a45c..0819870 100644 --- a/plugins/googlemap/popcorn.googlemap.js +++ b/plugins/googlemap/popcorn.googlemap.js @@ -128,9 +128,11 @@ var googleCallback; // ensure the map has been initialized in the setup function above var isMapSetup = function () { if ( map ) { - map.getDiv().style.display = "block"; - // reset the location and zoom just in case the user plaid with the map - map.setCenter(location); + map.getDiv().style.display = "block"; + + // reset the location and zoom just in case the user manually moved the map + google.maps.event.trigger(map, "resize"); + map.setCenter(location); // make sure options.zoom is a number if ( options.zoom && typeof options.zoom !== "number" ) { @@ -149,8 +151,6 @@ var googleCallback; options.pitch = +options.pitch; } - google.maps.event.trigger(map, 'resize'); - if ( options.type === "STREETVIEW" ) { // Switch this map into streeview mode map.setStreetView(