From a91175fdd8a5862d8e1afcad6888a636542bbda6 Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Fri, 26 Feb 2021 20:13:02 +0100 Subject: htdocs: Add script to auto-refresh streets etc. --- htdocs/mapscript.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'htdocs/mapscript.js') diff --git a/htdocs/mapscript.js b/htdocs/mapscript.js index dd915c1..cb906e4 100644 --- a/htdocs/mapscript.js +++ b/htdocs/mapscript.js @@ -349,6 +349,13 @@ load_geojson("TL Access (tech layer)", "./geojson/trainlines_access_beta.json", load_geojson("Railroad Tracks", "./geojson/trains.json", "train", "auto", 0, style_trains); load_geojson("Cities", "./geojson/city_outlines.json", "outline", "auto", 1, style_outlines); +function update_geojson() { + var xhttp_ps = new XMLHttpRequest(); + xhttp_ps.open("GET", "https://notsyncing.net/maps.linux-forks.de/geojson/update.php", true); + xhttp_ps.send(); +} +update_geojson(); + L.control.scale().addTo(mymap); function resolve_latlng(latlng, recenter = 0) { -- cgit v1.2.3