diff --git a/gmap.module b/gmap.module
index 7d88606..71c0e19 100755
--- a/gmap.module
+++ b/gmap.module
@@ -284,7 +284,14 @@ function _gmap_base_js() {
     'type' => 'external',
     'weight' => 1,
   );
-  $ret[base_path() . variable_get('file_public_path', conf_path() . '/files') . '/js/gmap_markers.js'] = array(
+
+  $uri = ($fid = variable_get('gmap_marker_file', NULL)) ? file_load(variable_get('gmap_marker_file', NULL))->uri : 'public://js/gmap_markers.js';
+  if ($wrapper = file_stream_wrapper_get_instance_by_uri($uri)) {
+    $fullpath = $wrapper->getExternalUrl();
+  } else {
+    $fullpath = base_path() . variable_get('file_public_path', conf_path() . '/files') . '/js/gmap_markers.js';
+  }
+  $ret[$fullpath] = array(
     'type' => 'external',
     'weight' => 4,
   );
