當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


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。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。