一、AGS server admin api 介绍

1.1什么是admin api

AGS Server Admin api 官方的称呼是 AGS Server administrator api, 通过这名字也可以猜出该api的作用,通过该api可以管理arcgis server。ArcGIS Server常见的管理功能有安装配置、server 日志、站点的监测配置等,详细的Server管理内容,可以参考ArcGIS Server的官方帮助的管理arcgis Server

1.2 admin api 作用

通常ArcGIS Server的管理是通过在manager页面中进行的。但是arcgis server manager所呈现的管理功能其后台也是通过调用admin api。也就是说manager页面的管理是esri通过调用admin api开发出来的web 端的server管理工具。有些server的管理工具在manager找不到,但是可以从admin中页面中获得。

通过调研admin api 完全可以开发一个管理工具来替代manager,从中根据自己的业务需求定制所需要的功能。一句话概括就是使用admin api可以二次开发出server管理系统。目前使用admin api开发比较好的产品为,捷泰天域开发的oneMap,其就是一个通过调用admin api开发出的server管理工具,通过oneMap可以方便的实现manger 已有的功能,也可以实现诸如日志统计分析、管理数据的统计,并将统计信息已图表的形式呈现这种manger没有呈现的功能。

如果用户不想基于admin api 开发新的server管理系统,而想对ArcGIS server manager中的内容进行更改,可以直接进行admin页面中,链接格式如下:http://localhost:6080/arcgis/admin/login,可以在这里面对manager进行管理。

Tips: 10.2  server的admin 中添加了站点的备份与恢复

1.3 admin api的实质

admin api 的实质也就是rest api,通过发送参数为json格式的http请求,实现操作。则可以看出,只要任何可以发送http请求的编程语言都可以用来调用admin api,像java,python,c# 等,本文就采用C# 调用Admin api进行示例。

二、使用C#调用admin api

admin api 通常调用遵循以下步骤:

1.获取token

根据站点用户名和密码生成token和证书

  1. private string GenerateAGSToken()
  2. {
  3. try
  4. {
  5. string urlGenerateToken = string.Format("{0}/generateToken", this.urlRestAdmin);
  6. string credential = string.Format("username={0}&password={1}&client=requestip&expiration=&f=json", this.username, this.password);
  7. string result = this.GetResult(urlGenerateToken, credential);
  8.  
  9. JsonObject jsonObject = new JsonObject(result);
  10. string token = null;
  11. if (!jsonObject.Exists("token") || !jsonObject.TryGetString("token", out token))
  12. {
  13. throw new Exception("Token not found!");
  14. }
  15.  
  16. return token;
  17. }
  18. catch(Exception ex)
  19. {
  20. return string.Empty;
  21. }
  22. }

2.构建json格式的参数

