From 66f9380ee8c9b791df88290e89e97e319a4b2977 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Mon, 24 Feb 2020 16:24:46 +0000 Subject: [PATCH] Trying to fix the URL on the github.io demo --- docs/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.html b/docs/index.html index ec58200..96e417a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -256,7 +256,7 @@ crossorigin=""/ --> "Zimbabwe,Harare,-17.816666666666666,31.033333,ZW,Africa\n" + "British Indian Ocean Territory,Diego Garcia,-7.3,72.400000,IO,Africa\n" ); /* Map using CSV from URL */ - var url = window.location.href.substring(0, window.location.href.length - "index.html".length) + "data/europe-capitals.csv"; + var url = window.location.href.substring(0, window.location.href.lastIndexOf('/')) + "/data/europe-capitals.csv"; geocsv_lite.core.initialise_map_element("url-map", url);