地图修改
This commit is contained in:
parent
46449ab8a1
commit
39e3d266e9
|
|
@ -759,6 +759,16 @@
|
||||||
this.initLocationTracking();
|
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);
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue