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"];
本文转自stock0991 51CTO博客,原文链接:http://blog.51cto.com/qing0991/1742862
,如需转载请自行联系原作者