From 5f80de49c4a00416591054180bf809a12a76d686 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期四, 07 十一月 2024 16:40:53 +0800 Subject: [PATCH] 1 --- ExportMap/Controllers/WebController.cs | 28 ++++++++++++++++++++++++++-- 1 files changed, 26 insertions(+), 2 deletions(-) diff --git a/ExportMap/Controllers/WebController.cs b/ExportMap/Controllers/WebController.cs index 273a251..23b76ca 100644 --- a/ExportMap/Controllers/WebController.cs +++ b/ExportMap/Controllers/WebController.cs @@ -52,18 +52,42 @@ // http://localhost/ExportMap/terra/0/1/0.terrain?path=3d/terrain/dem/t [Route("terra/{z}/{x}/{y}.terrain")] - [AcceptVerbs("GET", "POST")] + [HttpGet] public HttpResponseMessage GetTerrain(int z, int x, int y, [FromUri]string path) { return WebUtils.GetTerrain(Request, path, z, x, y); } + // http://localhost/ExportMap/terra0/layer.json?path=3d/terrain/dem/t + [Route("terra0/layer.json")] + [HttpGet] + public HttpResponseMessage GetLayerJson0([FromUri]string path) + { + return WebUtils.GetLayerJson(Request, path); + } + // http://localhost/ExportMap/terra0/1/3/0.terrain?path=3d/terrain/dem/t [Route("terra0/{z}/{x}/{y}.terrain")] - [AcceptVerbs("GET", "POST")] + [HttpGet] public HttpResponseMessage GetTerrain0(int z, int x, int y, [FromUri]string path) { return WebUtils.GetTerrain0(Request, path, z, x, y); } + + // http://localhost/ExportMap/tile/18/213517/107112.png?path=2d/tiles/0102 + [Route("tile/{z}/{x}/{y}.png")] + [HttpGet] + public HttpResponseMessage GetTile(int z, int x, int y, [FromUri]string path) + { + return WebUtils.GetTile(Request, path, z, x, y); + } + + // http://localhost/ExportMap/tile0/18/213517/107110.png?path=2d/tiles/0102 + [Route("tile0/{z}/{x}/{y}.png")] + [HttpGet] + public HttpResponseMessage GetTile0(int z, int x, int y, [FromUri]string path) + { + return WebUtils.GetTile0(Request, path, z, x, y); + } } } -- Gitblit v1.9.3