iclient 10i for leaflet开发时实现空间查询数据时,第一步的sql查询结果geometry已经有数据。但是第二步几何查询的结果返回值是400,错误内容为"getFeatureByBuffer方法中传入的参数为空"
L.supermap
.featureService(dataurl)
.getFeaturesBySQL(sqlParam, function (serviceResult) {
if(serviceResult.result.features){
var features = serviceResult.result.features.features;
geometry = features[0].geometry;
var geometryParam = new SuperMap.GetFeaturesByGeometryParameters({
datasetNames: [mapName+":"+layerName],
geometry: geometry,
spatialQueryMode: "INTERSECT"
});
L.supermap.featureService(dataurl).getFeaturesByGeometry(geometryParam, function (serviceResult) {
var idResults = [];//(此处返回值报错)
resultLayer = L.geoJSON(serviceResult.result.features, {
onEachFeature: function (feature, layer) {
idResults.push(feature.properties);
}
});
});
}
});
sql查询的结果geometry已经有数据。但是几何查询的结果返回值是400,错误内容为"getFeatureByBuffer方法中传入的参数为空"