From 918d6f2f9ecadf3a18bf6843a9beb53f9cf9d758 Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Mon, 9 May 2011 09:22:24 -0400 Subject: [PATCH] [#506] Apply fixes as recommended; --- plugins/googlemap/popcorn.googlemap.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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( -- 2.43.0