diff --git a/gmap.module b/gmap.module
index 556ca6f6b6e66e51fdf7dce3582ac5c61e367424..51c328f120ae76c79b1732136daef06515e02dc7 100644
--- a/gmap.module
+++ b/gmap.module
@@ -828,6 +828,19 @@ function gmap_map_cleanup(&$map) {
     $map['latlon'] = $map['latlong'];
     unset($map['latlong']);
   }
+  // Normalize extent.
+  if (isset($map['extent']) && is_string($map['extent'])) {
+    $tmp = explode(',', $map['extent']);
+    if (count($tmp) == 4) {
+      // String form of extent has x,y, but native array form is lat,lon, so need to flip them a bit.
+      $map['extent'] = array(array($tmp[1], $tmp[0]), array($tmp[3], $tmp[2]));
+    }
+    else {
+      // Extent was unparseable, don't pass it.
+      unset($map['extent']);
+    }
+  }
+    
   if (isset($map['latlon']) && (!isset($map['latitude']) || !isset($map['longitude']))) {
     list($map['latitude'], $map['longitude']) = explode(',', $map['latlon']);
   }