用demo上的方法进行sql查询总是查询失败。如下
buttonSearch.onclick = function doSqlQuery(){
var searchCarid = document.getElementById("selectbar").value;
var getFeatureParam, getFeatureBySQLService, getFeatureBySQLParams;
getFeatureParam = new SuperMap.REST.FilterParameter({
attributeFilter: searchCarid
});
getFeatureBySQLParams = new SuperMap.REST.GetFeaturesBySQLParameters({
queryParameter: getFeatureParam,
toIndex : -1,
//datasetNames: ["二维数据:" + "Building"]
datasetNames: ["车B21","车B1","车B2"]
});
var url = 'http://192.168.100.95:8090/iserver/services/data-LanDaErYuanTingCheChang22/rest/data';
getFeatureBySQLService = new SuperMap.REST.GetFeaturesBySQLService(url, {
eventListeners: {
"processCompleted": onQueryComplete,
"processFailed": processFailed
}
});
getFeatureBySQLService.processAsync(getFeatureBySQLParams);
}
function processFailed(queryEventArgs){
alert('查询失败!');
}