diff options
Diffstat (limited to 'demo5.html')
-rw-r--r-- | demo5.html | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -35,7 +35,13 @@ // Load some GeoJSON exported from OpenStreetMap using the OverpassAPI // (http://overpass-turbo.eu/s/7yI) - 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) { L.geoJson(cafes).addTo(map); }); |