From c2bf9630afaeffc02776040576d68d9a009feeb5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20T=C5=AFma?=
Date: Fri, 28 Feb 2020 00:28:43 +0100
Subject: [PATCH] Sort the maps properly by map name
---
index.html | 58 +++++++++++++++++++++++------------------------
scripts/mapgen.py | 9 +++++---
2 files changed, 35 insertions(+), 32 deletions(-)
diff --git a/index.html b/index.html
index acb74f0..5581af3 100644
--- a/index.html
+++ b/index.html
@@ -21,26 +21,26 @@ use it in GPXSee.
4UMaps |
CyclOSM |
- HikeBikeMap |
- MapTiler |
-
- ÖPNVKarte |
- Open Street Map - Black and White |
- Open Street Map - HiDPI |
- Open Street Map |
-
- Open Topo Map |
- Thunderforest - Landscape |
- Thunderforest - OpenCycleMap |
- Thunderforest - Outdoors |
-
- Thunderforest - Transport |
GIScience Heidelberg |
HERE Aerial Map |
+
HERE Base Map |
+ HikeBikeMap |
+ MapTiler |
+ Open Street Map |
+
+ Open Street Map - Black and White |
+ Open Street Map - HiDPI |
+ Open Topo Map |
+ Thunderforest - Landscape |
+
+ Thunderforest - OpenCycleMap |
+ Thunderforest - Outdoors |
+ Thunderforest - Transport |
+ UNESCO |
marshruty.ru |
- UNESCO |
+ ÖPNVKarte |
Antarctica
@@ -99,10 +99,10 @@ use it in GPXSee.
Czech Republic
- ČÚZK - Ortofoto |
- ČÚZK - Základní mapy |
Poloha.Net |
Prahou na kole |
+ ČÚZK - Ortofoto |
+ ČÚZK - Základní mapy |
Finland
@@ -131,9 +131,9 @@ use it in GPXSee.
Bayern DOP |
Berlin DOP |
Hamburg DOP |
- Sachsen-Anhalt DOP |
-
Sachsen DOP |
+
+ Sachsen-Anhalt DOP |
TopPlusOpen |
@@ -162,31 +162,31 @@ use it in GPXSee.
Jan Mayen Topography |
- Topografisk Norgeskart |
- Svalbard Topography |
Svalbard Orthophoto |
-
Svalbard Satellite Imagery |
+ Svalbard Topography |
+
+ Topografisk Norgeskart |
Poland
- GUGIK Ortofotomapa |
GUGIK Mapa Topograficzna |
+ GUGIK Ortofotomapa |
UMP-pcPL |
Russian Federation
- Races |
GGC 1km |
- GGC 2km |
GGC 250m |
-
+ GGC 2km |
GGC 500m |
+
O-sport |
+ Races |
Slazav map |
Topo 1km |
@@ -198,8 +198,8 @@ use it in GPXSee.
Freemap Slovakia |
- GKÚ - ZBGIS |
GKÚ - Ortofotomozaika |
+ GKÚ - ZBGIS |
Slovenia
@@ -219,10 +219,10 @@ use it in GPXSee.
Switzerland
- OSM Switzerland Swiss Style |
OSM Switzerland |
- Swisstopo Aerial |
+ OSM Switzerland Swiss Style |
Swisstopo |
+ Swisstopo Aerial |
North America
diff --git a/scripts/mapgen.py b/scripts/mapgen.py
index d81a1b0..e5e1dc4 100755
--- a/scripts/mapgen.py
+++ b/scripts/mapgen.py
@@ -298,11 +298,14 @@ def mapinfo(xmlfile):
def processmaps(maps, htmlfile):
htmlfile.write("\n\n")
- i = 0
- maps.sort()
+ items = []
for xmlfile in maps:
shutil.copyfile(xmlfile, "../maps/" + os.path.basename(xmlfile))
- info = mapinfo(xmlfile)
+ items.append(mapinfo(xmlfile))
+ items.sort(key=lambda tup: tup["name"])
+
+ i = 0
+ for info in items:
if i and i % 4 == 0:
htmlfile.write("
\n")
htmlfile.write("" + " |