diff --git a/src/static/map.html b/src/static/map.html
index 8796e6f..350da37 100644
--- a/src/static/map.html
+++ b/src/static/map.html
@@ -759,6 +759,16 @@
this.initLocationTracking();
}
});
+
+ // 网络状态监听(如果运行在 UniApp 环境中)
+ window.addEventListener('online', () => {
+ if (App.map) {
+ // 网络恢复时,稍微缩放一下地图,触发瓦片重新加载,避免卡死在白屏状态
+ const zoom = App.map.getZoom();
+ App.map.setZoom(zoom + 0.01);
+ setTimeout(() => App.map.setZoom(zoom), 100);
+ }
+ });
},
/**