From e7e26665d92c1e74d2555654adad786e86d40306 Mon Sep 17 00:00:00 2001 From: stev Date: Thu, 26 Oct 2023 20:24:55 +0200 Subject: [PATCH 1/4] refactor code without change to features make code generally more readable by placing some things closer together and better indent code --- WMS choose.htm | 201 +++++++++++++++++++++++++------------------------ 1 file changed, 101 insertions(+), 100 deletions(-) diff --git a/WMS choose.htm b/WMS choose.htm index 94fdd69..80ac8bf 100644 --- a/WMS choose.htm +++ b/WMS choose.htm @@ -1,22 +1,22 @@ - - - - - - Layers Control Tutorial - Leaflet - - + + + + - - + Layers Control Tutorial - Leaflet - + + - - - -
- - -
-
+ +
+ + +
+
-
+
- - - - + //var y = map.getSize().y / 2; + const widthInMeter = 6378137 * 2 * Math.PI * Math.cos(map.getCenter().lat * Math.PI / 180); + var scaleOutput = document.getElementById("scaleOutput"); + scaleOutput.innerHTML = widthInMeter; + map.on('moveend', function(){ + scaleOutput.innerHTML = widthInMeter; + }); + + -- 2.45.2 From 09c250e5537d6e38d1a091280ce72e2e01820b56 Mon Sep 17 00:00:00 2001 From: stev Date: Thu, 26 Oct 2023 20:31:21 +0200 Subject: [PATCH 2/4] correct indentation in head tag --- WMS choose.htm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/WMS choose.htm b/WMS choose.htm index 80ac8bf..3028021 100644 --- a/WMS choose.htm +++ b/WMS choose.htm @@ -8,15 +8,14 @@ Layers Control Tutorial - Leaflet -