From ebbda8b35efa2193155704dd71edf133d2abd90d Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期三, 15 三月 2023 19:04:05 +0800
Subject: [PATCH] 1

---
 ExportMap/cs/XYZUtils.cs |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/ExportMap/cs/XYZUtils.cs b/ExportMap/cs/XYZUtils.cs
index e0816c4..1d859e5 100644
--- a/ExportMap/cs/XYZUtils.cs
+++ b/ExportMap/cs/XYZUtils.cs
@@ -36,6 +36,7 @@
         {
             get
             {
+                //return Path.Combine(ExportUtil.SourcesPath, "xyz.qgz");
                 return "xyz.qgz";
             }
         }
@@ -62,7 +63,9 @@
 
             if (File.Exists(tifFile)) File.Delete(tifFile);
 
-            return args.id;
+            string viewFile = Path.Combine(xyzPath, "view.html");
+
+            return File.Exists(viewFile) ? args.id : 0;
         }
 
         /// <summary>
@@ -87,7 +90,8 @@
             List<string> files = new List<string>();
             foreach (SysMeta meta in list)
             {
-                files.Add(Path.Combine(uploadFolder, meta.path));
+                string filePath = Path.Combine(uploadFolder, meta.path);
+                if (File.Exists(filePath)) files.Add(filePath);
             }
             string str = string.Join("\n", files);
 

--
Gitblit v1.9.3