代码如下,传值都能成功就是查询一直失败。
buttonSearch.onclick = function doSqlQuery(){
var searchCarid = "SMID == " + document.getElementById("selectbar").value;
var getFeatureParam, getFeatureBySQLService, getFeatureBySQLParams;
getFeatureParam = new SuperMap.REST.FilterParameter({
attributeFilter: searchCarid
});
getFeatureBySQLParams = new SuperMap.REST.GetFeaturesBySQLParameters({
queryParameter: getFeatureParam,
fromIndex : -1,
toIndex : 1000000,
datasetNames: ["车B21@停车场"]
});
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('查询失败!');
}