diff --git a/modules/geolocation_googlemaps/geolocation_googlemaps_widget.js b/modules/geolocation_googlemaps/geolocation_googlemaps_widget.js
index fac2b83..8069529 100644
--- a/modules/geolocation_googlemaps/geolocation_googlemaps_widget.js
+++ b/modules/geolocation_googlemaps/geolocation_googlemaps_widget.js
@@ -4,11 +4,16 @@
  */
 
 (function ($) {
-  var geocoder;
+  var geocoder,
+      google_is_loaded = false;
   Drupal.geolocation = Drupal.geolocation || {};
   Drupal.geolocation.maps = Drupal.geolocation.maps || {};
   Drupal.geolocation.markers = Drupal.geolocation.markers || {};
 
+  window['initMap'] = function() {
+    google_is_loaded = true;
+  };
+
   /**
    * Set the latitude and longitude values to the input fields
    * And optionaly update the address field
@@ -201,6 +206,14 @@
 
   Drupal.behaviors.geolocationGooglemaps = {
     attach: function(context, settings) {
+      if (!google_is_loaded) {
+        setTimeout($.proxy(function () {
+          this.attach.call(this, context, settings);
+        }, this), 100);
+
+        return;
+      }
+
       geocoder = new google.maps.Geocoder();
 
       var lat;
@@ -323,3 +336,4 @@
     }
   };
 })(jQuery);
+
