From 5435f376e070f7a5fc1f89aaee7c46abb37c5120 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期日, 14 五月 2023 09:49:06 +0800 Subject: [PATCH] 1 --- ExportMap/App_Start/WebApiConfig.cs | 6 ++++++ ExportMap/ExportMap.csproj | 1 + ExportMap/Controllers/TerraController.cs | 20 ++++++++++++++++++++ 3 files changed, 27 insertions(+), 0 deletions(-) diff --git a/ExportMap/App_Start/WebApiConfig.cs b/ExportMap/App_Start/WebApiConfig.cs index 6a18da3..aa1b663 100644 --- a/ExportMap/App_Start/WebApiConfig.cs +++ b/ExportMap/App_Start/WebApiConfig.cs @@ -16,6 +16,12 @@ // Web API routes config.MapHttpAttributeRoutes(); + //config.Routes.MapHttpRoute( + // name: "TerraApi", + // routeTemplate: "{controller}/3d/terrain", + // defaults: new { controller = "Terra" } + //); + config.Routes.MapHttpRoute( name: "FloatServer", routeTemplate: "floatserver/checkout/{action}/{id}", diff --git a/ExportMap/Controllers/TerraController.cs b/ExportMap/Controllers/TerraController.cs new file mode 100644 index 0000000..ab87fa3 --- /dev/null +++ b/ExportMap/Controllers/TerraController.cs @@ -0,0 +1,20 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Web.Http; + +namespace ExportMap.Controllers +{ + //[RoutePrefix("3d/terrain")] + public class TerraController : ApiController + { + [Route("{path}/layer.json")] + [HttpGet] + public string GetLayer(string path) + { + return "layer.json"; + } + } +} diff --git a/ExportMap/ExportMap.csproj b/ExportMap/ExportMap.csproj index 0289adc..c368c6b 100644 --- a/ExportMap/ExportMap.csproj +++ b/ExportMap/ExportMap.csproj @@ -134,6 +134,7 @@ <Compile Include="Controllers\ExportController.cs" /> <Compile Include="Controllers\FloatServerController.cs" /> <Compile Include="Controllers\licenseEncryptionController.cs" /> + <Compile Include="Controllers\TerraController.cs" /> <Compile Include="cs\CacheUtils.cs" /> <Compile Include="cs\ConvertUtils.cs" /> <Compile Include="cs\CustomMultipartFormDataStreamProvider.cs" /> -- Gitblit v1.9.3