ArcGIS Server 10.1 SP1连续查询出现Unable to complete operation错误

1、分析原因

This is actually a known issue which is logged as the following bug:

[ NIM086349 - Alternate Query (Get) requests fail in Version 10.1 SP1 ] 


2、解决办法

  加入时间随机数:var random = (new Date()).getTime(),并将该随机数加入到查询中即可。代码如下:

//实例化查询任务类            
var queryTask = new QueryTask(djConfig.xjExtentLayers + "/" + id);
//建立查询过滤器
var query = new Query();
var random = (new Date()).getTime()
query.where = "OBJECTID = " + item.objectid + " And " + random + "=" + random;            
query.outSpatialReference = { "wkid": 4326 };
query.returnGeometry = true;
query.outFields = ["OBJECTID", "NAME"];


本文出自 “IT技术学习与交流” 博客,谢绝转载!

你可能感兴趣的:(Gis,arc)