检查查询参数,查询一般分地图服务和数据服务的查询。 即可查询传的是iClient for JavaScript 的 Geometry 对象,检查参数类型、数值是否正确等。可以贴下相关代码。
1. 画的是什么?不要使用矩形(Rectangle),转成多边形(Polygon)对象
2. 进入成功还是失败函数,返回结果是什么
这个就是绘制对变形结束后调用的函数
进入的是成功的函数
返回的结果是:
是个空值
确认该区域有满足条件的要素? 确认的话,先改成json表述的请求:
queryService = new SuperMap.REST.QueryByGeometryService(url_map, { eventListeners: { "processCompleted": ProcessCompleted, "processFailed": processFailed },isInTheSameDomain:true });
再贴下请求头,请求体,比如: 请求头:
Request URL:
http://support.supermap.com.cn:8090/iserver/services/map-world/rest/maps/World/queryResults.json?returnContent=true
Request Method:
POST
请求体(From Data):
{'queryMode':'SpatialQuery','queryParameters':{'customParams':null,'expectCount':100000,'networkType':"LINE",'queryOption':"ATTRIBUTEANDGEOMETRY",'queryParams':[{'name':"Capitals@World.1",'attributeFilter':null,'joinItems':null,'linkItems':null,'ids':null,'orderBy':null,'groupBy':null,'fields':null}],'startRecord':0,'prjCoordSys':null,'holdTime':10,'returnCustomResult':false},'geometry':{'id':0,'style':null,'parts':[5],'points':[{'id':"SuperMap.Geometry.Point_140",'x':-1.0588235294117,'y':21.882352941176,'type':"NONE",'tag':null,'bounds':null,'SRID':null},{'id':"SuperMap.Geometry.Point_141",'x':118.23529411765,'y':31.411764705882,'type':"NONE",'tag':null,'bounds':null,'SRID':null},{'id':"SuperMap.Geometry.Point_142",'x':90.352941176471,'y':2.8235294117647,'type':"NONE",'tag':null,'bounds':null,'SRID':null},{'id':"SuperMap.Geometry.Point_143",'x':16.588235294118,'y':-3.8823529411765,'type':"NONE",'tag':null,'bounds':null,'SRID':null},{'id':"SuperMap.Geometry.Point_144",'x':-1.0588235294117,'y':21.882352941176,'type':"NONE",'tag':null,'bounds':null,'SRID':null}],'type':"REGION",'prjCoordSys':{'epsgCode':null}},'spatialQueryMode':"INTERSECT"}