使用产品:iserver 9D 操作系统:win10
发布了点线面shape数据 想要按照ID查询面数据的name,面数据属性表中有FID和NAME属性
面要素的要素数据集名称:政区_region_Project_Project
query();
function query() {
var idsParam = new SuperMap.GetFeaturesByIDsParameters({
IDs: [1, 2],
datasetNames: "政区_region_Project_Project"
});
L.supermap
.featureService(url)
.getFeaturesByIDs(idsParam, function (serviceResult) {
resultLayer = L.geoJSON(serviceResult.result.features, {
onEachFeature: function (feature, layer) {
layer.bindPopup("ID: " + feature.properties.FID +
"<br>" + resources.text_country + ":" + feature.properties.NAME);
}
}).addTo(map);
});
}
运行没有结果