对已发布的数据集,我想按条件查询两个数据集的数据进行展示,下面是我的代码
function mapQueryForRegs() {
var queryParam=[], queryBySQLParams, queryBySQLService;
queryParam[0] = new SuperMap.REST.FilterParameter({
name: "市级区划@tbcs",
attributeFilter: "CODE=620100"
});
queryParam[1] = new SuperMap.REST.FilterParameter({
name: "县级区划@tbcs",
attributeFilter: "PAC=620102"
});
queryBySQLParams = new SuperMap.REST.QueryBySQLParameters({
queryParams: [queryParam]
});
queryBySQLService = new SuperMap.REST.QueryBySQLService($.Map.config.baseLayer, {
eventListeners: {"processCompleted": processCompleted, "processFailed": processFailed}
});
queryBySQLService.processAsync(queryBySQLParams);
}
写完运行就是查询不出来,求助后大神说需要改一个地方,一下是修改内容
queryParams: [queryParam]改为queryParams: queryParam
亲测查询没有。以此记录superMap多数据集查询示例。