iserver检索多个数据集没有反应

0 投票
var queryParam =new Array(), queryBySQLParams, queryBySQLService;

//学校

queryParam[0] = new SuperMap.REST.FilterParameter({

name: "School@Changchun",

fields: ["name", "X", "Y"],

attributeFilter: " name like '%" + startName + "%'"

});

//公园

queryParam[1] = new SuperMap.REST.FilterParameter({

name: "Park@Changchun",

fields: ["name", "X", "Y"],

attributeFilter: " name like '%" + startName + "%'"

});

//公司

queryParam[2] = new SuperMap.REST.FilterParameter({

name: "Company@Changchun",

fields: ["name", "X", "Y"],

attributeFilter: " name like '%" + startName + "%'"

});

//工厂

queryParam[3] = new SuperMap.REST.FilterParameter({

name: "Factory@Changchun",

fields: ["name", "X", "Y"],

attributeFilter: " name like '%" + startName + "%'"

});

//医院

queryParam[4] = new SuperMap.REST.FilterParameter({

name: "Hospital@Changchun",

fields: ["name", "X", "Y"],

attributeFilter: " name like '%" + startName + "%'"

});

queryBySQLParams = new SuperMap.REST.QueryBySQLParameters({

queryParams: [queryParam]

});

queryBySQLService = new SuperMap.REST.QueryBySQLService(url, {

eventListeners: { "processCompleted": processCompletedsql, "processFailed": null }

});

queryBySQLService.processAsync(queryBySQLParams);

这个语法有错吗
3月 19 分类:  92次浏览 | 用户: TheDarkKnight1 (4 分)

1个回答

0 投票
你好

[queryParam] 这个相当于数组里面套了一个数组,只需要输入 queryParams:queryParam  即可
3月 19 用户: 阳俊林 名扬四海 (1,102 分)
...