根据执行的操作所需要的参数,构建json格式的参数,这里以创建服务操作作为例子,进行json字符串的构建。这里使用的JsonObject对象为SOE开发中的链接库ESRI.ArcGIS.SOESupport.dll 所带。

  1. public bool CreateService()
  2. {
  3. try
  4. {
  5. string token = this.GenerateAGSToken();
  6. string serviceUrl = this.urlRestAdmin + "/services/createService";
  7.  
  8. JsonObject jsonObject = new JsonObject();
  9. jsonObject.AddString("serviceName", "Test");
  10. //服务类型
  11. jsonObject.AddString("type", Enum.GetName(typeof(ServiceType), ServiceType.GPServer));
  12. jsonObject.AddString("description", "This is an example");
  13. //不同的服务类型,其capabilities是不同的,地图服务的为Map,query和data
  14. // jsonObject.AddString("capabilities", "Map,Query,Data");
  15.  
  16. jsonObject.AddString("capabilities","Uploads");//gp 服务的capabilities
  17. jsonObject.AddString("clusterName", "default");
  18. jsonObject.AddLong("minInstancesPerNode", );
  19. jsonObject.AddLong("maxInstancesPerNode", );
  20. jsonObject.AddLong("maxWaitTime", );
  21. jsonObject.AddLong("maxStartupTime", );
  22. jsonObject.AddLong("maxIdleTime", );
  23. jsonObject.AddLong("maxUsageTime", );
  24. jsonObject.AddLong("recycleInterval", );
  25. jsonObject.AddString("loadBalancing", Enum.GetName(typeof(LoadBalancing), LoadBalancing.ROUND_ROBIN));
  26. jsonObject.AddString("isolationLevel", Enum.GetName(typeof(IsolationLevel), IsolationLevel.HIGH));
  27.  
  28. JsonObject jsonObjectProperties = new JsonObject();
  29.  
  30. // see for a list complete http://resources.arcgis.com/en/help/server-admin-api/serviceTypes.html
  31. jsonObjectProperties.AddLong("maxBufferCount", ); // optional 100
  32. jsonObjectProperties.AddString("virtualCacheDir", this.urlRestServer + "/arcgiscache"); // optional
  33. jsonObjectProperties.AddLong("maxImageHeight", ); // optional 2048
  34. jsonObjectProperties.AddLong("maxRecordCount", ); // optional 500
  35.  
  36. //10.1中服务是通过msd的形式发布的,所以创建地图服务时候将mxd转换成msd的形式,创建msd的形式而其他服务的数据发布形式,参考上面的链接
  37.  
  38. // jsonObjectProperties.AddString("filePath", @"C:\AvGis\Test\mappa\UTM_ReteFognaria.msd"); //地图服务 required
  39.  
  40. jsonObjectProperties.AddString( "toolbox",@"d:\Buffer.tbx");//gp服务使用的是路径创建gp服务的路径
  41.  
  42. jsonObjectProperties.AddLong("maxImageWidth", ); // optional 2048
  43. jsonObjectProperties.AddBoolean("cacheOnDemand", false); // optional false
  44. jsonObjectProperties.AddString("virtualOutputDir", this.urlRestServer + "/arcgisoutput");
  45. jsonObjectProperties.AddString("outputDir", @"C:\arcgisserver\directories\arcgisoutput");
  46. jsonObjectProperties.AddString("jobsDirectory", @"C:\arcgisserver\directories\arcgisjobs"); // required
  47. jsonObjectProperties.AddString("supportedImageReturnTypes", "MIME+URL"); // optional MIME+URL
  48. jsonObjectProperties.AddBoolean("isCached", false); // optional false
  49. jsonObjectProperties.AddBoolean("ignoreCache", false); // optional false
  50. jsonObjectProperties.AddBoolean("clientCachingAllowed", false); // optional true
  51. jsonObjectProperties.AddString("cacheDir", @"C:\arcgisserver\directories\arcgiscache"); // optional
  52.  
  53. jsonObject.AddJsonObject("properties", jsonObjectProperties);
  54.  
  55. string result = this.GetResult(serviceUrl, "service=" +HttpUtility.UrlEncode(jsonObject.ToJson()) + "&f=json&token=" + token);
  56. return this.HasSuccess(result);
  57.  
  58. }
  59. catch
  60. {
  61. return false;
  62. }
  63. }

admin api中的各项参数,详见admin api的帮助:http://resources.arcgis.com/en/help/server-admin-api/,参数分为required和optional。

3.发送http请求

admin api可以支持两者get和post请求。server管理功能中有些操作是不支持get请求的。

get请求

  1. private string GetResult(string url)
  2. {
  3. try
  4. {
  5. WebRequest request = WebRequest.Create(url);
  6. WebResponse response = request.GetResponse();
  7. using (Stream responseStream = response.GetResponseStream())
  8. {
  9. using (StreamReader reader = new StreamReader(responseStream))
  10. {
  11. return reader.ReadToEnd();
  12. }
  13. }
  14. }
  15. catch
  16. {
  17. throw;
  18. }
  19. }

post请求

  1. rivate string GetResult(string url, string postContent)
  2. {
  3. try
  4. {
  5. WebRequest request = WebRequest.Create(url);
  6. byte[] content = Encoding.UTF8.GetBytes(postContent);
  7. request.ContentLength = content.Length;
  8. request.ContentType = "application/x-www-form-urlencoded";
  9. request.Method = WebRequestMethods.Http.Post;
  10. using (Stream requestStream = request.GetRequestStream())
  11. {
  12. requestStream.Write(content, , content.Length);
  13. requestStream.Close();
  14. WebResponse response = request.GetResponse();
  15. using (Stream responseStream = response.GetResponseStream())
  16. {
  17. using (StreamReader reader = new StreamReader(responseStream))
  18. {
  19. return reader.ReadToEnd();
  20. }
  21. }
  22. }
  23. }
  24. catch
  25. {
  26. throw;
  27. }
  28. }

