Skip to content

Commit eb255ec

Browse files
authored
Merge pull request #44 from SMLunchen/fix_tile_download
fix: tile download for offline usage would use tile url ALWAYS no mat…
2 parents 1b24544 + 599ed2b commit eb255ec

6 files changed

Lines changed: 139 additions & 26 deletions

File tree

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,12 @@ SCHNELLSTART.md
6262
SCHNELLSTART.md
6363
backlog.txt
6464
PLAN.md
65+
66+
# Tile-auth: private ops docs & any secrets. MUST NOT be published (full
67+
# attack/defense logic + token material). Keep out of the public repo.
68+
plan_tile_auth.md
69+
TILE_AUTH_IMPLEMENTATION.md
70+
TILE_AUTH_SERVER.md
71+
tile-keys/
72+
*.tileauth.key
73+
secret.key

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@ und dieses Projekt folgt [Semantic Versioning](https://semver.org/lang/de/).
1111

1212
---
1313

14+
## [1.6.2.5] - 2026-08-30
15+
16+
### 🐛 Behoben
17+
18+
#### 🗺️ Tile-Download ignorierte den Karten-Modus (nutzte immer die Tile-Server-URL)
19+
- Beim Offline-Laden von Kacheln wurde **immer** die im Feld „Tile-Server URL" stehende Adresse verwendet — unabhängig vom gewählten Karten-Modus und der Quell-Auswahl (osm/topo/dark). In Meshhessen-/Offline-Modus lud der Download so von der Custom-URL statt vom quellenrichtigen offiziellen Server.
20+
- Jetzt gilt: Die Custom-URL ist **nur** im Modus „Eigener Tile-Server" (`online-custom`) aktiv — dort weiterhin auch der ungespeicherte Wert aus dem Textfeld, damit man ohne Speichern laden kann. In allen anderen Modi nutzt der Download den zum Quell-Dropdown passenden Server (`online-own`/offline → offizielle Meshhessen-Server, `online-osm` → public OSM, für Bulk ohnehin gesperrt). Damit sind Download und Kartenabfrage konsistent.
21+
22+
---
23+
1424
## [1.6.2.4] - 2026-08-22
1525

1626
### 🐛 Behoben

MeshhessenClient/MainWindow.Map.cs

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,18 @@ public partial class MainWindow
4747
_ => "https://tile.meshhessenclient.de/osm/{z}/{x}/{y}.png"
4848
};
4949

50+
// The tile URL actually in effect for the current map mode and the given source.
51+
// The configured custom URL fields apply ONLY in custom mode; every other mode
52+
// uses its own server (online-own + offline → official Meshhessen servers,
53+
// online-osm → public OSM). Mirrors the live-map provider selection in
54+
// InitializeMap, so downloads and map queries stay in sync.
55+
private string GetActiveTileUrl(string source) => _currentSettings.MapMode switch
56+
{
57+
"online-custom" => GetUrlForSource(source),
58+
"online-osm" => "https://tile.openstreetmap.org/{z}/{x}/{y}.png",
59+
_ => GetMeshhessenUrlForSource(source),
60+
};
61+
5062
// Vector rendering is available in all modes except online-osm (no public vector OSM server)
5163
private bool UseVectorMap =>
5264
_currentSettings.MapRenderMode == "vector" && _currentSettings.MapMode != "online-osm";
@@ -1315,26 +1327,28 @@ private void ShowNodeInfoDialog(NodeInfo node)
13151327

