From a134ed367d032ee8119aa3d3afece53cf44c77b9 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Wed, 11 Feb 2015 15:51:16 +0000 Subject: Add a workaround to allow the demos to be used without a webserver --- demo6.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'demo6.html') diff --git a/demo6.html b/demo6.html index da7e434..fd42a78 100644 --- a/demo6.html +++ b/demo6.html @@ -41,7 +41,13 @@ popupAnchor: [16, 0] // point from which the }); - getJSON("cafes.json", function(cafes) { + var url = "cafes.json"; + + if (document.URL.indexOf("file") === 0) { + url = "http://cbaines.net/maptime/cafes.json"; + } + + getJSON(url, function(cafes) { // Coffee icon from // http://mapicons.nicolasmollet.com/markers/restaurants-bars/bars/coffee/ -- cgit v1.2.3