4.接收请求

三、完整的代码

代码中涉及到服务的发布、删除、文件夹的创建等

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Web;
  7.  
  8. ////
  9.  
  10. /////
  11.  
  12. namespace Studioat.ArcGIS.Server.Administrator
  13. {
  14. using System;
  15. using System.Collections;
  16. using System.Collections.Generic;
  17. using System.IO;
  18. using System.Linq;
  19. using System.Net;
  20. using System.Text;
  21. using System.Web;
  22. using ESRI.ArcGIS.SOESupport;
  23.  
  24. /// <summary>
  25. /// 服务类型
  26. /// </summary>
  27. public enum ServiceType
  28. {
  29. MapServer,
  30. GeocodeServer,
  31. SearchServer,
  32. IndexingLauncher,
  33. IndexGenerator,
  34. GeometryServer,
  35. GeoDataServer,
  36. GPServer,
  37. GlobeServer,
  38. ImageServer
  39. }
  40.  
  41. /// <summary>
  42. /// 负载平衡
  43. /// </summary>
  44. public enum LoadBalancing
  45. {
  46. ROUND_ROBIN,
  47. FAIL_OVER
  48. }
  49.  
  50. /// <summary>
  51. /// isolation level
  52. ///
  53. /// </summary>
  54. public enum IsolationLevel
  55. {
  56. LOW,
  57. HIGH
  58. }
  59.  
  60. /// <summary>
  61. /// administrative API Rest
  62. /// </summary>
  63. public class AGSAdmin
  64. {
  65. private string username;
  66. private string password;
  67. private string urlRestAdmin;
  68. private string urlRestServer;
  69.  
  70. /// <summary>
  71. /// Initializes a new instance of the <see cref="AGSAdmin"/> class.
  72. /// </summary>
  73. /// <param name="serverName">server name</param>
  74. /// <param name="port">port of server</param>
  75. /// <param name="username">username administrator</param>
  76. /// <param name="password">password administrator</param>
  77. public AGSAdmin(string serverName, int port, string username, string password)
  78. {
  79. this.username = username;
  80. this.password = password;
  81. string url = string.Format("http://{0}:{1}/arcgis", serverName, port.ToString());
  82. this.urlRestAdmin = url + "/admin";
  83. this.urlRestServer = url + "/server";
  84. }
  85.  
  86. /// <summary>
  87. /// Prevents a default instance of the <see cref="AGSAdmin"/> class from being created.
  88. /// </summary>
  89. private AGSAdmin()
  90. {
  91. }
  92.  
  93. /// <summary>
  94. /// Create arcgis server folder
  95. /// </summary>
  96. /// <param name="folderName">Folder name</param>
  97. /// <param name="description">Description of the folder</param>
  98. /// <returns>True if successfully created</returns>
  99. public bool CreateServerFolder(string folderName, string description)
  100. {
  101. try
  102. {
  103. string token = this.GenerateAGSToken();
  104. string folderUrl = this.urlRestAdmin + "/services/" + folderName + "?f=json&token=" + token;
  105. string resultExistsFolder = this.GetResult(folderUrl);
  106. if (!this.HasError(resultExistsFolder))
  107. {
  108. return true; // exists
  109. }
  110. else
  111. {
  112. string createFolderUrl = this.urlRestAdmin + "/services/createFolder";
  113. string postContent = string.Format("folderName={0}&description={1}&f=json&token={2}", folderName, description, token);
  114. string result = this.GetResult(createFolderUrl, postContent);
  115. return this.HasSuccess(result);
  116. }
  117. }
  118. catch
  119. {
  120. return false;
  121. }
  122. }
  123.  
  124. /// <summary>
  125. /// Get physical Path and virtual Path from directory ags
  126. /// </summary>
  127. /// <param name="directory">directory ags</param>
  128. /// <param name="physicalPath">physical Path</param>
  129. /// <param name="virtualPath">virtual Path</param>
  130. /// <returns>True if successfully return path</returns>
  131. public bool GetServerDirectory(string directory, out string physicalPath, out string virtualPath)
  132. {
  133. physicalPath = null;
  134. virtualPath = null;
  135. try
  136. {
  137. string token = this.GenerateAGSToken();
  138. string directoryUrl = this.urlRestAdmin + "/system/directories/" + directory + "?f=json&token=" + token;
  139.  
  140. string result = this.GetResult(directoryUrl);
  141.  
  142. JsonObject jsonObject = new JsonObject(result);
  143. if (!jsonObject.Exists("physicalPath") || !jsonObject.TryGetString("physicalPath", out physicalPath))
  144. {
  145. throw new Exception();
  146. }
  147.  
  148. jsonObject = new JsonObject(result);
  149. if (!jsonObject.Exists("virtualPath") || !jsonObject.TryGetString("virtualPath", out virtualPath))
  150. {
  151. throw new Exception();
  152. }
  153.  
  154. return true;
  155. }
  156. catch
  157. {
  158. return false;
  159. }
  160. }
  161.  
  162. /// <summary>
  163. /// Delete Service
  164. /// </summary>
  165. /// <param name="serviceName">Service Name</param>
  166. /// <param name="serviceType">Server Type</param>
  167. /// <returns>True if successfully deleted</returns>
  168. public bool DeleteService(string serviceName, ServiceType serviceType)
  169. {
  170. try
  171. {
  172. string token = this.GenerateAGSToken();
  173. string serviceUrl = this.urlRestAdmin + "/services/" + serviceName + "." + Enum.GetName(typeof(ServiceType), serviceType) + "/delete";
  174. string result = this.GetResult(serviceUrl, "f=json&token=" + token);
  175. return this.HasSuccess(result);
  176. }
  177. catch
  178. {
  179. return false;
  180. }
  181. }
  182.  
  183. /// <summary>
  184. /// Start Service
  185. /// </summary>
  186. /// <param name="serviceName">Service Name</param>
  187. /// <param name="serviceType">Server Type</param>
  188. /// <returns>True if successfully started</returns>
  189. public bool StartService(string serviceName, ServiceType serviceType)
  190. {
  191. try
  192. {
  193. string token = this.GenerateAGSToken();
  194. string serviceUrl = this.urlRestAdmin + "/services/" + serviceName + "." + Enum.GetName(typeof(ServiceType), serviceType) + "/start";
  195. string result = this.GetResult(serviceUrl, "f=json&token=" + token);
  196. return this.HasSuccess(result);
  197. }
  198. catch
  199. {
  200. return false;
  201. }
  202. }
  203.  
  204. /// <summary>
  205. /// 停止服务
  206. /// </summary>
  207. /// <param name="serviceName">Service Name</param>
  208. /// <param name="serviceType">Server Type</param>
  209. /// <returns>True if successfully stopped</returns>
  210. public bool StopService(string serviceName, ServiceType serviceType)
  211. {
  212. try
  213. {
  214. string token = this.GenerateAGSToken();
  215. string serviceUrl = this.urlRestAdmin + "/services/" + serviceName + "." + Enum.GetName(typeof(ServiceType), serviceType) + "/stop";
  216. string result = this.GetResult(serviceUrl, "f=json&token=" + token);
  217. return this.HasSuccess(result);
  218. }
  219. catch
  220. {
  221. return false;
  222. }
  223. }
  224.  
  225. /// <summary>
  226. /// 列举服务
  227. /// </summary>
  228. public void ListServices()
  229. {
  230. this.ListServices(null);
  231. }
  232.  
  233. /// <summary>
  234. /// list of services in folder
  235. /// </summary>
  236. /// <param name="folder">name of folder</param>
  237. public void ListServices(string folder)
  238. {
  239. try
  240. {
  241. string token = this.GenerateAGSToken();
  242. string serviceUrl = this.urlRestAdmin + "/services/" + folder;
  243. string postcontent = "f=json&token=" + token;
  244. string result = this.GetResult(serviceUrl, postcontent);
  245.  
  246. JsonObject jsonObject = new JsonObject(result);
  247. object[] folders = null;
  248. if (jsonObject.Exists("folders") && jsonObject.TryGetArray("folders", out folders))
  249. {
  250. foreach (string subfolder in folders)
  251. {
  252. this.ListServices(subfolder);
  253. }
  254. }
  255.  
  256. object[] services = null;
  257. if (jsonObject.Exists("services") && jsonObject.TryGetArray("services", out services))
  258. {
  259. IEnumerable<JsonObject> jsonObjectService = services.Cast<JsonObject>();
  260. jsonObjectService.ToList().ForEach(jo =>
  261. {
  262. string serviceName;
  263. jo.TryGetString("serviceName", out serviceName);
  264. string folderName;
  265. jo.TryGetString("folderName", out folderName);
  266. Console.WriteLine(folderName + "/" + serviceName);
  267. });
  268. }
  269. }
  270. catch
  271. {
  272. throw;
  273. }
  274. }
  275.  
  276. /// <summary>
  277. /// create service type MapServer
  278. /// </summary>
  279. /// <returns>>True if successfully created</returns>
  280. public bool CreateService()
  281. {
  282. try
  283. {
  284. string token = this.GenerateAGSToken();
  285. string serviceUrl = this.urlRestAdmin + "/services/createService";
  286.  
  287. JsonObject jsonObject = new JsonObject();
  288. jsonObject.AddString("serviceName", "Test");
  289. //服务类型
  290. jsonObject.AddString("type", Enum.GetName(typeof(ServiceType), ServiceType.GPServer));
  291. jsonObject.AddString("description", "This is an example");
  292. //不同的服务类型,其capabilities是不同的,地图服务的为Map,query和data
  293. // jsonObject.AddString("capabilities", "Map,Query,Data");
  294.  
  295. jsonObject.AddString("capabilities","Uploads");//gp 服务的capabilities
  296. jsonObject.AddString("clusterName", "default");
  297. jsonObject.AddLong("minInstancesPerNode", );
  298. jsonObject.AddLong("maxInstancesPerNode", );
  299. jsonObject.AddLong("maxWaitTime", );
  300. jsonObject.AddLong("maxStartupTime", );
  301. jsonObject.AddLong("maxIdleTime", );
  302. jsonObject.AddLong("maxUsageTime", );
  303. jsonObject.AddLong("recycleInterval", );
  304. jsonObject.AddString("loadBalancing", Enum.GetName(typeof(LoadBalancing), LoadBalancing.ROUND_ROBIN));
  305. jsonObject.AddString("isolationLevel", Enum.GetName(typeof(IsolationLevel), IsolationLevel.HIGH));
  306.  
  307. JsonObject jsonObjectProperties = new JsonObject();
  308.  
  309. // see for a list complete http://resources.arcgis.com/en/help/server-admin-api/serviceTypes.html
  310. jsonObjectProperties.AddLong("maxBufferCount", ); // optional 100
  311. jsonObjectProperties.AddString("virtualCacheDir", this.urlRestServer + "/arcgiscache"); // optional
  312. jsonObjectProperties.AddLong("maxImageHeight", ); // optional 2048
  313. jsonObjectProperties.AddLong("maxRecordCount", ); // optional 500
  314.  
  315. //10.1中服务是通过msd的形式发布的,所以创建地图服务时候将mxd转换成msd的形式,创建msd的形式而其他服务的数据发布形式,参考上面的链接
  316.  
  317. // jsonObjectProperties.AddString("filePath", @"C:\AvGis\Test\mappa\UTM_ReteFognaria.msd"); //地图服务 required
  318.  
  319. jsonObjectProperties.AddString( "toolbox",@"d:\Buffer.tbx");//gp服务使用的是路径创建gp服务的路径
  320.  
  321. jsonObjectProperties.AddLong("maxImageWidth", ); // optional 2048
  322. jsonObjectProperties.AddBoolean("cacheOnDemand", false); // optional false
  323. jsonObjectProperties.AddString("virtualOutputDir", this.urlRestServer + "/arcgisoutput");
  324. jsonObjectProperties.AddString("outputDir", @"C:\arcgisserver\directories\arcgisoutput");
  325. jsonObjectProperties.AddString("jobsDirectory", @"C:\arcgisserver\directories\arcgisjobs"); // required
  326. jsonObjectProperties.AddString("supportedImageReturnTypes", "MIME+URL"); // optional MIME+URL
  327. jsonObjectProperties.AddBoolean("isCached", false); // optional false
  328. jsonObjectProperties.AddBoolean("ignoreCache", false); // optional false
  329. jsonObjectProperties.AddBoolean("clientCachingAllowed", false); // optional true
  330. jsonObjectProperties.AddString("cacheDir", @"C:\arcgisserver\directories\arcgiscache"); // optional
  331.  
  332. jsonObject.AddJsonObject("properties", jsonObjectProperties);
  333.  
  334. string result = this.GetResult(serviceUrl, "service=" +HttpUtility.UrlEncode(jsonObject.ToJson()) + "&f=json&token=" + token);
  335. return this.HasSuccess(result);
  336.  
  337. }
  338. catch
  339. {
  340. return false;
  341. }
  342. }
  343.  
  344. /// <summary>
  345. /// check is status is equal success
  346. /// </summary>
  347. /// <param name="result">result of request</param>
  348. /// <returns>True if status is equal success</returns>
  349. private bool HasSuccess(string result)
  350. {
  351. JsonObject jsonObject = new JsonObject(result);
  352. string status = null;
  353. if (!jsonObject.Exists("status") || !jsonObject.TryGetString("status", out status))
  354. {
  355. return false;
  356. }
  357.  
  358. return status == "success";
  359. }
  360.  
  361. /// <summary>
  362. ///错误信息判断
  363. /// </summary>
  364. /// <param name="result">result of request</param>
  365. /// <returns>True if status is equal error</returns>
  366. private bool HasError(string result)
  367. {
  368. JsonObject jsonObject = new JsonObject(result);
  369. string status = null;
  370. if (!jsonObject.Exists("status") || !jsonObject.TryGetString("status", out status))
  371. {
  372. return false;
  373. }
  374.  
  375. return status == "error";
  376. }
  377.  
  378. /// <summary>
  379. /// get请求
  380. /// </summary>
  381. /// <param name="url">get 请求url</param>
  382. /// <returns>return response</returns>
  383. private string GetResult(string url)
  384. {
  385. try
  386. {
  387. WebRequest request = WebRequest.Create(url);
  388. WebResponse response = request.GetResponse();
  389. using (Stream responseStream = response.GetResponseStream())
  390. {
  391. using (StreamReader reader = new StreamReader(responseStream))
  392. {
  393. return reader.ReadToEnd();
  394. }
  395. }
  396. }
  397. catch
  398. {
  399. throw;
  400. }
  401. }
  402.  
  403. /// <summary>
  404. /// post请求
  405. /// </summary>
  406. /// <param name="url">请求url</param>
  407. /// <param name="postContent">post content</param>
  408. /// <returns></returns>
  409. private string GetResult(string url, string postContent)
  410. {
  411. try
  412. {
  413. WebRequest request = WebRequest.Create(url);
  414. byte[] content = Encoding.UTF8.GetBytes(postContent);
  415. request.ContentLength = content.Length;
  416. request.ContentType = "application/x-www-form-urlencoded";
  417. request.Method = WebRequestMethods.Http.Post;
  418. using (Stream requestStream = request.GetRequestStream())
  419. {
  420. requestStream.Write(content, , content.Length);
  421. requestStream.Close();
  422. WebResponse response = request.GetResponse();
  423. using (Stream responseStream = response.GetResponseStream())
  424. {
  425. using (StreamReader reader = new StreamReader(responseStream))
  426. {
  427. return reader.ReadToEnd();
  428. }
  429. }
  430. }
  431. }
  432. catch
  433. {
  434. throw;
  435. }
  436. }
  437.  
  438. /// <summary>
  439. /// 产生token
  440. /// </summary>
  441. /// <returns>返回一个toke,采用默认的过期时间令牌</returns>
  442. private string GenerateAGSToken()
  443. {
  444. try
  445. {
  446. string urlGenerateToken = string.Format("{0}/generateToken", this.urlRestAdmin);
  447. string credential = string.Format("username={0}&password={1}&client=requestip&expiration=&f=json", this.username, this.password);
  448. string result = this.GetResult(urlGenerateToken, credential);
  449.  
  450. JsonObject jsonObject = new JsonObject(result);
  451. string token = null;
  452. if (!jsonObject.Exists("token") || !jsonObject.TryGetString("token", out token))
  453. {
  454. throw new Exception("Token not found!");
  455. }
  456.  
  457. return token;
  458. }
  459. catch(Exception ex)
  460. {
  461. return string.Empty;
  462. }
  463. }
  464. }
  465. }

