管道基础大数据平台系统开发-【CS】-ExportMap
13693261870
2023-10-09 0b913d64de836a55d3eace9618c6b2c0d232d34a
MoonExp/cs/ExportUtil.cs
@@ -132,7 +132,7 @@
        {
            string date = DateStr;
            string sub = GetExportSubFolder();
            string qgz = "Test.qgz";
            string qgz = "Moon.qgz";
            args.imgPath = sub + "\\" + date + ".png";
            args.qpt = date + ".qpt";
@@ -174,7 +174,7 @@
        public static void CreateTemplate(ExportArgs args)
        {
            string imgPath = Path.Combine(DownloadFolder, args.imgPath);
            string templateFile = Path.Combine(SourcesPath, "Template.qpt");
            string templateFile = Path.Combine(SourcesPath, "MoonTemplate.qpt");
            string qptFile = Path.Combine(SourcesPath, args.qpt);
            LogOut.Info("imgPath = " + imgPath + ", tempFile = " + templateFile + ", qptFile = " + qptFile);
@@ -188,13 +188,14 @@
                .Replace("{ymin}", args.ymin.ToString())
                .Replace("{ymax}", args.ymax.ToString())
                .Replace("{xmax}", args.xmax.ToString())
                .Replace("{province}", args.province)
                //.Replace("{province}", args.province)
                .Replace("{scale}", args.scale)
                .Replace("{resolution}", args.resolution)
                //.Replace("{resolution}", args.resolution)
                //.Replace("{date}", args.date)
                .Replace("{date}", DateTime.Now.ToString("yyyy.MM.dd"))
                .Replace("{layers}", args.layers)
                .Replace("{imgPath}", imgPath);
                .Replace("{imgPath}", imgPath)
                .Replace("{wmsUrl}", null == args.wmtsUrl ? string.Empty : args.wmtsUrl);
            File.WriteAllText(qptFile, xml);
        }