diff --git a/gmap.module b/gmap.module
index ebc6a5d..c5efd53 100644
--- a/gmap.module
+++ b/gmap.module
@@ -1314,6 +1314,44 @@ function gmap_views_plugins() {
   );
 }
 
+/**
+ * Implementation of hook_views_pre_render().
+ */
+function gmap_views_pre_render(&$view) {
+  static $gmap_processed;
+  // Add js only for gmap style views with ajax and not already processed.
+  if (($view->plugin_name != 'gmap' && $view->plugin_name != 'gmapextended')
+    || !$view->use_ajax || $gmap_processed) {
+    return;
+  }
+  // Mark the view as already processed.
+  $gmap_processed = TRUE;
+  // Add js with new views callback.
+  drupal_add_js(drupal_get_path('module', 'gmap') . '/js/gmap_views_ajax.js', array('group' => JS_DEFAULT));
+}
+
+/**
+ * Implementation of hook_views_ajax_data_alter().
+ */
+function gmap_views_ajax_data_alter(&$commands, $view) {
+  // Add js callback only with gmap style plugins and with ajax.
+  if (($view->plugin_name != 'gmap' && $view->plugin_name != 'gmapextended') || !$view->use_ajax) {
+    return;
+  }
+  // Find the JQuery selector for the view's wrapper in the DOM
+  $target = '';
+  foreach ($commands as $command) {
+    if ($command['command'] == 'insert') {
+      $target = $command['selector'];
+    }
+  }
+  $command = array('command' => 'gmapAjaxViewsFix', 'target' => $target);
+  // Save settings.
+  $js = drupal_add_js(NULL, array('scope' => 'header'));
+  $command['settings'] = $js['settings']['data'];
+  $commands[] = $command;
+}
+
 function theme_gmap_views_ui_gmapextended($variables) {
   $form = $variables['form'];
 
diff --git a/js/gmap_views_ajax.js b/js/gmap_views_ajax.js
new file mode 100644
index 0000000..32d2075
--- /dev/null
+++ b/js/gmap_views_ajax.js
@@ -0,0 +1,35 @@
+
+/**
+ * @file
+ * When using views with ajax enabled, the use of ajaxified
+ * exposed filters breaks the gmap javascript.
+ * This file is part of the solution to this problem.
+ */
+
+(function($){
+  Drupal.ajax.prototype.commands.gmapAjaxViewsFix = function(ajax, response, status) {
+    var $view = $(response.target);
+    
+     if (response.settings) {
+      var i = 0;
+      var gmap = {};
+
+      for (i = 0; i < response.settings.length; i++) {
+        if (typeof(response.settings[i]['gmap']) == 'object') {
+          gmap = response.settings[i]['gmap'];
+        }
+      }
+
+      $view.find('.gmap-map').each(function() {
+        var id = '#' + $(this).attr("id");
+        var t = id.split('-');
+        var mapid = t[1];
+        Drupal.gmap.unloadMap(mapid);
+        if (gmap && gmap[mapid]) {
+          Drupal.settings.gmap[mapid] = gmap[mapid];
+        }
+        $(id).empty().each(Drupal.gmap.setup);
+      });
+    }
+  };
+})(jQuery);
\ No newline at end of file