工程文件下载:https://github.com/myyouthlife/blog/tree/master/Studioat.ArcGIS.Server.Administrator

C# 调用ArcGIS server admin api的更多相关文章

  1. arcgis engine 调用arcgis server服务

    首先需要添加两个引用: using ESRI.ArcGIS.GISClient;using ESRI.ArcGIS.DataSourcesRaster; /// <summary> /// ...

  2. OpenLayers调用arcgis server发布的地图服务

    有两种方式可以调用arcgis server发布的地图服务,一种是rest,一种是wms.  地图的投影为900913,arcgis server为10.0版本,地图服务的空间参考为3857.   与 ...

  3. OpenLayers调用ArcGIS Server发布的WFS服务

    OpenLayers调用ArcGIS Server发布的WFS服务 原创: 蔡建良 2013-08-20 一. 开发环境 1) Openlayers2.13+arcgis server9.3 2) W ...

  4. C#中winform下利用ArcEngine调用ArcGIS Server发布的服务 AE 10

    开发环境:vs2010 + AE 10 测试 public Form1() { ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Engi ...

  5. C#中winform下利用ArcEngine调用ArcGIS Server发布的服务 AE9.3

    主要使用了AE中的IAGSServerOject接口及IMapServer接口.Private void GetServerTest_Click(object sender, EventArgs e) ...

  6. ArcGIS Server JavaScript API 各命名空间的含义【转】

    1.esri 命名空间      所有的对象都是在 esri 命名空间下的,esri 有自己的属性和方法.      如 esri.version 返回当前 JavaScript API 的版本号.e ...

  7. ArcGIS Server JavaScript API中ESRI字体下载

    ---------------------------------------------------------------------------------- import sys, os im ...

  8. 移动端调用ArcGIS Server 10.1服务

    1.最好用mdb数据源,不要用shp文件作为数据源,一是属性字段长度超过5个字符会被截断,二是中文会变成乱码. 2.mxd的layer的坐标系要是WGS1984(4362),不然属性查询不出来.

  9. 应用ArcGIS Server JavaScript API实现地图卷帘效果实现

    var maskDynamicMapServiceLayer = null; var maskDynamicMapServiceLayerDiv = null; var pointNumb = 0; ...

随机推荐

  1. iOS蓝牙原生封装,助力智能硬件开发

    代码地址如下:http://www.demodashi.com/demo/12010.html 人工智能自1956年提出以来,一直默默无闻,近年来人工智能的发展得到重视逐渐发展起步,智能硬件.智能手环 ...

  2. MYSQLMTOP!开源MYSQL监控系统

    原文地址:http://www.lepus.cc/page/opensource

  3. laravel框架查看执行过的sql语句

    1.在routes.php中添加如下语句 Event::listen('illuminate.query', function($sql,$param) {     file_put_contents ...

  4. python--web项目

    zope:一个容器项目Plone:一个基于zope的工作流和内容管理项目trac:一个项目管理(任务指派.bug追踪项目,可以和subversion集成)moinmoin:一个强力的weiki系统

  5. 深入分析JavaWeb Item22 -- 国际化(i18n)

    一.国际化开发概述 软件的国际化:软件开发时,要使它能同一时候应对世界不同地区和国家的訪问,并针对不同地区和国家的訪问.提供对应的.符合来訪者阅读习惯的页面或数据. 国际化(international ...

  6. 美团HD(9)-监听点击城市

    DJSelectCityViewController.h // 点击城市发出通知 - (void)tableView:(UITableView *)tableView didSelectRowAtIn ...

  7. awk 数组

    Arrays        Arrays are subscripted with an expression between square brackets ([ and ]).   If the ...

  8. active mq 配置

    <transportConnectors> <!-- DOS protection, limit concurrent connections to 1000 and frame s ...

  9. LINUX内核升级-更新网卡驱动

    因项目需要,将当前内核(2.6.32-220.el6.x86_64)升级到目标内核(2.6.33-110.el6.x86_64),但是编译的目标 内核(2.6.33-110.el6.x86_64)的对 ...

  10. Problem H. The Fence 通过取余判重,求得某个区间的某些个数为某个数的倍数。

    /** 题目:Problem H. The Fence 链接:https://vjudge.net/problem/Gym-101090H 题意:给定一个字符串,只有0或者1: 问:假如两个不同的1之 ...