diff --git a/gmap.install b/gmap.install
index 360994b..7b71884 100644
--- a/gmap.install
+++ b/gmap.install
@@ -115,12 +115,19 @@ function gmap_update_7000() {
 */
 
 /**
-+ * Mini-update -- update gmap markerfiles variable to an array if it is not
-+ * already.
-+ */
+ * Mini-update -- update gmap markerfiles variable to an array if it is not
+ * already.
+ */
 function gmap_update_7201() {
  $markerdirs = variable_get('gmap_markerfiles', array(drupal_get_path('module', 'gmap') . '/markers'));
  if (!is_array($markerdirs)) {
    variable_set('gmap_markerfiles', array($markerdirs));
   }
 }
+
+/**
+ * Gmap:deleted gmap_marker_custom_dir since it is not using.
+ */
+function gmap_update_7202() {
+  variable_del('gmap_marker_custom_dir');
+}
diff --git a/gmap_markerinfo.inc b/gmap_markerinfo.inc
index 083524e..dd962aa 100644
--- a/gmap_markerinfo.inc
+++ b/gmap_markerinfo.inc
@@ -9,6 +9,29 @@
  */
 
 /**
+ * Implementation of hook_gmap_markerfiles_info().
+ *
+ * We just scan the directory set in the the 'gmap_markerfiles' variable.
+ */
+function gmap_gmap_markerfiles_info() {
+  $markerdirs = variable_get('gmap_markerfiles', array(drupal_get_path('module', 'gmap') . '/markers'));
+
+  if (module_exists('libraries')) {
+    $markercustomdir = libraries_get_path('gmap_markers');
+    if ($markercustomdir) {
+      $markerdirs[] = $markercustomdir;
+    }
+  }
+
+  $found_markers = array();
+  // Scanning marker directories for a ini files.
+  foreach ($markerdirs as $markerdir) {
+    $found_markers += file_scan_directory($markerdir, '/.*\.ini$/');
+  }
+  return $found_markers;
+}
+
+/**
  * Get marker icon data for constructing json object.
  */
 function _gmap_get_icondata() {
@@ -22,76 +45,66 @@ function _gmap_get_icondata() {
     'transparent',
   );
 
-  $markerdirs = variable_get('gmap_markerfiles', array(drupal_get_path('module', 'gmap') . '/markers'));
-  $markercustomdir = variable_get('gmap_marker_custom_dir', NULL);
-  if ($markercustomdir) {
-    $markerdirs[] = $markercustomdir;
-  }
-  if (module_exists('libraries')) {
-    $markercustomdir = libraries_get_path('gmap_markers');
-    if ($markercustomdir) {
-      $markerdirs[] = $markercustomdir;
-    }
-  }
-
   // The following routines are designed to be easy to comprehend, not fast.
   // This whole process gets cached.
-
   // Get the ini files.
   $inis = array();
-  if (is_array($markerdirs)) {
-    foreach ($markerdirs as $markerdir) {
-      $inifiles = file_scan_directory($markerdir, '/.*\.ini$/');
-      // Parse the ini files and store by path.
-      foreach ($inifiles as $file) {
-        $path = substr($file->uri, 0, -strlen($file->filename));
-        if (!isset($inis[$path])) {
-          $inis[$path] = array();
-        }
-        $inis[$path][] = parse_ini_file($file->uri, TRUE);
+
+  // Run hook_gmap_markerfiles_info()
+  $inifiles = module_invoke_all('gmap_markerfiles_info');
+  drupal_alter('gmap_markerfiles_info', $inifiles);
+  if (is_array($inifiles)) {
+
+    // Parse the ini files and store by path.
+    foreach ($inifiles as $file) {
+      $path = substr($file->uri, 0, -strlen($file->filename));
+      if (!isset($inis[$path])) {
+        $inis[$path] = array();
       }
-      unset($inifiles);
+      $inis[$path][] = parse_ini_file($file->uri, TRUE);
+    }
+    unset($inifiles);
 
-      // Per directory.
-      foreach ($inis as $path => $path_inis) {
-        $icons[$path] = array(
-          'tempf' => array(),
-          'f' => array(),
-          'w' => array(),
-          'h' => array(),
-          // Sets of sets.
-          'i' => array(),
-        );
+    // Per directory.
+    foreach ($inis as $path => $path_inis) {
+      $icons[$path] = array(
+        'tempf' => array(),
+        'f' => array(),
+        'w' => array(),
+        'h' => array(),
+        // Sets of sets.
+        'i' => array(),
+      );
 
-        // Part 1: Collect image names.
-        $filenames = array();
-        foreach ($path_inis as $ini) {
-          foreach ($ini as $k => $v) {
-            // Is this definition for an icon? (Anything with a dot is a file.)
-            if (strpos($k, '.') !== FALSE) {
-              // Add the icon name.
-              $filenames[$k] = TRUE;
-            }
-            else {
-              // Shadow / alternate search.
-              foreach ($imagetypes as $check) {
-                if (isset($v[$check])) {
-                  $filenames[$v[$check]] = TRUE;
-                }
+      // Part 1: Collect image names.
+      $filenames = array();
+      foreach ($path_inis as $ini) {
+        foreach ($ini as $k => $v) {
+          // Is this definition for an icon? (Anything with a dot is a file.)
+          if (strpos($k, '.') !== FALSE) {
+            // Add the icon name.
+            $filenames[$k] = TRUE;
+          }
+          else {
+            // Shadow / alternate search.
+            foreach ($imagetypes as $check) {
+              if (isset($v[$check])) {
+                $filenames[$v[$check]] = TRUE;
               }
-              // A sequence is a list of image names.
-              if (isset($v['sequence'])) {
-                foreach (explode(',', $v['sequence']) as $f) {
-                  $filenames[trim($f)] = TRUE;
-                }
+            }
+            // A sequence is a list of image names.
+            if (isset($v['sequence'])) {
+              foreach (explode(',', $v['sequence']) as $f) {
+                $filenames[trim($f)] = TRUE;
               }
             }
           }
         }
-        $icons[$path]['tempf'] = $filenames;
       }
-      unset($filenames);
+      $icons[$path]['tempf'] = $filenames;
     }
+    unset($filenames);
+
   }
 
   // Part 2: Assign ids, get width and height.
@@ -167,6 +180,7 @@ function _gmap_get_icondata() {
   foreach ($icons as $path => $v) {
     unset($icons[$path]['tempf']);
   }
+
   return $icons;
 }
 
