diff --git a/GeometricSightTracking/main.py b/GeometricSightTracking/main.py
index a974171..4053460 100644
--- a/GeometricSightTracking/main.py
+++ b/GeometricSightTracking/main.py
@@ -128,7 +128,11 @@ def main():
# 将结果拷贝的目标目录下
shutil.copytree(outputDir, outputDistDir)
-
+ # 将2个js文件拷贝到output目录下
+ echartjsFilePath = "../../resources/echarts.min.js"
+ worldjsFilePath = "../../resources/world.js"
+ shutil.copy(echartjsFilePath, os.path.join(outputDistDir, os.path.basename(echartjsFilePath)))
+ shutil.copy(worldjsFilePath, os.path.join(outputDistDir, os.path.basename(worldjsFilePath)))
if __name__ == "__main__":
try:
diff --git a/GeometricSightTracking/mainMapEcharts.py b/GeometricSightTracking/mainMapEcharts.py
index da524ba..d19aaf6 100644
--- a/GeometricSightTracking/mainMapEcharts.py
+++ b/GeometricSightTracking/mainMapEcharts.py
@@ -42,10 +42,14 @@ def rendOutputGeo(outputFilePath: str):
# 修改html,支持全屏和自适应
with open(htmlFilePath, "r") as file:
data = file.read()
- # 设置全屏大小
+ # 1、设置全屏大小
+ # 2、将在线js文件替换为本地js文件
data = data.replace(
"",
"\n",
- )
+ ).replace(
+ "https://assets.pyecharts.org/assets/v5/echarts.min.js", "echarts.min.js").replace(
+ "https://assets.pyecharts.org/assets/v5/maps/world.js","world.js")
with open(htmlFilePath, "w", encoding="utf-8") as file:
file.write(data)
+
diff --git a/TOASimu/main.py b/TOASimu/main.py
index e4c67c2..e75a2db 100644
--- a/TOASimu/main.py
+++ b/TOASimu/main.py
@@ -213,7 +213,9 @@ def handleOutput(lon: float, lat: float, index: int):
data = data.replace(
"",
"\n",
- )
+ ).replace(
+ "https://assets.pyecharts.org/assets/v5/echarts.min.js", "echarts.min.js").replace(
+ "https://assets.pyecharts.org/assets/v5/maps/world.js","world.js")
with open(f"output/{index}_scatter_chart.html", "w", encoding="utf-8") as file:
file.write(data)
@@ -286,7 +288,9 @@ def renderReflectance(pointList: list, valueList: list):
data = data.replace(
"",
"\n",
- )
+ ).replace(
+ "https://assets.pyecharts.org/assets/v5/echarts.min.js", "echarts.min.js").replace(
+ "https://assets.pyecharts.org/assets/v5/maps/world.js","world.js")
with open(htmlFilePath, "w", encoding="utf-8") as file:
file.write(data)
pass
@@ -513,6 +517,12 @@ def main():
globalUtils.rmPath(projectOutputDir)
# 将结果拷贝到目的目录
shutil.copytree("output", projectOutputDir)
+
+ # 将2个js文件拷贝到output目录下
+ echartjsFilePath = "../../resources/echarts.min.js"
+ worldjsFilePath = "../../resources/world.js"
+ shutil.copy(echartjsFilePath, os.path.join(projectOutputDir, os.path.basename(echartjsFilePath)))
+ shutil.copy(worldjsFilePath, os.path.join(projectOutputDir, os.path.basename(worldjsFilePath)))
return