-
expressionInfos
ExpressionInfo[]
autocast
- 自从:ArcGIS 适用于 JavaScript 4.4 的 API
对象数组或 ExpressionInfo[] 引用 Arcade 表达式,遵循 Arcade Popup Profile 定义的规范。
例子:
// Displays two values returned from Arcade expressions // in a table within the popup when a feature is clicked layer.popupTemplate = { content: [{ type: "fields", // Autocasts as new FieldsContent() // Autocasts as new FieldInfo[] fieldInfos: [{ fieldName: "expression/college" }, { fieldName: "expression/nocollege" }] }], // autocasts to ExpressionInfo class expressionInfos: [{ name: "college", title: "Completed a college degree", expression: "$feature.bachelor + $feature.master + $feature.doctorate" }, { name: "nocollege", title: "Did not complete a college degree", expression: "$feature.elementary + $feature.middle + $feature.highschool + $feature.somecollege" }] };
// Displays a value returned from an Arcade expression within // a simple string defined in the popupTemplate's content layer.popupTemplate = { content: "{expression/per-total}% of people in this boundary have a college education.", expressionInfos: [{ name: "per-total", expression: "Round((($feature.bachelor + $feature.master + $feature.doctorate) / $feature.TOT_POP) * 100, 2)" }] };
基本信息
以下是所在类或对象的基本信息。
AMD:
require(["esri/PopupTemplate"], (PopupTemplate) => { /* code goes here */ });
ESM:
import PopupTemplate from "@arcgis/core/PopupTemplate";
类:
esri/PopupTemplate
继承: PopupTemplate > Accessor
自从:用于 JavaScript 4.0 的 ArcGIS API
用法说明
PopupTemplate.expressionInfos
函数(或属性)的定义如下:
相关用法
- JavaScript ArcGIS PopupTemplate.fieldInfos用法及代码示例
- JavaScript ArcGIS PopupTemplate.returnGeometry用法及代码示例
- JavaScript ArcGIS PopupTemplate.actions用法及代码示例
- JavaScript ArcGIS PopupTemplate.content用法及代码示例
- JavaScript ArcGIS PopupTemplate.title用法及代码示例
- JavaScript ArcGIS PopupTemplate.overwriteActions用法及代码示例
- JavaScript ArcGIS PopupTemplate.outFields用法及代码示例
- JavaScript ArcGIS PopupTemplate用法及代码示例
- JavaScript Popup.autoOpenEnabled用法及代码示例
- JavaScript Popup.location用法及代码示例
- JavaScript Popup.headingLevel用法及代码示例
- JavaScript Popup trigger-action事件用法及代码示例
- JavaScript Popup.features用法及代码示例
- JavaScript Popup.content用法及代码示例
- JavaScript Popup.alignment用法及代码示例
- JavaScript Popup.title用法及代码示例
- JavaScript Popup.classes用法及代码示例
- JavaScript Popup.when用法及代码示例
- JavaScript Popup.visibleElements用法及代码示例
- JavaScript Popup.actions用法及代码示例
- JavaScript Popup.open用法及代码示例
- JavaScript Popup.fetchFeatures用法及代码示例
- JavaScript Popup.dockEnabled用法及代码示例
- JavaScript Popup.on用法及代码示例
- JavaScript Popup.goToOverride用法及代码示例
注:本文由纯净天空筛选整理自arcgis.com大神的英文原创作品 PopupTemplate.expressionInfos。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。