mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-02 19:02:00 +00:00
feat(map): base layers - Topo, Light, Dark, Satellite, Esri Topo
Map tools > Layers > Map picks what the map is drawn from: - Topo: OpenTopoMap, as before. - Light and Dark: Esri's grey canvases, no labels, up to z16. - Satellite: Esri World Imagery. - Esri Topo. Each layer has its own folder for downloaded areas (/sdcard/maps-light, -dark, -sat, -esritopo; Topo stays in /sdcard/maps) and its own live-tile cache. Live-cache records carry the layer. Esri serves JPEG: decoded with LVGL's tjpgd (LV_USE_TJPGD), whatever the file name says. The layer is kept in NVS (mc_ui/layer); switching waits while a download or a deletion runs in the current folder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -95,6 +95,7 @@ static bool s_chats_stale = false; // Messages: a refresh waits for a held row
|
||||
#include "LvglPort.h"
|
||||
#include "lv_mem_psram.h"
|
||||
#include "HistoryStore.h"
|
||||
#include "map/MapLayers.h"
|
||||
#include "map/LiveCache.h"
|
||||
static histstore::SdArchive s_archive; // message history on the SD card
|
||||
namespace storeview { static void stopWalk(); } // StorageScreen.h
|
||||
@@ -1429,7 +1430,7 @@ extern "C" EMSCRIPTEN_KEEPALIVE int sim_scroll(int dy) {
|
||||
#if defined(SIM_PLATFORM) && defined(__EMSCRIPTEN__)
|
||||
// The simulator page opens a screen by name (screenshots of the layout):
|
||||
// home, chats, contacts, settings, settings:<page>, nearby, map, navmap, places, clock, radio,
|
||||
// gps, diag, compass, storage, repeater, wifi, bot, quick, node, channel.
|
||||
// gps, diag, compass, storage, repeater, wifi, bot, quick, node, channel, layer:<n>.
|
||||
extern "C" EMSCRIPTEN_KEEPALIVE int sim_ui_show(const char* name) {
|
||||
if (!s_ui || !name) return 0;
|
||||
UITask& u = *s_ui;
|
||||
@@ -1442,6 +1443,7 @@ extern "C" EMSCRIPTEN_KEEPALIVE int sim_ui_show(const char* name) {
|
||||
else if (!strcmp(name, "map")) u.openMap(false);
|
||||
else if (!strcmp(name, "navmap")) u.openMap(true);
|
||||
else if (!strcmp(name, "places")) { u.openMap(true); u.navTargetsPopup(); }
|
||||
else if (!strncmp(name, "layer:", 6)) u.setMapLayer(atoi(name + 6)); // the map's base layer (MapLayers.h)
|
||||
else if (!strcmp(name, "clock")) u.showClock();
|
||||
else if (!strcmp(name, "radio")) u.showRadio();
|
||||
else if (!strcmp(name, "gps")) u.showGps(false);
|
||||
|
||||
Reference in New Issue
Block a user