我在地图上为特定图层集成了一个弹出窗口。有时弹出窗口会显示分页(featureNavigation)多个数据。有时它无法显示数据,或者服务实际返回的数据不匹配。
var popupTrailheads = {
title: "ID: {ID}",
content: this.getcustomcontent.bind(this),
};
// Add layer special layer
this.layer_fifteen = new FeatureLayer({
url: `${this.esriURL}/15`,
visible: true,
outFields: ['*'],
popupTemplate: popupTrailheads,
});
getcustomcontent(feature) {
// The popup content will become here from angular service
return `<div>content</div>`;
}
我有几个选项可以解决这个问题。1)此图层的弹出窗口仅在特定缩放级别启用。否则弹出窗口不会出现。2)地图上的点击应该只触发一个点。(我相信当点击图层时会触发多个点,这就是它显示多个特征细节的原因。)
您能否提出一个想法,如何启用特定缩放级别的弹出窗口,或者在地图上单击仅选择一个功能。
提前致谢。