13161328
private void DownloadTiles_Click(object sender, RoutedEventArgs e)
13171329
{
1318-
// Tile-Server URL direkt aus TextBox übernehmen (auch ohne vorheriges Speichern)
1319-
var currentTileUrl = string.IsNullOrWhiteSpace(TileServerUrlTextBox.Text)
1320-
? "https://tile.meshhessenclient.de/osm/{z}/{x}/{y}.png"
1321-
: TileServerUrlTextBox.Text.Trim();
1330+
var source = _currentSettings.MapSource;
1331+
1332+
// The custom "Tile-Server URL" field is honoured ONLY in custom mode – and
1333+
// there the (possibly unsaved) textbox value wins, so the user can download
1334+
// without saving first. Every other mode downloads from its own server, so
1335+
// the source dropdown (osm/topo/dark) decides, not the URL field.
1336+
string url;
1337+
if (_currentSettings.MapMode == "online-custom")
1338+
url = string.IsNullOrWhiteSpace(TileServerUrlTextBox.Text)
1339+
? GetUrlForSource(source)
1340+
: TileServerUrlTextBox.Text.Trim();
1341+
else
1342+
url = GetActiveTileUrl(source);
13221343

1323-
// Update the appropriate URL based on current map source
1324-
switch (_currentSettings.MapSource)
1344+
switch (source)
13251345
{
1326-
case "osm":
1327-
TileDownloaderService.OSMTileUrl = currentTileUrl;
1328-
break;
1329-
case "osmtopo":
1330-
TileDownloaderService.OSMTopoTileUrl = currentTileUrl;
1331-
break;
1332-
case "osmdark":
1333-
TileDownloaderService.OSMDarkTileUrl = currentTileUrl;
1334-
break;
1346+
case "osm": TileDownloaderService.OSMTileUrl = url; break;
1347+
case "osmtopo": TileDownloaderService.OSMTopoTileUrl = url; break;
1348+
case "osmdark": TileDownloaderService.OSMDarkTileUrl = url; break;
13351349
}
13361350

1337-
var win = new TileDownloaderWindow(_currentSettings.MapSource) { Owner = this };
1351+
var win = new TileDownloaderWindow(source) { Owner = this };
13381352
win.ShowDialog();
13391353
// Nach Download: Map-Status aktualisieren
13401354
UpdateMapTileStatus();

MeshhessenClient/MeshhessenClient.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
<PublishDir>..\public\</PublishDir>
1919

2020
<AssemblyName>MeshhessenClient</AssemblyName>
21-
<Version>1.6.2.4</Version>
22-
<AssemblyVersion>1.6.2.4</AssemblyVersion>
23-
<FileVersion>1.6.2.4</FileVersion>
21+
<Version>1.6.2.5</Version>
22+
<AssemblyVersion>1.6.2.5</AssemblyVersion>
23+
<FileVersion>1.6.2.5</FileVersion>
2424
<Company>Meshtastic Community</Company>
2525
<Product>Meshhessen Client</Product>
2626
<Description>Offline-fähiger Windows Client für Meshtastic Geräte</Description>

docs/changelog.html

Lines changed: 84 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,50 @@ <h1>Changelog</h1>
172172
<div class="section active" id="de">
173173
<main>
174174

175-
<!-- ── v1.6.2.3 ── -->
175+
<!-- ── v1.6.2.5 ── -->
176176
<div class="version-entry current">
177177
<div class="version-header">
178-
<span class="version-tag tag-latest">v1.6.2.3</span>
178+
<span class="version-tag tag-latest">v1.6.2.5</span>
179+
<span class="version-date">2026-08-30</span>
180+
Tile-Download folgt dem Karten-Modus
181+
</div>
182+
<p class="version-desc">Bugfix: Das Offline-Laden von Kacheln nutzte immer die „Tile-Server URL", egal welcher Karten-Modus gewählt war.</p>
183+
184+
<div class="cl-section fixed">
185+
<h3>🗺️ Tile-Download</h3>
186+
<div class="cl-group">
187+
<ul class="cl-list">
188+
<li><strong>Download ignorierte den Karten-Modus</strong> — es wurde immer die Custom-URL aus dem Feld „Tile-Server URL" verwendet, unabhängig von Modus und Quell-Auswahl (osm/topo/dark). Die Custom-URL ist jetzt <strong>nur</strong> im Modus „Eigener Tile-Server" aktiv; alle anderen Modi laden vom quellenrichtigen Server (Meshhessen bzw. public OSM). Download und Kartenabfrage sind damit konsistent.</li>
189+
</ul>
190+
</div>
191+
</div>
192+
</div>
193+
194+
<!-- ── v1.6.2.4 ── -->
195+
<div class="version-entry">
196+
<div class="version-header">
197+
<span class="version-tag">v1.6.2.4</span>
198+
<span class="version-date">2026-08-22</span>
199+
Kanal-Anzeige, Reply-Kanal &amp; Debug-Scroll
200+
</div>
201+
<p class="version-desc">Mehrere Fixes rund um Kanäle und das Debug-Log.</p>
202+
203+
<div class="cl-section fixed">
204+
<h3>🐛 Behoben</h3>
205+
<div class="cl-group">
206+
<ul class="cl-list">
207+
<li><strong>Kanal-Anzeige im Backlog</strong> zeigte teils „Kanal N" statt des Kanalnamens — jetzt einheitlich aus dem aktuellen Kanal-Index aufgelöst und beim Eintreffen der Kanäle neu berechnet.</li>
208+
<li><strong>Reply wechselt wieder auf den Kanal der Nachricht</strong> — „Antworten" schaltet den aktiven Kanal auf den um, auf dem die Nachricht empfangen wurde (Live und Backlog).</li>
209+
<li><strong>Debug-Log Auto-Scroll sprang nach oben</strong> statt dem Ende zu folgen — Reihenfolge korrigiert: erst trimmen, dann ans Ende scrollen.</li>
210+
</ul>
211+
</div>
212+
</div>
213+
</div>
214+
215+
<!-- ── v1.6.2.3 ── -->
216+
<div class="version-entry">
217+
<div class="version-header">
218+
<span class="version-tag">v1.6.2.3</span>
179219
<span class="version-date">2026-08-16</span>
180220
Alert-Bell, verschlüsselte Antworten &amp; Karten-Feinschliff
181221
</div>
@@ -1087,10 +1127,50 @@ <h3>✨ Hinzugefügt</h3>
10871127
<div class="section" id="en">
10881128
<main>
10891129

1090-
<!-- ── v1.6.2.3 (EN) ── -->
1130+
<!-- ── v1.6.2.5 (EN) ── -->
10911131
<div class="version-entry current">
10921132
<div class="version-header">
1093-
<span class="version-tag tag-latest">v1.6.2.3</span>
1133+
<span class="version-tag tag-latest">v1.6.2.5</span>
1134+
<span class="version-date">2026-08-30</span>
1135+
Tile download follows the map mode
1136+
</div>
1137+
<p class="version-desc">Bugfix: offline tile downloads always used the "Tile server URL", regardless of the selected map mode.</p>
1138+
1139+
<div class="cl-section fixed">
1140+
<h3>🗺️ Tile download</h3>
1141+
<div class="cl-group">
1142+
<ul class="cl-list">
1143+
<li><strong>Download ignored the map mode</strong> — it always used the custom URL from the "Tile server URL" field, regardless of mode and source selection (osm/topo/dark). The custom URL is now active <strong>only</strong> in "Own tile server" mode; every other mode downloads from the correct server for the source (Meshhessen or public OSM). Download and map query are now consistent.</li>
1144+
</ul>
1145+
</div>
1146+
</div>
1147+
</div>
1148+
1149+
<!-- ── v1.6.2.4 (EN) ── -->
1150+
<div class="version-entry">
1151+
<div class="version-header">
1152+
<span class="version-tag">v1.6.2.4</span>
1153+
<span class="version-date">2026-08-22</span>
1154+
Channel display, reply channel &amp; debug scroll
1155+
</div>
1156+
<p class="version-desc">Several fixes around channels and the debug log.</p>
1157+
1158+
<div class="cl-section fixed">
1159+
<h3>🐛 Fixed</h3>
1160+
<div class="cl-group">
1161+
<ul class="cl-list">
1162+
<li><strong>Channel display in the backlog</strong> sometimes showed "Channel N" instead of the channel name — now resolved consistently from the current channel index and recomputed when channels arrive.</li>
1163+
<li><strong>Reply switches back to the message's channel</strong> — "Reply" sets the active channel to the one the message was received on (live and backlog).</li>
1164+
<li><strong>Debug-log auto-scroll jumped to the top</strong> instead of following the end — order fixed: trim first, then scroll to end.</li>
1165+
</ul>
1166+
</div>
1167+
</div>
1168+
</div>
1169+
1170+
<!-- ── v1.6.2.3 (EN) ── -->
1171+
<div class="version-entry">
1172+
<div class="version-header">
1173+
<span class="version-tag">v1.6.2.3</span>
10941174
<span class="version-date">2026-08-16</span>
10951175
Alert bell, encrypted replies &amp; map polish
10961176
</div>

docs/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"url": "https://smlunchen.github.io/mh_windowsclient/",
4242
"downloadUrl": "https://github.com/SMLunchen/mh_windowsclient/releases/latest",
4343
"author": { "@type": "Organization", "name": "Meshhessen Community", "url": "https://www.meshhessen.de" },
44-
"softwareVersion": "1.6.2.3",
44+
"softwareVersion": "1.6.2.5",
4545
"screenshot": "https://raw.githubusercontent.com/SMLunchen/mh_windowsclient/master/img/map.png",
4646
"keywords": "Meshtastic, Windows, LoRa, Mesh, Telemetrie, Traceroute, Offline-Karte, PKI"
4747
}
@@ -312,7 +312,7 @@ <h1>Meshhessen Client</h1>
312312
<main>
313313

314314
<div class="whats-new">
315-
<span class="vbadge">v1.6.2.3</span>
315+
<span class="vbadge">v1.6.2.5</span>
316316
<span class="summary">🔔 Alert-Bell löst endlich den Hardware-Alert aus (ASCII 0x07) · 🔐 Antworten auf Info-Anfragen werden korrekt verarbeitet, PKI-DMs sofort entschlüsselt · 🗺️ „Auf Karte zeigen" auch auf der Vector-Karte.</span>
317317
<a href="changelog.html">Changelog ansehen →</a>
318318
</div>
@@ -775,7 +775,7 @@ <h2>Download &amp; Installation</h2>
775775
<main>
776776

777777
<div class="whats-new">
778-
<span class="vbadge">v1.6.2.3</span>
778+
<span class="vbadge">v1.6.2.5</span>
779779
<span class="summary">🔔 Alert bell finally triggers the hardware alert (ASCII 0x07) · 🔐 replies to info requests are handled correctly, PKI DMs decrypt immediately · 🗺️ "Show on map" now works on the vector map too.</span>
780780
<a href="changelog.html">View changelog →</a>
781781
</div>

0 commit comments

Comments
 (0)