首页 / 浏览问题 / 云GIS / 问题详情
iserver检索多个数据集没有反应
4EXP 2019年03月19日
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);

这个语法有错吗

1个回答

你好

[queryParam] 这个相当于数组里面套了一个数组,只需要输入 queryParams:queryParam  即可
3,357EXP 2019年03月19日
...