当前位置: 首页>>代码示例 >>用法及示例精选 >>正文


JavaScript ArcGIS AttachmentsContent用法及代码示例


基本信息

以下是所在类或对象的基本信息。

AMD: require(["esri/popup/content/AttachmentsContent"], (AttachmentsContent) => { /* code goes here */ });

ESM: import AttachmentsContent from "@arcgis/core/popup/content/AttachmentsContent";

类: esri/popup/content/AttachmentsContent

继承: AttachmentsContent > Content > Accessor

自从:用于 JavaScript 4.11 的 ArcGIS API

用法说明

AttachmentsContent 弹出元素表示与特征关联的附件元素。此资源仅在 FeatureLayer.capabilities.data.supportsAttachmenttrue 时可用。

popuptemplate-attachments-element

例子:

// Create the AttachmentsContent popup element
// If the selected feature has attributes associated with it, they will display within the popup
let attachmentsElement = new AttachmentsContent({
  displayType: "list" // this will show all attachments as a list of linked files
});

// Create the PopupTemplate
let template = new PopupTemplate({
  title: "Beverly Hills trees by block",
  outFields: ["*"],
  content: [attachmentsElement]
});

相关用法


注:本文由纯净天空筛选整理自arcgis.com大神的英文原创作品 AttachmentsContent。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。