管道基础大数据平台系统开发-【CS】-ExportMap
13693261870
2024-09-07 8d7a67ab1d635cb954337d8a767878ae526dd3dc
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");