管道基础大数据平台系统开发-【CS】-ExportMap
13693261870
2023-10-19 b23156724c8f122a1b665c5179c04e5b499e9a34
修改影像获取方法
已修改1个文件
12 ■■■■ 文件已修改
ExportMap/cs/WebUtils.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/cs/WebUtils.cs
@@ -143,13 +143,13 @@
        /// </summary>
        public static HttpResponseMessage GetTile(HttpRequestMessage Request, string path, int z, int x, int y)
        {
            string basePath = Path.Combine(LFData, path);
            string basePath = Path.Combine(LFData, path, z.ToString());
            if (!Directory.Exists(basePath))
            {
                throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.BadRequest, "路径不存在!"));
                throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.NotFound, "路径不存在!"));
            }
            string file = basePath + "\\" + z + "\\" + x + "\\" + y + ".png";
            string file = basePath + "\\" + x + "\\" + y + ".png";
            if (!File.Exists(file))
            {
                throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.NotFound, "文件不存在!"));
@@ -163,13 +163,13 @@
        /// </summary>
        public static HttpResponseMessage GetTile0(HttpRequestMessage Request, string path, int z, int x, int y)
        {
            string basePath = Path.Combine(LFData, path);
            string basePath = Path.Combine(LFData, path, z.ToString());
            if (!Directory.Exists(basePath))
            {
                throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.BadRequest, "路径不存在!"));
                throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.NotFound, "路径不存在!"));
            }
            string file = basePath + "\\" + z + "\\" + x + "\\" + y + ".png";
            string file = basePath + "\\" + x + "\\" + y + ".png";
            if (!File.Exists(file))
            {
                return DownloadFile(EmptyPng, y + ".png", "image/png");