ArcGIS for silverlight 中 QueryTask查询结果限制(500)问题[转]

转自:http://hi.baidu.com/techler/blog/item/1f92852e129b945c4fc22697.html

今天在做项目时遇到了,采用QueryTask地图图层查询任务时,发现最大返回结果为500条的限制。

      困扰整个下午之后,搜索到:

    官网帮助:http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jshelp_start.htm#jshelp/intro_querytask.htm中有一段提到:

“You should also consider that users can inadvertently or maliciously request unlimited numbers of features. The maximum number of features returned is the MaxRecordCount set in the map service configuration file. By default, this maximum is set to 500 features. Some common ways a user can request the maximum number of records for a layer are:

  • Request all cities with a population greater than 0.
  • Send an empty where statement (where="")
  • Send a statement that is always true (where="1=1").
  • Selecting all features in a layer. ”

    最终按图索骥发现在ArcGIS Server安装目录下存在路径:“C:\Program Files\ArcGIS\server\user\cfg”(本机安装ArcGIS Server默认装在C盘时)中存在已发布地图文件的config配置文件。如地图名为argc,文件名相应为argc.MapServer.ctg,在此文件中修改<MaxRecordCount></MaxRecordCount>节点数值后,重新启动ArcGIS Server Object Manager服务后,即可。

    其他可修改节点属性参见:

    http://webhelp.esri.com/arcgisserver/9.3/dotNet/index.htm#cfg_file_service.htm

PS: 后经本人测试,最大可修改为5000,再大就会报错....郁闷

原文地址:https://www.cnblogs.com/matoo/p/2182323.html