diff --git a/plugins/layer_types/openlayers_layer_type_geojson.inc b/plugins/layer_types/openlayers_layer_type_geojson.inc index 73b5adf..bf5dc67 100644 --- a/plugins/layer_types/openlayers_layer_type_geojson.inc +++ b/plugins/layer_types/openlayers_layer_type_geojson.inc @@ -89,7 +89,7 @@ class openlayers_layer_type_geojson extends openlayers_layer_type { } } - $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') . '/plugins/layer_types/openlayers_layer_type_geojson.js'); diff --git a/plugins/layer_types/openlayers_layer_type_gpx.inc b/plugins/layer_types/openlayers_layer_type_gpx.inc index e70d801..5ae6099 100644 --- a/plugins/layer_types/openlayers_layer_type_gpx.inc +++ b/plugins/layer_types/openlayers_layer_type_gpx.inc @@ -183,6 +183,8 @@ 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..26a073a 100644 --- a/plugins/layer_types/openlayers_layer_type_kml.inc +++ b/plugins/layer_types/openlayers_layer_type_kml.inc @@ -173,6 +173,8 @@ 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'); }