From 994fc571842dd81f0989fd196f88f4b33e5e9913 Mon Sep 17 00:00:00 2001 From: appel Date: Sat, 23 Mar 2013 13:12:14 +0100 Subject: [PATCH] Update jquery.gomap-1.3.2.js Added check to see if the Google Maps API is loaded. This prevents 'Google is not defined' errors. --- js/jquery.gomap-1.3.2.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/jquery.gomap-1.3.2.js b/js/jquery.gomap-1.3.2.js index 8bf0cb5..0d2e46b 100644 --- a/js/jquery.gomap-1.3.2.js +++ b/js/jquery.gomap-1.3.2.js @@ -8,6 +8,11 @@ */ (function($) { + + if (!((typeof google !== "undefined" && google !== null ? google.maps : void 0) != null)) { + return; + } + var geocoder = new google.maps.Geocoder(); function MyOverlay(map) { this.setMap(map); }; @@ -867,4 +872,4 @@ return this.map.getBounds().contains(latlng); } } -})(jQuery); \ No newline at end of file +})(jQuery);