diff --git a/plugins/layer_types/openlayers_layer_type_geojson.inc b/plugins/layer_types/openlayers_layer_type_geojson.inc
index 58b4dc5..2030040 100644
--- a/plugins/layer_types/openlayers_layer_type_geojson.inc
+++ b/plugins/layer_types/openlayers_layer_type_geojson.inc
@@ -98,10 +98,10 @@ class openlayers_layer_type_geojson extends openlayers_layer_type {
     }
 
     if (module_exists('facetapi') && (isset($_GET['f']))) {
-      $this->data['url'] = !empty($this->data['url']) ? url($this->data['url'], array('query' => array('f' => $_GET['f']))) : '';
+      $this->data['url'] = !empty($this->data['url']) ? file_create_url($this->data['url'], array('query' => array('f' => $_GET['f']))) : '';
     }
     else {
-      $this->data['url'] = !empty($this->data['url']) ? url($this->data['url']) : '';
+      $this->data['url'] = !empty($this->data['url']) ? file_create_url($this->data['url']) : '';
     }
 
     drupal_add_js(drupal_get_path('module', 'openlayers')
diff --git a/plugins/layer_types/openlayers_layer_type_gpx.inc b/plugins/layer_types/openlayers_layer_type_gpx.inc
index e70d801..8ed42a7 100644
--- a/plugins/layer_types/openlayers_layer_type_gpx.inc
+++ b/plugins/layer_types/openlayers_layer_type_gpx.inc
@@ -183,6 +183,7 @@ class openlayers_layer_type_gpx extends openlayers_layer_type {
    * Render.
    */
   function render(&$map) {
+    $this->data['url'] = !empty($this->data['url']) ? file_create_url($this->data['url']) : '';
     drupal_add_js(drupal_get_path('module', 'openlayers')
       . '/plugins/layer_types/openlayers_layer_type_gpx.js');
   }
diff --git a/plugins/layer_types/openlayers_layer_type_kml.inc b/plugins/layer_types/openlayers_layer_type_kml.inc
index b7b44c2..f38262b 100644
--- a/plugins/layer_types/openlayers_layer_type_kml.inc
+++ b/plugins/layer_types/openlayers_layer_type_kml.inc
@@ -173,6 +173,7 @@ class openlayers_layer_type_kml extends openlayers_layer_type {
    * Render.
    */
   function render(&$map) {
+    $this->data['url'] = !empty($this->data['url']) ? file_create_url($this->data['url']) : '';
     drupal_add_js(drupal_get_path('module', 'openlayers')
       . '/plugins/layer_types/openlayers_layer_type_kml.js');
   }
