代码如下:var geometryParam = new SuperMap.REST.GetFeaturesByGeometryParameters({
datasetNames: ['gisln:dltb'],
geometry: polygon,
spatialQueryMode: 'INTERSECT',
fromIndex: 0,
toIndex: 19,
})
var self = this
new FeatureService(
url,
).getFeaturesByGeometry(geometryParam, function (serviceResult) {
console.log(serviceResult.result.features)
var vectorSource = new VectorSource({
features: new GeoJSON().readFeatures(serviceResult.result.features),
wrapX: false,
})
var resultLayer = new VectorLayer({
source: vectorSource,
})
self.map.addLayer(resultLayer)
})
返回的查询结果serviceResult.result.features有20条,如下图,但是为什么只高亮了一条数据呢?