diff options
author | Markus Koch <markus@notsyncing.net> | 2022-01-30 10:51:19 +0100 |
---|---|---|
committer | Markus Koch <markus@notsyncing.net> | 2022-01-30 10:51:19 +0100 |
commit | 6519c019c9fb2fca584f56ab86a3e85955773f6b (patch) | |
tree | de450e3d3c3ac4d660dd6278a04fa29e3e2431fb /htdocs | |
parent | b2f543f49bbef659bf62293d12f0720227dcb53f (diff) | |
download | lifomapserver-dev.tar.gz lifomapserver-dev.tar.bz2 lifomapserver-dev.zip |
htdocs: Make oceans less eye-searingdev
Diffstat (limited to 'htdocs')
-rw-r--r-- | htdocs/mapscript.js | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/htdocs/mapscript.js b/htdocs/mapscript.js index 8bf0f3b..6eb6e9f 100644 --- a/htdocs/mapscript.js +++ b/htdocs/mapscript.js @@ -5,6 +5,8 @@ var polyconf_show_street_names = 5; // Zoom level for when to start showing stre var polyconf_show_cities = 5; /* City outlines will be filled on this level and further away */ var polyconf_show_districts = 4; /* Shown from polyconf_show_cities until this*/ +var polyconf_show_oceans = 5; // Show ocean labels from zoom level + var dijkstraserv_base = "https://notsyncing.net/dijkstra/"; var wikiurl_base = "https://wiki.linux-forks.de/mediawiki/index.php/" var tiles_base = "https://notsyncing.net/maps.linux-forks.de/tiles/" @@ -19,8 +21,9 @@ var streetLabelsRenderer = new L.StreetLabels({ return false; break; case "Polygon": - if ((mymap.getZoom() > polyconf_show_street_names) && - (layer.myName != "Oceans")) + if (layer.myName == "Oceans") + return (mymap.getZoom() > polyconf_show_oceans); + if (mymap.getZoom() > polyconf_show_street_names) return false; break; default: @@ -111,7 +114,13 @@ var style_tech = { }; var style_rivers = { - color: "blue" + color: "blue", + fillColor: "#00999955", + }; + +var style_oceans = { + color: "#00556655", + fillColor: "#00999955", }; var style_route = { @@ -363,7 +372,7 @@ load_geojson("TL Access (tech layer)", "./geojson/trainlines_access.json", "trai load_geojson("Railroad Tracks", "./geojson/trains.json", "train", "auto", 0, style_trains); load_geojson("Cities", "./geojson/city_outlines.json", "outline", "auto", 1, style_outlines); load_geojson("Rivers", "./geojson/rivers.json", "street", "auto", 1, style_rivers); -load_geojson("Oceans", "./geojson/oceans.json", "outline", "auto", 1, style_rivers); +load_geojson("Oceans", "./geojson/oceans.json", "outline", "auto", 1, style_oceans); function update_geojson() { var xhttp_ps = new XMLHttpRequest(); |