From ca1ac99551ea167d8a5b84fcd4c4389ca3b8809f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20T=C5=AFma?=
Date: Thu, 31 Oct 2024 08:46:52 +0100
Subject: [PATCH] Added section anchors
---
index.html | 76 +++++++++++++++++++++++------------------------
scripts/mapgen.py | 12 ++++----
2 files changed, 44 insertions(+), 44 deletions(-)
diff --git a/index.html b/index.html
index 85f33e7..c2962f8 100644
--- a/index.html
+++ b/index.html
@@ -17,7 +17,7 @@ directory as found under Help->Paths.
files have a ".tpl" extension instead of the usual ".xml"
extension. You must fill in the required info and rename the file before you
can use it in GPXSee.
-Worldwide
+Worldwide
 4UMaps |
@@ -56,7 +56,7 @@ can use it in GPXSee.
 ÖPNVKarte |
-Antarctica
+Antarctica
 Antarctica |
@@ -64,19 +64,19 @@ can use it in GPXSee.
 Landsat Image Mosaic of Antarctica |
-Asia
+Asia
 Slazav mountains |
-Japan
+Japan
 Geographical Institute Tile (標準地図) |
-Taiwan (Republic of China)
+Taiwan (Republic of China)
 NLSC - EMAP |
@@ -85,7 +85,7 @@ can use it in GPXSee.
 TWTOPO-rudy |
-Europe
+Europe
 Open Flighmaps |
@@ -93,14 +93,14 @@ can use it in GPXSee.
 mtbmap.cz |
-Andorra
+Andorra
 Andorra Orto |
 Andorra Topo |
-Austria
+Austria
 Basemap AT Farbe |
@@ -108,27 +108,27 @@ can use it in GPXSee.
 Basemap AT Orthofoto |
-Belgium
+Belgium
 NGI |
 Wallonia orthophotos |
-Bulgaria
+Bulgaria
 BGMountains |
-Croatia
+Croatia
 Digitalni ortofoto |
 Topografska karta 25k |
-Czech Republic
+Czech Republic
 Poloha.Net |
@@ -137,20 +137,20 @@ can use it in GPXSee.
 ČÚZK - Základní mapy |
-Denmark
+Denmark
 SDFE - Ortofoto forår [TPL] |
 SDFE - Skærmkort [TPL] |
-Estonia
+Estonia
 Maa-amet Topo |
-Finland
+Finland
 Ilmakuva (Aerial image) [TPL] |
@@ -163,7 +163,7 @@ can use it in GPXSee.
 Taustakartta (Background map) [TPL] |
-France
+France
 Carte OACI-VFR [TPL] |
@@ -171,7 +171,7 @@ can use it in GPXSee.
 Photographies aériennes |
-Germany
+Germany
 Bayern DOP |
@@ -195,13 +195,13 @@ can use it in GPXSee.
 WebVektor |
-Hungary
+Hungary
 Turistautak |
-Iceland
+Iceland
 Iceland Atlas |
@@ -209,27 +209,27 @@ can use it in GPXSee.
 Iceland Map |
-Italy
+Italy
 Lombardia Orthophoto |
 Trento Orthophoto |
-Latvia
+Latvia
 LGIA - topo |
 LGIA Ortofoto |
-Lithuania
+Lithuania
 LEII - topo |
-Netherlands
+Netherlands
 PDOK Achtergrondkaart |
@@ -237,7 +237,7 @@ can use it in GPXSee.
 PDOK TOP10NL |
-Norway
+Norway
 Statkart.no Sjøkart |
@@ -245,7 +245,7 @@ can use it in GPXSee.
 Topografisk Norgeskart |
-Poland
+Poland
 GUGIK Mapa Topograficzna |
@@ -254,7 +254,7 @@ can use it in GPXSee.
 UMP-pcPL |
-Russian Federation
+Russian Federation
 GGC 1km |
@@ -273,7 +273,7 @@ can use it in GPXSee.
 Topo 500m |
-Slovakia
+Slovakia
 Freemap Slovakia |
@@ -281,7 +281,7 @@ can use it in GPXSee.
 GKÚ - ZBGIS |
-Slovenia
+Slovenia
 Slovenia - DPK750 |
@@ -289,7 +289,7 @@ can use it in GPXSee.
 Slovenia - ortofoto |
-Spain
+Spain
 Cartografía raster del IGN |
@@ -303,7 +303,7 @@ can use it in GPXSee.
 Ortoimágenes de España |
-Svalbard & Jan Mayen Islands
+Svalbard & Jan Mayen Islands
 Jan Mayen Topography |
@@ -312,14 +312,14 @@ can use it in GPXSee.
 Svalbard Topography |
-Sweden
+Sweden
 Historiska ortofoton [TPL] |
 Topografisk Webbkarta [TPL] |
-Switzerland
+Switzerland
 OSM Switzerland |
@@ -330,7 +330,7 @@ can use it in GPXSee.
 Swisstopo - Swissimage |
-United Kingdom (Great Britain)
+United Kingdom (Great Britain)
 OS Leisure [TPL] |
@@ -338,8 +338,8 @@ can use it in GPXSee.
 OS Road [TPL] |
-North America
-Canada
+North America
+Canada
 CBMT |
@@ -347,7 +347,7 @@ can use it in GPXSee.
 Quebec Imagery |
-United States of America
+United States of America
 ChartBundle.com - Sectional |
@@ -356,8 +356,8 @@ can use it in GPXSee.
 USGS Topo |
-Oceania
-New Zealand
+Oceania
+New Zealand
 NZ Topo Map 250 |
diff --git a/scripts/mapgen.py b/scripts/mapgen.py
index 782cc2d..a99d06d 100755
--- a/scripts/mapgen.py
+++ b/scripts/mapgen.py
@@ -263,8 +263,8 @@ def sectionname(name):
else:
return name
-def header(name, level):
- return "" + name + "\n"
+def header(name, code, level):
+ return "" + name + "\n"
def tile(xmlfile, suffix):
base = os.path.splitext(os.path.basename(xmlfile))[0]
@@ -325,7 +325,7 @@ def processdir(path, level, name, htmlfile):
for entry in entries:
entrypath = os.path.join(path, entry)
if (os.path.isdir(entrypath)):
- sections.append((sectionname(entry), entrypath))
+ sections.append((sectionname(entry), entry, entrypath))
else:
maps.append(entrypath)
@@ -333,8 +333,8 @@ def processdir(path, level, name, htmlfile):
processmaps(maps, htmlfile)
sections.sort()
for section in sections:
- htmlfile.write(header(section[0], level + 1))
- processdir(section[1], level + 1, section[0], htmlfile)
+ htmlfile.write(header(section[0], section[1], level + 1))
+ processdir(section[2], level + 1, section[0], htmlfile)
if len(sys.argv) < 2:
@@ -364,7 +364,7 @@ extension. You must fill in the required info and rename the file before you
can use it in GPXSee.
""")
-htmlfile.write(header("Worldwide", 2))
+htmlfile.write(header("Worldwide", "Worldwide", 2))
processdir(sys.argv[1], 1, os.path.basename(sys.argv[1]), htmlfile)
htmlfile.write("""