[{"id":"constants","title":"常量","items":[{"type":"constant","name":"infinity","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/constants/#infinity","description":"表示大于任何其他数字的值。 `-Infinity` 也可以用作小于任何数字的值。","examples":"\n**示例**\n\n计算四个字段值的最大值\n\n```arcade\nvar values = [ $feature.field1, $feature.field2, $feature.field3, $feature.field4 ];\nvar maxValue = -Infinity;\n\nfor(var i in values){\n  maxValue = IIF(values[i] > maxValue, values[i], maxValue);\n}\n\nreturn maxValue;\n```\n\n","completion":{"label":"Infinity","detail":"Infinity","insertText":"Infinity","insertTextMode":2,"insertTextFormat":1,"kind":21,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n表示大于任何其他数字的值。 `-Infinity` 也可以用作小于任何数字的值。"}}},{"type":"constant","name":"pi","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/constants/#pi","description":"圆的周长除以其直径所得出的值大约为 `3.14159`。","examples":"\n**示例**\n\n返回圆要素的面积\n\n```arcade\nvar r = $feature.radius;\nPI * r * r;\n```\n\n","completion":{"label":"PI","detail":"PI","insertText":"PI","insertTextMode":2,"insertTextFormat":1,"kind":21,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n圆的周长除以其直径所得出的值大约为 `3.14159`。"}}},{"type":"constant","name":"textformatting.backwardslash","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/constants/#textformatting.backwardslash","description":"在文本中插入反斜杠字符 `\\`。","examples":"\n**示例**\n\n返回 '\\\\\\serverName\\foo\\bar'\n\n```arcade\nTextFormatting.BackwardSlash + TextFormatting.BackwardSlash + $feature.FILE_PATH\n```\n\n","completion":{"label":"TextFormatting.BackwardSlash","detail":"TextFormatting.BackwardSlash","insertText":"TextFormatting.BackwardSlash","insertTextMode":2,"insertTextFormat":1,"kind":21,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n在文本中插入反斜杠字符 `\\`。"}}},{"type":"constant","name":"textformatting.doublequote","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/constants/#textformatting.doublequote","description":"在文本中插入双引号字符 `\"`。","examples":"\n**示例**\n\n返回 'Nicholas \"Nick\" Anderson’\n\n```arcade\n$feature.NAME + \" \" + TextFormatting.DoubleQuote + $feature.ALIAS + TextFormatting.DoubleQuote + \" \" + $feature.SURNAME\n```\n\n","completion":{"label":"TextFormatting.DoubleQuote","detail":"TextFormatting.DoubleQuote","insertText":"TextFormatting.DoubleQuote","insertTextMode":2,"insertTextFormat":1,"kind":21,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n在文本中插入双引号字符 `\"`。"}}},{"type":"constant","name":"textformatting.forwardslash","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/constants/#textformatting.forwardslash","description":"在文本中插入正斜线字符 `/`。","examples":"\n**示例**\n\n返回 '151/low'\n\n```arcade\n$feature.POP_DENSITY + TextFormatting.ForwardSlash + $feature.CLASS\n```\n\n","completion":{"label":"TextFormatting.ForwardSlash","detail":"TextFormatting.ForwardSlash","insertText":"TextFormatting.ForwardSlash","insertTextMode":2,"insertTextFormat":1,"kind":21,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n在文本中插入正斜线字符 `/`。"}}},{"type":"constant","name":"textformatting.newline","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/constants/#textformatting.newline","description":"在文本中插入新行或换行符。 ArcGIS API 3.x for JavaScript 和 ArcGIS Online Map Viewer Classic **不** 支持多行标注。","examples":"\n**示例**\n\n返回 \"T2N R1W\"\n\n```arcade\n\"T\" + $feature.TOWNSHIP + TextFormatting.NewLine + \"R\" + $feature.RANGE\n```\n\n","completion":{"label":"TextFormatting.NewLine","detail":"TextFormatting.NewLine","insertText":"TextFormatting.NewLine","insertTextMode":2,"insertTextFormat":1,"kind":21,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n在文本中插入新行或换行符。 ArcGIS API 3.x for JavaScript 和 ArcGIS Online Map Viewer Classic **不** 支持多行标注。"}}},{"type":"constant","name":"textformatting.singlequote","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/constants/#textformatting.singlequote","description":"在文本中插入单引号字符 `'`。","examples":"\n**示例**\n\n返回 \"Nicholas 'Nick' Anderson\"\n\n```arcade\n$feature.NAME + \" \" + TextFormatting.SingleQuote + $feature.ALIAS + TextFormatting.SingleQuote + \" \" + $feature.SURNAME\n```\n\n","completion":{"label":"TextFormatting.SingleQuote","detail":"TextFormatting.SingleQuote","insertText":"TextFormatting.SingleQuote","insertTextMode":2,"insertTextFormat":1,"kind":21,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n在文本中插入单引号字符 `'`。"}}}]},{"id":"featureset_functions","title":"FeatureSet 函数","items":[{"type":"function","name":"area","bundle":"data-access","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#area","description":"以给定单位返回输入 FeatureSet 的面积。 这是使用笛卡尔算法的平面测量。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n以平方千米为单位返回图层面积。\n\n```arcade\nArea($layer, 'square-kilometers')\n```\n\n","completion":{"label":"Area","detail":"Area(features, unit?) -> Number","insertText":"Area(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n以给定单位返回输入 FeatureSet 的面积。 这是使用笛卡尔算法的平面测量。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 待计算平面面积的 FeatureSet。\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 返回值的测量单位。 这可能是下面可能的值之一，或者是下面附加资源部分中列出的数字代码之一。 对于可视化、标注和弹出窗口文件，默认单位是地图的空间参考。 在其他配置文件中，如字段计算，默认基于数据的空间参考。  \n可能的值：`acres` | `hectares` | `square-centimeters` | `square-decimeters` | `square-feet` | `square-inches` | `square-kilometers` | `square-meters` | `square-miles` | `square-millimeters` | `square-us-feet` | `square-us-miles` | `square-yards`  \n\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**其他资源**\n\n* [AreaGeodetic()](https://developers.arcgis.com/arcade/function-reference/featureset_functions/#areageodetic)\n* [Available numeric codes for unit parameter](https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic7922.html#i-heading-remarks)\n"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"areageodetic","bundle":"data-access","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#areageodetic","description":"以给定单位返回输入 FeatureSet 的测量面积。 这是比 `Area()` 更可靠的面积测量 因为它考虑到了地球的曲率。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n以平方千米为单位返回图层的测量面积。\n\n```arcade\nAreaGeodetic($layer, 'square-kilometers')\n```\n\n","completion":{"label":"AreaGeodetic","detail":"AreaGeodetic(features, unit?, curveType?) -> Number","insertText":"AreaGeodetic(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n以给定单位返回输入 FeatureSet 的测量面积。 这是比 `Area()` 更可靠的面积测量 因为它考虑到了地球的曲率。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 待计算测量面积的 FeatureSet。\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 返回值的测量单位。 这可能是下面可能的值之一，或者是下面附加资源部分中列出的数字代码之一。 对于可视化、标注和弹出窗口文件，默认单位是地图的空间参考。 在其他配置文件中，如字段计算，默认基于数据的空间参考。  \n可能的值：`acres` | `hectares` | `square-centimeters` | `square-decimeters` | `square-feet` | `square-inches` | `square-kilometers` | `square-meters` | `square-miles` | `square-millimeters` | `square-us-feet` | `square-us-miles` | `square-yards`  \n\n- **curveType** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 试__Since 1.31_ The type of curve to use for the geodetic area calculation_____________________________________验. 试_If no value is provided, the default is `Geodesic`____________________________验.  \n试_Possible values___________________验:  \n  试_- `Geodesic` - Defined by the shortest distance between two points on an ellipsoid_____________________________________________验.  \n  试_- `GreatElliptic` - Defined by the intersection of a plane that contains the center of the spheroid and the spheroid surface and passes through two points. This is also known as a great circle when a sphere is used. It is not necessarily the shortest path between two points_____________________________________________________________________________________________________________________________________________验.  \n  试_- `Loxodrome` - Defined by the line of constant bearing, or azimuth, between two points. It represents a rhumb-line path on the earth that crosses each meridian at the same acute angle, thus forming a spiral that converges on the north or south pole. The Mercator projection shows loxodromes as straight lines______________________________________________________________________________________________________________________________________________________________验.  \n  试_- `NormalSection` - Defined by the intersection of a plane that passes through two points on the surface of the spheroid and is perpendicular to the surface at the first point. It is not necessarily the shortest path between two points_________________________________________________________________________________________________________________________验.  \n  试_- `ShapePreserving` - The segment shape is preserved in the projection where it is defined. This is often used in situations where maintaining the visual representation of a feature is crucial, like when working with boundaries or coastlines___________________________________________________________________________________________________________________________验.\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**其他资源**\n\n* [Area()](https://developers.arcgis.com/arcade/function-reference/featureset_functions/#area)\n* [Available numeric codes for unit parameter](https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic7922.html#i-heading-remarks)\n"}},"parametersInfo":{"min":1,"max":3}},{"type":"function","name":"attachments","bundle":"data-access","sinceVersion":"1.6","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#attachments","description":"返回与输入要素相关联的附件列表。 每个结果包含附件的名称、内容类型、ID 和大小(以字节为单位)。 仅适用于从要素服务创建的要素。","examples":"\n**示例**\n\n返回与要素相关联的附件数量\n\n```arcade\n// Returns the number of attachments associated with the feature\nCount(Attachments($feature))\n```\n\n","completion":{"label":"Attachments","detail":"Attachments(inputFeature, options?) -> Array<Attachment>","insertText":"Attachments(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.6](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回与输入要素相关联的附件列表。 每个结果包含附件的名称、内容类型、ID 和大小(以字节为单位)。 仅适用于从要素服务创建的要素。\n\n**参数**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 将从服务中获取与此要素相关联的附件。\n- **options** (_Optional_): [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 请求的设置。 字典属性：\n\n  - **types**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Text](https://developers.arcgis.com/arcade/guide/types/#text)&gt; - 表示要获取的文件类型的文本值数组。  \n试_Possible Values: `bmp`, `ecw`, `emf`, `eps`, `ps`, `gif`, `img`, `jp2`, `jpc`, `j2k`, `jpf`, `jpg`, `jpeg`, `jpe`, `png`, `psd`, `raw`, `sid`, `tif`____________________________________________________________________________验, 试_`tiff`, `wmf`, `wps`, `avi`, `mpg`, `mpe`, `mpeg`, `mov`, `wmv`, `aif`, `mid`, `rmi`, `mp2`, `mp3`, `mp4`, `pma`, `mpv2`, `qt`, `ra`____________________________________________________________________验, 试_`ram`, `wav`, `wma`, `doc`, `docx`, `dot`, `xls`, `xlsx`, `xlt`, `pdf`, `ppt`, `pptx`, `txt`, `zip`, `7z`, `gz`, `gtar`, `tar`, `tgz`____________________________________________________________________验, 试_`vrml`, `gml`, `json`, `xml`, `mdb`, `geodatabase`__________________________验\n  - **minsize**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 附件的最小文件大小(以字节为单位)。\n  - **maxsize**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 附件的最大文件大小(以字节为单位)。\n  - **metadata** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 指示是否在函数返回中包含附件元数据。 目前仅支持图像的 Exif 元数据。\n\n**返回值**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Attachment](https://developers.arcgis.com/arcade/guide/types/#attachment)&gt;"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"average","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#average","description":"返回 FeatureSet 中给定数值字段的平均值。","examples":"\n**示例**\n\n计算要素人口与图层中所有要素平均人口的差值\n\n```arcade\n$feature.population - Average($layer, 'population')\n```\n\n计算图层中所有要素每平方英里的平均人口\n\n```arcade\nAverage($layer, 'population / area')\n```\n\n","completion":{"label":"Average","detail":"Average(features, fieldNameOrSQLExpression) -> Number","insertText":"Average(${1:features_}, ${2:fieldNameOrSQLExpression_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回 FeatureSet 中给定数值字段的平均值。\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 要对其执行运算的 FeatureSet。\n- **fieldNameOrSQLExpression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 指定将从输入 FeatureSet 计算统计数据的数值字段的名称或 SQL92 表达式。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"contains","bundle":"data-access","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#contains","description":"从输入几何中包含的 FeatureSet 返回要素。\n\n试_**Be aware that using `$feature` as input to this function will yield results only as precise as the view's scale resolution________________________________________________________________验. 试_Therefore values returned from expressions using this function may change after zooming between scales.**______________________________________________________验","examples":"\n**示例**\n\n返回给定面中包含的要素数\n\n```arcade\nvar parcels = FeatureSetByName($map, 'parcels')\nvar projectArea = $feature;\nCount(Contains(projectArea, parcels));\n```\n\n","completion":{"label":"Contains","detail":"Contains(containerGeometry, insideFeatures) -> FeatureSet","insertText":"Contains(${1:containerGeometry_}, ${2:insideFeatures_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n从输入几何中包含的 FeatureSet 返回要素。\n\n试_**Be aware that using `$feature` as input to this function will yield results only as precise as the view's scale resolution________________________________________________________________验. 试_Therefore values returned from expressions using this function may change after zooming between scales.**______________________________________________________验\n\n**参数**\n\n- **containerGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于测试与 `insideFeatures` 的“包含”关系的几何。 把这种几何看作是 `insideFeatures` 的潜在“容器”。\n- **insideFeatures**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 用于测试与 `containerGeometry` 的‘位于’关系的 FeatureSet。\n\n**返回值**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)\n\n**其他资源**\n\n* [Contains](https://esri.github.io/geometry-api-java/doc/Contains.html)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"count","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#count","description":"返回 FeatureSet 中的要素数量。","examples":"\n**示例**\n\n返回图层中的要素数\n\n```arcade\nCount($layer)\n```\n\n","completion":{"label":"Count","detail":"Count(features) -> Number","insertText":"Count(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回 FeatureSet 中的要素数量。\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 从中计算要素数量的 FeatureSet\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"crosses","bundle":"data-access","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#crosses","description":"从与输入几何交叉的 FeatureSet 返回要素。\n\n试__Feature geometries in the visualization and labeling profiles________________________________验 试_are generalized according to the view's scale resolution to improve drawing performance_____________________________________________验. 试_Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts_______________________________________________________验 试_will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry.______________________________________________________________验","examples":"\n**示例**\n\n返回与给定面交叉的 FeatureSet 中的要素数\n\n```arcade\nvar geom2 = Polygon({ ... });\nCount( Crosses($layer, geom2) );\n```\n\n","completion":{"label":"Crosses","detail":"Crosses(features, crossingGeometry) -> FeatureSet","insertText":"Crosses(${1:features_}, ${2:crossingGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n从与输入几何交叉的 FeatureSet 返回要素。\n\n试__Feature geometries in the visualization and labeling profiles________________________________验 试_are generalized according to the view's scale resolution to improve drawing performance_____________________________________________验. 试_Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts_______________________________________________________验 试_will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry.______________________________________________________________验\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 用于测试与输入 `crossingGeometry` 的交叉关系的要素。\n- **crossingGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 被交叉的几何。\n\n**返回值**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)\n\n**其他资源**\n\n* [Crosses](https://esri.github.io/geometry-api-java/doc/Crosses.html)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"distinct","bundle":"data-access","sinceVersion":"1.8","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#distinct","description":"从 FeatureSet 返回一组不同的值或唯一值。","examples":"\n**示例**\n\n返回包含“Status”列的 FeatureSet。 每行 FeatureSet 均包含唯一的统计值\n\n```arcade\nDistinct($layer, 'Status')\n```\n\n返回包含“Status”和“Type”列的 FeatureSet。 每行 FeatureSet 均包含“Status”和“Type”值的唯一组合\n\n```arcade\nDistinct($layer, ['Status', 'Type'])\n```\n\n返回包含 Density 列的 FeatureSet，其中行可能包含值 Low、High 或 N/A\n\n```arcade\nDistinct($layer, {\n  name: \"Density\",\n  expression: \"CASE WHEN PopDensity < 100 THEN 'Low' WHEN PopDensity >= 100 THEN 'High' ELSE 'N/A' END\"\n})\n```\n\n返回包含 Score 和 Type 列的 FeatureSet\n\n```arcade\nDistinct($layer, [{\n  name: 'Score',\n  expression: 'POPULATION_DENSITY * 0.65 + Status_Code * 0.35'\n}, {\n  name: 'Type',\n  expression: 'Category'\n}])\n```\n\n","completion":{"label":"Distinct","detail":"Distinct(features, fields) -> FeatureSet","insertText":"Distinct(${1:features_}, ${2:fields_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.8](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n从 FeatureSet 返回一组不同的值或唯一值。\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 要从中返回不同值的 FeatureSet。\n- **fields**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Text](https://developers.arcgis.com/arcade/guide/types/#text)&gt; \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)&gt; - 用于确定唯一值的字段和/或表达式。 此参数可以是字段名称数组、表达式数组， 也可以是指定将存储唯一值的输出列名称的对象或对象数组。 如果字典已指定，必须使用以下规范：\n\n  - **name**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 存储给定表达式结果的列的名称。\n  - **expression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 用于计算唯一值的 SQL-92 表达式。\n\n**返回值**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"domain","bundle":"data-access","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#domain","description":"返回分配给所提供 `featureSet` 的给定字段的属性域。 如果 `featureSet` 属于子类型类，则将返回分配给该子类型的属性域。","examples":"\n**示例**\n\n分配给要素子类型的属性域。\n\n```arcade\nvar fsPole = FeatureSetByName($layer, \"Pole\", 1);\nvar d = Domain(fsPole, \"poleType\")\n// the poleType field has a coded value domain called poleTypes\n// the value of d will be\n// {\n//   type: \"codedValue\" ,\n//   name: \"poleTypesThreePhase\",\n//   dataType: \"number\",\n//   codedValues: [\n//     { name: \"Unknown\", code: 0 },\n//     { name: \"Wood\", code: 1 },\n//     { name: \"Steel\", code: 2 }\n//     { name: \"Reinforced Steel\", code: 3 }\n//   ]\n// }\n```\n\n","completion":{"label":"Domain","detail":"Domain(features, fieldName, subtype?) -> Dictionary","insertText":"Domain(${1:features_}, ${2:fieldName_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回分配给所提供 `featureSet` 的给定字段的属性域。 如果 `featureSet` 属于子类型类，则将返回分配给该子类型的属性域。\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 具有包含属性域字段的要素的 FeatureSet。\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 包含属性域的字段名称(非字段别名)。\n- **subtype** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 如果要素支持子类型，则为子类型的编码值。\n\n**返回值**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)  \n返回以下属性描述的字典。\n\n- **type**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 属性域类型 - `codedValue` 或 `range`。\n- **name**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 属性域名称。\n- **dataType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 属性域字段的数据类型。 可以是下列值中的一个： “esriFieldTypeSmallInteger”、“esriFieldTypeInteger”、“esriFieldTypeBigInteger”、“esriFieldTypeSingle”、“esriFieldTypeDouble”、 `esriFieldTypeString`, `esriFieldTypeDate`, `esriFieldTypeOID`, `esriFieldTypeGeometry`, `esriFieldTypeBlob`, `esriFieldTypeRaster`, `esriFieldTypeGUID`, `esriFieldTypeGlobalID`, `esriFieldTypeXML`.\n- **min**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 仅适用于 `range` 属性域。 属性域的最小值。\n- **max**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 仅适用于 `range` 属性域。 属性域的最大值。\n- **codedValues**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)&gt; - 仅适用于 `codedValue` 属性域。 用于描述字段有效值的字典数组。 每个字典都有一个 `code` 属性，其中包含实际的字段值， 和一个 `name` 属性，其中包含对值的简明易懂的描述（例如 `{ code: 1, name: \"pavement\" }`）。"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"domaincode","bundle":"data-access","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#domaincode","description":"返回 FeatureSet 中的关联属性域描述的代码。","examples":"\n**示例**\n\n打印所参考的字段的属性域描述。\n\n```arcade\nDomainCode($layer, 'Enabled', 'True', subtype)\n```\n\n","completion":{"label":"DomainCode","detail":"DomainCode(features, fieldName, value, subtype?) -> Number,Text","insertText":"DomainCode(${1:features_}, ${2:fieldName_}, ${3:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回 FeatureSet 中的关联属性域描述的代码。\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 具有包含属性域的字段的要素集。\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 包含属性域的字段名称(非字段别名)。\n- **value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 将要转换回代码的值。 返回的代码来自服务元数据。\n- **subtype** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 如果要素集支持子类型，则为子类型的编码编号或名称。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":3,"max":4}},{"type":"function","name":"domainname","bundle":"data-access","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#domainname","description":"返回 FeatureSet 中属性域代码的描述性名称。","examples":"\n**示例**\n\n输出所参考字段的属性域描述\n\n```arcade\nDomainName($layer, 'fieldName')\n```\n\n","completion":{"label":"DomainName","detail":"DomainName(features, fieldName, code?, subtype?) -> Text","insertText":"DomainName(${1:features_}, ${2:fieldName_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回 FeatureSet 中属性域代码的描述性名称。\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 具有属性域字段的 FeatureSet。\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 包含属性域的字段名称(非字段别名)。\n- **code** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 与所需描述性名称相关联的代码。 返回的代码来自服务元数据。\n- **subtype** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 如果 FeatureSet 支持子类型，则为子类型的编码编号或名称。\n\n**返回值**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"envelopeintersects","bundle":"data-access","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#envelopeintersects","description":"从 FeatureSet 返回要素，其中一组要素的包络(或范围)与另一个几何包络相交。 在下图中，红色突出显示了函数将返回要素的空间关系。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n返回与 geom2 包络相交的要素数\n\n```arcade\nvar geom2 = Polygon({ ... });\nCount( EnvelopeIntersects($layer, geom2) );\n```\n\n","completion":{"label":"EnvelopeIntersects","detail":"EnvelopeIntersects(features, envelope) -> FeatureSet","insertText":"EnvelopeIntersects(${1:features_}, ${2:envelope_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n从 FeatureSet 返回要素，其中一组要素的包络(或范围)与另一个几何包络相交。 在下图中，红色突出显示了函数将返回要素的空间关系。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 测试与输入 `envelope` 的相交关系的 FeatureSet。\n- **envelope**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 被相交的包络。\n\n**返回值**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"expects","bundle":"data-access","sinceVersion":"1.15","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#expects","description":"请求给定 FeatureSet 的其他属性。","examples":"\n**示例**\n\n请求聚类中要素的 POPULATION 字段\n\n```arcade\n// If the layer is clustered based on count,\n// only the OBJECTID field is requested by default.\n// To display the sum of the POPULATION field\n// for all features in the cluster, we must\n// explicitly request the POPULATION data. \nExpects($aggregatedFeatures, 'POPULATION')\nText(Sum($aggregatedFeatures, 'POPULATION'), '#,###')\n```\n\n","completion":{"label":"Expects","detail":"Expects(features, field1, [field2, ..., fieldN]?) -> Null","insertText":"Expects(${1:features_}, ${2:field1_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.15](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n请求给定 FeatureSet 的其他属性。\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 将请求字段附加到的要素集。\n- **field1**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 请求给定要素的字段名称。 仅列出在表达式中使用所需的字段。 如有必要，您可以使用通配符 `*` 来请求所有字段。 但应该避免这种情况，以防止加载可能对应用程序性能产生负面影响的不必要的数据量。 该值必须是文本文字，不能是变量。\n- **[field2, ..., fieldN]** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 为给定要素请求的字段名称的正在使用的列表。 仅列出在表达式中使用所需的字段。 这些值必须是文本文字，不能是变量。\n\n**返回值**: Null"}},"parametersInfo":{"min":2,"max":-1}},[{"type":"function","name":"featureset","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#featureset1","description":"根据 ArcGIS REST 规范从 JSON 创建新的 FeatureSet。 有关示例，请参见以下片段。","examples":"\n**示例**\n\n从 JSON 创建 FeatureSet。\n\n```arcade\n// JSON representation of the feature used in the snippet below\n// {\n//   'fields': [{\n//     'alias': 'RANK',\n//     'name': 'RANK',\n//     'type': 'esriFieldTypeInteger'\n//   }, {\n//     'alias': 'ELEV_m',\n//     'name': 'ELEV_m',\n//     'type': 'esriFieldTypeInteger'\n//   }],\n//   'spatialReference': { 'wkid': 4326 },\n//   'geometryType': 'esriGeometryPoint',\n//   'features': [{\n//     'geometry': {\n//       'spatialReference': { 'wkid': 4326 },\n//       'x': -151.0063,\n//       'y': 63.069\n//     },\n//     'attributes': {\n//       'RANK': 1,\n//       'ELEV_m': 6168\n//     }\n//   }]\n// };\n// The Dictionary representation of the FeatureSet must be a serialized text value\nvar features = FeatureSet('{\"fields\":[{\"alias\":\"RANK\",\"name\":\"RANK\",\"type\":\"esriFieldTypeInteger\"},{\"alias\":\"ELEV_m\",\"name\":\"ELEV_m\",\"type\":\"esriFieldTypeInteger\"}],\"spatialReference\":{\"wkid\":4326},\"geometryType\":\"esriGeometryPoint\",\"features\":[{\"geometry\":{\"spatialReference\":{\"wkid\":4326},\"x\":-151.0063,\"y\":63.069},\"attributes\":{\"RANK\":1,\"ELEV_m\":6168}}]}')\n```\n\n","completion":{"label":"FeatureSet","detail":"FeatureSet(definition) -> FeatureSet","insertText":"FeatureSet(${1:definition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n根据 ArcGIS REST 规范从 JSON 创建新的 FeatureSet。 有关示例，请参见以下片段。\n\n**参数**\n\n- **definition**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - JSON 可以描述一组要素。 JSON 必须序列化为文本值。\n\n**返回值**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"featureset","bundle":"data-access","sinceVersion":"1.19","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#featureset2","description":"根据 ArcGIS REST 规范，从表示 JSON 的 Dictionary 中创建一个新的 FeatureSet。 有关示例，请参见以下片段。","examples":"\n**示例**\n\n从字典创建一个 FeatureSet。\n\n```arcade\n// JSON representation of the feature used in the snippet below\nvar d = {\n  fields: [{\n    alias: 'RANK',\n    name: 'RANK',\n    type: 'esriFieldTypeInteger'\n  }, {\n    alias: 'ELEV_m',\n    name: 'ELEV_m',\n    type: 'esriFieldTypeInteger'\n  }],\n  spatialReference: { wkid: 4326 },\n  geometryType: 'esriGeometryPoint',\n  features: [{\n    geometry: {\n      spatialReference: { wkid: 4326 },\n      x: -151.0063,\n      y: 63.069\n    },\n    attributes: {\n      RANK: 1,\n      ELEV_m: 6168\n    }\n  }]\n };\nvar features = FeatureSet(d)\n```\n\n","completion":{"label":"FeatureSet","detail":"FeatureSet(definition) -> FeatureSet","insertText":"FeatureSet(${1:definition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.19](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n根据 ArcGIS REST 规范，从表示 JSON 的 Dictionary 中创建一个新的 FeatureSet。 有关示例，请参见以下片段。\n\n**参数**\n\n- **definition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 字典描述一组要素。\n\n**返回值**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"featuresetbyassociation","bundle":"data-access","sinceVersion":"1.9","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#featuresetbyassociation","description":"返回与输入要素相关联的所有要素作为 FeatureSet。 这特定于公共设施网络工作流。","examples":"\n**示例**\n\n将返回所有具有变压器低压侧终端连通性关联的资产。\n\n```arcade\nFeatureSetByAssociation($feature, 'connected', 'Low');\n```\n\n返回与要素相关联的电气装置数量\n\n```arcade\nvar allContent = FeatureSetByAssociation ($feature, \"content\");\nvar devicesRows = Filter(allContent, \"className = 'Electric Device'\");\nvar devicesCount = Count(devicesRows);\nreturn devicesCount;\n```\n\n","completion":{"label":"FeatureSetByAssociation","detail":"FeatureSetByAssociation(inputFeature, associationType, terminalName?) -> FeatureSet","insertText":"FeatureSetByAssociation(${1:inputFeature_}, ${2:associationType_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.9](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回与输入要素相关联的所有要素作为 FeatureSet。 这特定于公共设施网络工作流。\n\n**参数**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于查询所有关联要素的要素。 该要素必须来自要素服务；不支持要素集合。\n- **associationType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 与要返回的要素关联的类型。  \n  可能的值： `connected` \\| `container` \\| `content` \\| `structure` \\| `attached`  \n  1.10 版添加的可能值：`junctionEdge` \\| `midspan`\n- **terminalName** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 仅适用于 `connected` 关联类型。\n\n**返回值**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)  \n返回一个 FeatureSet，其中包含具有下表中描述的字段规范的要素。\n\n- **className**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 基于 `TONETWORKSOURCEID` 或 `FROMNETWORKSOURCEID` 值的类名称。\n- **globalId**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 其他表中要素的全局 ID(例如，`TOGLOBALID` 或 `FROMGLOBALID` 的值)。\n- **isContentVisible**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 值可以是`1`(可见)或 `0`(不可见)。 该值表示关联内容的可见性，且仅适用于包含关联。\n- **objectId**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 关联表中该行的 ObjectID。\n- **percentAlong**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 应用于 `midspan` 关联类型。 将返回 0-1 之间的浮点数值，以指示边交汇点的位置。\n- **side**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 应用于 `junctionEdge` 关联类型。 指示交汇点位于哪一侧。\n\n可能的值： `from` 或 `to`"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"featuresetbyid","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#featuresetbyid","description":"根据地图或要素服务中的图层 ID 通过要素图层创建 FeatureSet。 限制请求中的字段数并排除几何可以提高脚本的性能。","examples":"\n**示例**\n\n返回给定地图中 ID 为 DemoLayerWM_1117 的图层中的要素数。\n\n```arcade\nvar features = FeatureSetById($map,'DemoLayerWM_1117', ['*'], true);\nCount( features );\n```\n\n","completion":{"label":"FeatureSetById","detail":"FeatureSetById(featureSetCollection, id, fields?, includeGeometry?) -> FeatureSet","insertText":"FeatureSetById(${1:featureSetCollection_}, ${2:id_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n根据地图或要素服务中的图层 ID 通过要素图层创建 FeatureSet。 限制请求中的字段数并排除几何可以提高脚本的性能。\n\n**参数**\n\n- **featureSetCollection**: [FeatureSetCollection](https://developers.arcgis.com/arcade/guide/types/#featuresetcollection) - 此地图或要素服务包含一个或多个用于创建 FeatureSet 的图层。 通常，此值为 `$map` 或 `$datastore` 全局。\n- **id**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 给定 `map` 中的图层 ID。 该图层必须从要素服务创建；不支持要素集合。 _请注意这个值必须是文字文本。_\n- **fields** (_Optional_): [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Text](https://developers.arcgis.com/arcade/guide/types/#text)&gt; - 要包括在 FeatureSet 中的字段。 默认情况下，包含所有字段。 要请求图层中的所有字段，请将此值设置为 `['*']`。 限制字段数可以提高脚本性能。\n- **includeGeometry** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 指示是否在要素中包括几何。 默认为 true。 由于性能原因，您应该仅在必要时请求几何， 例如用于几何函数。\n\n**返回值**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"featuresetbyname","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#featuresetbyname","description":"根据地图或要素服务中的名称通过要素图层创建 FeatureSet。 请注意，此名称不一定是唯一的。 因此，使用 `FeatureSetById()` 创建 FeatureSet 更合适。 限制 FeatureSet 中的字段数并排除几何可以提高脚本的性能。","examples":"\n**示例**\n\n返回给定地图中标题为“Bike routes”的图层中的要素数。\n\n```arcade\nvar features = FeatureSetByName($map,'Bike routes', ['*'], true);\nCount(features);\n```\n\n","completion":{"label":"FeatureSetByName","detail":"FeatureSetByName(featureSetCollection, title, fields?, includeGeometry?) -> FeatureSet","insertText":"FeatureSetByName(${1:featureSetCollection_}, ${2:title_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n根据地图或要素服务中的名称通过要素图层创建 FeatureSet。 请注意，此名称不一定是唯一的。 因此，使用 `FeatureSetById()` 创建 FeatureSet 更合适。 限制 FeatureSet 中的字段数并排除几何可以提高脚本的性能。\n\n**参数**\n\n- **featureSetCollection**: [FeatureSetCollection](https://developers.arcgis.com/arcade/guide/types/#featuresetcollection) - 此地图或要素服务包含一个或多个用于创建 FeatureSet 的图层。 通常，此值为 `$map` 或 `$datastore` 全局。\n- **title**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 给定 `map` 中的图层标题。 该图层必须从要素服务创建；不支持要素集合。 _请注意这个值必须是文字文本。_\n- **fields** (_Optional_): [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Text](https://developers.arcgis.com/arcade/guide/types/#text)&gt; - 要包括在 FeatureSet 中的字段。 默认情况下，包含所有字段。 要请求图层中的所有字段，请将此值设置为 `['*']`。 限制字段数可以提高脚本性能。\n- **includeGeometry** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 指示是否在要素中包括几何。 默认为 true。 由于性能原因，您应该仅在必要时请求几何， 例如用于几何函数。\n\n**返回值**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"featuresetbyrelationshipclass","bundle":"data-access","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#featuresetbyrelationshipclass","description":"基于给定关系类的名称返回给定要素的相关记录。","examples":"\n**示例**\n\n返回电线杆检查相关记录的计数\n\n```arcade\n// A calculation rule that returns the count of a pole inspection records.\n// When a pole feature is updated the calculation rule reads all its related inspections records from the comments field and returns the total inspection count for that feature.\nvar fsinspected = FeatureSetByRelationshipClass($feature, “pole_inspection”,  [“comments”], false);\nreturn Count(fsinspected);\n```\n\n","completion":{"label":"FeatureSetByRelationshipClass","detail":"FeatureSetByRelationshipClass(inputFeature, relationshipClass, fieldNames?, includeGeometry?) -> FeatureSet","insertText":"FeatureSetByRelationshipClass(${1:inputFeature_}, ${2:relationshipClass_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n基于给定关系类的名称返回给定要素的相关记录。\n\n**参数**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 从中获取相关记录的要素。\n- **relationshipClass**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 数据源中定义的关系类的名称。\n- **fieldNames** (_Optional_): [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Text](https://developers.arcgis.com/arcade/guide/types/#text)&gt; - 要在 FeatureSet 中返回的字段。 此列表包括关系表和输入要素中的字段。\n- **includeGeometry** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 指示是否返回结果要素的几何。\n\n**返回值**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)\n\n**其他资源**\n\n* [Attribute rules and relationship classes](https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/attribute-rules-and-relationship-classes.htm)\n"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"featuresetbyrelationshipname","bundle":"data-access","sinceVersion":"1.8","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#featuresetbyrelationshipname","description":"返回给定要素的相关记录作为 FeatureSet。","examples":"\n**示例**\n\n返回所有相关记录中多个字段的总和\n\n```arcade\nvar results = FeatureSetByRelationshipName($feature, 'Election_Results', ['*'], false)\nSum(results, 'democrat + republican + other')\n```\n\n","completion":{"label":"FeatureSetByRelationshipName","detail":"FeatureSetByRelationshipName(inputFeature, relationshipName, fieldNames?, includeGeometry?) -> FeatureSet","insertText":"FeatureSetByRelationshipName(${1:inputFeature_}, ${2:relationshipName_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.8](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回给定要素的相关记录作为 FeatureSet。\n\n**参数**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 为其获取相关记录的要素。\n- **relationshipName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 符合与给定要素相关联的要素服务的关系名称。\n- **fieldNames** (_Optional_): [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Text](https://developers.arcgis.com/arcade/guide/types/#text)&gt; - 要在 FeatureSet 中返回的字段。 此列表包括关系表和输入要素中的字段。\n- **includeGeometry** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 指示是否返回结果要素的几何。\n\n**返回值**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"filter","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#filter","description":"使用通过 SQL92 表达式过滤器的所有要素创建新 FeatureSet。","examples":"\n**示例**\n\n使用 SQL92 表达式过滤要素\n\n```arcade\n// Returns all features with a Population greater than 10,000\nvar result = Filter($layer, 'POPULATION > 10000');\n```\n\n使用具有变量替换的 SQL92 表达式过滤要素\n\n```arcade\n// Returns all features with a Population greater than the dataset average\nvar averageValue = Average($layer, 'POPULATION')\nvar result = Filter($layer, 'POPULATION > @averageValue');\n```\n\n","completion":{"label":"Filter","detail":"Filter(features, sqlExpression) -> FeatureSet","insertText":"Filter(${1:features_}, ${2:sqlExpression_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n使用通过 SQL92 表达式过滤器的所有要素创建新 FeatureSet。\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 要过滤的 FeatureSet 或图层。\n- **sqlExpression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 用于过滤图层中要素的 SQL92 表达式。 该表达式可以使用 `@` 字符替换 Arcade 变量。 有关示例，请参见以下片段。\n\n**返回值**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"filterbysubtypecode","bundle":"data-access","sinceVersion":"1.25","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#filterbysubtypecode","description":"创建一个新的 FeatureSet，其中包含与给定子类型代码相匹配的所有要素。","examples":"\n**示例**\n\n使用子类型代码过滤要素\n\n```arcade\n// Returns all features that have the given subtype code\nFilterBySubtypeCode($layer, 5)\n```\n\n","completion":{"label":"FilterBySubtypeCode","detail":"FilterBySubtypeCode(features, subtypeCode) -> FeatureSet","insertText":"FilterBySubtypeCode(${1:features_}, ${2:subtypeCode_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.25](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n创建一个新的 FeatureSet，其中包含与给定子类型代码相匹配的所有要素。\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 要过滤的 FeatureSet 或图层。\n- **subtypeCode**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 用于过滤 FeatureSet 或图层中要素的子类型代码。\n\n**返回值**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"first","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#first","description":"返回 FeatureSet 中的第一个要素。 如果 FeatureSet 为空，则将返回 `null`。","examples":"\n**示例**\n\n返回图层中第一个要素的面积。\n\n```arcade\nArea( First($layer) )\n```\n\n","completion":{"label":"First","detail":"First(features) -> Feature","insertText":"First(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回 FeatureSet 中的第一个要素。 如果 FeatureSet 为空，则将返回 `null`。\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 从中返回第一个 FeatureSet 的数组。\n\n**返回值**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"gdbversion","bundle":"data-access","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#gdbversion","description":"返回分支或版本化数据的当前地理数据库版本的名称。 当数据不在多用户地理数据库中时，将返回一个空文本值。","examples":"\n**示例**\n\n返回给定 FeatureSet 的地理数据库版本\n\n```arcade\nGdbVersion($layer)\n```\n\n","completion":{"label":"GdbVersion","detail":"GdbVersion(features) -> Text","insertText":"GdbVersion(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回分支或版本化数据的当前地理数据库版本的名称。 当数据不在多用户地理数据库中时，将返回一个空文本值。\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 从中返回当前地理数据库版本的 FeatureSet。\n\n**返回值**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)\n\n**其他资源**\n\n* [Overview of Versioning](https://pro.arcgis.com/en/pro-app/help/data/geodatabases/overview/overview-of-versioning-in-arcgis-pro.htm)\n"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"getfeatureset","bundle":"data-access","sinceVersion":"1.14","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#getfeatureset","description":"获取输入要素所属的 FeatureSet。 返回的 FeatureSet 表示输入要素的父/根图层或表中的所有要素。","examples":"\n**示例**\n\n返回表示数据源中所有要素的 FeatureSet。\n\n```arcade\n// Assume the data source for the 'Bike routes' layer has 2,000 features \n// and the user creating the map has set a definition expression on the 'Bike routes' layer that filters the layer to 100 features. \nvar fs1 = FeatureSetByName($map, 'Bike routes', ['*'], true);\nvar fs2 = top(fs1, 10) \nvar f = First(fs2)\nGetFeatureSet(f)\n// returns a FeatureSet representing the data source, which does not include the map filter (2,000 features)\n```\n\n返回要素的根 FeatureSet。\n\n```arcade\n// Assume the data source for the 'Bike routes' layer has 2,000 features \n// and the user creating the map has set a definition expression on the 'Bike routes' layer that filters the layer to 100 features. \nvar fs1 = FeatureSetByName($map, 'Bike routes', ['*'], true);\nvar fs2 = top(fs1, 10) \nvar f = First(fs2)\nGetFeatureSet(f, 'root')\n// returns the root FeatureSet, which honors the user's filter from the map (a total of 100 features)\n```\n\n返回要素的父 FeatureSet。\n\n```arcade\n// Assume the data source for the 'Bike routes' layer has 2,000 features \n// and the user creating the map has set a definition expression on the 'Bike routes' layer that filters the layer to 100 features. \nvar fs1 = FeatureSetByName($map, 'Bike routes', ['*'], true);\nvar fs2 = top(fs1, 10) \nvar f = First(fs2)\nGetFeatureSet(f, 'parent')\n// returns the parent FeatureSet, which is the result of the top function \n// (a total of 10 features)\n```\n\n返回数据源表中要素 1 英里范围内的要素数。\n\n```arcade\nvar fullFeatureSet = GetFeatureSet($feature);\nvar featuresOneMile = Intersects(fullFeatureSet, BufferGeodetic($feature, 1, 'miles'))\nCount(featuresOneMile)\n```\n\n","completion":{"label":"GetFeatureSet","detail":"GetFeatureSet(inputFeature, source?) -> FeatureSet","insertText":"GetFeatureSet(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.14](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n获取输入要素所属的 FeatureSet。 返回的 FeatureSet 表示输入要素的父/根图层或表中的所有要素。\n\n**参数**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 属于父或根 FeatureSet 的要素。\n- **source** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 指示要返回的源 FeatureSet。  \n可能的值：\n\n  - `datasource`：(默认值)从输入要素的数据源返回未使用任何过滤器或定义表达式的所有要素，作为 FeatureSet。  \n  - `root`：返回输入要素所属的初始 FeatureSet。 这可能是数据源中所有要素的过滤子集。  \n  - `parent`：返回输入要素的父 FeatureSet。 这可以是比原始数据源或根 FeatureSet 更小的 FeatureSet。  \n\n\n**返回值**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"getfeaturesetinfo","bundle":"data-access","sinceVersion":"1.18","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#getfeaturesetinfo","description":"返回 FeatureSet 的原始源数据库和服务(如果适用)的元数据。","examples":"\n**示例**\n\n从连接到基础要素服务的 FeatureSet 返回的元数据\n\n```arcade\n// $layer originates from a feature service layer in a web map\nGetFeatureSetInfo($layer);\n\n// returns the following: \n{\n  \"layerId\": 7,\n  \"layerName\": \"My Table\",\n  \"itemId\": \"dda795cf2af44d2bb7af2827963b76e8\",\n  \"serviceLayerUrl\": \"https://utilitynetwork.esri.com/server/rest/services/ClassicNapervilleElectric_Postgres/FeatureServer/100\",\n  \"webMapLayerId\": 1,\n  \"webMapLayerTitle\": \"MyTable1\",\n  \"className\": null,\n  \"objectClassId\": null\n}\n```\n\n从源自 filegdb 或 mobilegdb 的 FeatureSet 返回的元数据\n\n```arcade\n// $featureset originates from a feature class in a filegdb or mobilegdb\nGetFeatureSetInfo($featureset);\n\n// returns the following: \n{\n  \"layerId\": null,\n  \"layerName\": null,\n  \"itemId\": null,\n  \"serviceLayerUrl\": null,\n  \"webMapLayerId\": null,\n  \"webMapLayerTitle\": null,\n  \"className\": \"myTable\",\n  \"objectClassId\": 7\n}\n```\n\n从连接到 sde 工作空间的 FeatureSet 返回的元数据(客户端服务器直接连接)\n\n```arcade\n// Client server direct connection (sqlserver/oracle/etc.)\nGetFeatureSetInfo($featureset);\n\n// returns the following: \n{\n  \"layerId\": null,\n  \"layerName\": null,\n  \"itemId\": null,\n  \"serviceLayerUrl\": null,\n  \"webMapLayerId\": null,\n  \"webMapLayerTitle\": null,\n  \"className\": \"owner.myTable\",\n  \"objectClassId\": 7\n}\n```\n\n","completion":{"label":"GetFeatureSetInfo","detail":"GetFeatureSetInfo(inputFeatureSet) -> Dictionary","insertText":"GetFeatureSetInfo(${1:inputFeatureSet_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.18](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回 FeatureSet 的原始源数据库和服务(如果适用)的元数据。\n\n**参数**\n\n- **inputFeatureSet**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 要从中获取元数据的 FeatureSet。\n\n**返回值**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)  \n返回以下属性描述的字典。\n\n- **layerId**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要素服务的 layerId。 仅适用于从要素服务创建的 FeatureSet。 对于 sde/filegdb/mobile 工作空间，此值将为“null”。\n- **layerName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 要素服务的图层名称。 仅适用于从要素服务创建的 FeatureSet。 对于 sde/filegdb/mobile 工作空间，此值将为“null”。\n- **itemId**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 要素服务的门户项目 ID。 仅适用于从具有关联门户项目的要素服务创建的 FeatureSet。 对于 sde/filegdb/mobile 工作空间，此值将为“null”。\n- **serviceLayerUrl**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 要素服务图层的 url。 仅适用于从要素服务创建的 FeatureSet。 对于 sde/filegdb/mobile 工作空间，此值将为“null”。\n- **webMapLayerId**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - web 地图上下文中关联图层的 layerId。 仅适用于从包含在 web 地图中的要素服务图层创建的 FeatureSet。 对于 sde/filegdb/mobile 工作空间，此值将为“null”。\n- **webMapLayerTitle**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - web 地图上下文中关联图层的标题。 仅适用于从包含在 web 地图中的要素服务图层创建的 FeatureSet。 对于 sde/filegdb/mobile 工作空间，此值将为“null”。\n- **className**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 基础要素类的名称。 仅适用于从 filegdb/mobile 工作空间中的要素类创建的 FeatureSet。\n- **objectClassId**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - objectClassId。 仅适用于从 filegdb 工作空间中的要素类创建的 FeatureSet。"}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"getuser","bundle":"data-access","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#getuser1","description":"返回当前工作空间中的用户。 对于来自服务的数据，将返回门户用户或服务器用户。 对于来自数据库连接的数据，将返回数据库用户。 如果没有用户关联到工作空间 (例如文件地理数据库)，则将返回一个 `null` 值。","examples":"\n**示例**\n\n返回有关用户 \"tester\" 的信息。\n\n```arcade\nGetUser($layer, \"tester\")\n// returns {\"id\": \"12\", \"username\": \"tester\", \"name\":\"Testy Tester\", \"email\": \"tester@example.com\", ...}\n```\n\n返回活动门户当前登录用户的用户名。 如果没有用户与门户关联，这将返回 `null`。\n\n```arcade\nvar userInfo = GetUser($layer);\nif(HasValue(userInfo, \"username\")){\n  return userInfo.username;\n}\n```\n\n","completion":{"label":"GetUser","detail":"GetUser(features, username?) -> Dictionary","insertText":"GetUser(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回当前工作空间中的用户。 对于来自服务的数据，将返回门户用户或服务器用户。 对于来自数据库连接的数据，将返回数据库用户。 如果没有用户关联到工作空间 (例如文件地理数据库)，则将返回一个 `null` 值。\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 要从中返回当前用户的 FeatureSet。\n- **username** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 要返回的用户的用户名。 发出请求时，将基于您的权限仅返回有限的信息。\n\n**返回值**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)  \n返回以下属性描述的字典。 在离线工作流程中，只会返回用户名。\n\n- **id**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 返回用户的用户 ID。\n- **username**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 返回用户的用户名。\n- **fullName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 用户姓名。\n- **email**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 与用户帐户相关联的电子邮件地址。\n- **groups**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Text](https://developers.arcgis.com/arcade/guide/types/#text)&gt; - 用户所属的组的数组。\n- **role**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 用户在其组织中的角色(例如 Administrator、Publisher、User、Viewer 或 Custom)。\n- **privileges**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Text](https://developers.arcgis.com/arcade/guide/types/#text)&gt; - 用户在其组织内拥有权限的数组(例如，编辑、查看等)。"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"getuser","bundle":"data-access","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#getuser2","description":"返回当前工作空间中的用户。 对于来自服务的数据，将返回门户用户或服务器用户。 对于来自数据库连接的数据，将返回数据库用户。 如果没有用户关联到工作空间 (例如文件地理数据库)，则将返回一个 `null` 值。","examples":"\n**示例**\n\n基于具有用户扩展模块的图层的工作空间连接返回有关当前登录用户的信息。\n\n```arcade\nGetUser($layer, true)\n```\n\n","completion":{"label":"GetUser","detail":"GetUser(features, extensions?) -> Dictionary","insertText":"GetUser(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回当前工作空间中的用户。 对于来自服务的数据，将返回门户用户或服务器用户。 对于来自数据库连接的数据，将返回数据库用户。 如果没有用户关联到工作空间 (例如文件地理数据库)，则将返回一个 `null` 值。\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 要从中返回当前用户的 FeatureSet。\n- **extensions** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 确定是否在字典中返回 `userLicenseTypeExtensions`。\n\n**返回值**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)  \n返回以下属性描述的字典。 在离线工作流程中，只会返回用户名。\n\n- **id**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 返回用户的用户 ID。\n- **username**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 返回用户的用户名。\n- **fullName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 用户姓名。\n- **email**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 与用户帐户相关联的电子邮件地址。\n- **groups**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Text](https://developers.arcgis.com/arcade/guide/types/#text)&gt; - 用户所属的组的数组。\n- **role**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 用户在其组织中的角色(例如 Administrator、Publisher、User、Viewer 或 Custom)。\n- **privileges**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Text](https://developers.arcgis.com/arcade/guide/types/#text)&gt; - 用户在其组织内拥有权限的数组(例如，编辑、查看等)。\n- **userLicenseTypeExtensions**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Text](https://developers.arcgis.com/arcade/guide/types/#text)&gt; - 与用户帐户关联的许可类型扩展模块的数组(例如 \"Utility Network\"、\"Parcel Fabric\" 等)。 `extensions` 参数必须设置为 `true` 以使其返回。"}},"parametersInfo":{"min":1,"max":2}}],{"type":"function","name":"groupby","bundle":"data-access","sinceVersion":"1.8","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#groupby","description":"对于分组值或唯一值集合，将统计数据返回为 FeatureSet。","examples":"\n**示例**\n\n返回每种树类型的计数\n\n```arcade\nvar treeStats = GroupBy($layer, 'TreeType', { name: 'NumTrees', expression: '1', statistic: 'COUNT' });\n// treeStats contains features with columns TreeType and NumTrees\n// Each unique tree type will have a count\n```\n\n返回每种树类型的计数和平均高度\n\n```arcade\nvar treeStats = GroupBy($layer,\n  [  // fields/expressions to group statistics by\n    { name: 'Type', expression: 'TreeType'},\n    { name: 'Status', expression: 'TreeStatus'}\n  ], \n  [  // statistics to return for each unique category\n    { name: 'Total', expression: '1', statistic: 'COUNT' }, \n    { name: 'AvgHeight', expression: 'Height', statistic: 'AVG' }, \n    { name: 'MaxPercentCoverage', expression: 'CoverageRatio * 100', statistic: 'MAX' }\n  ]\n);\n// treeStats contains features with columns Type, Status, Total, AvgHeight, MaxPercentCoverage\n// Each unique tree type (combination of type and status) will have a count, average height, and maximum value of percent coverage\n```\n\n","completion":{"label":"GroupBy","detail":"GroupBy(features, groupByFields, statistics) -> FeatureSet","insertText":"GroupBy(${1:features_}, ${2:groupByFields_}, ${3:statistics_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.8](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n对于分组值或唯一值集合，将统计数据返回为 FeatureSet。\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 要返回唯一值统计数据的 FeatureSet，将从给定字段和/或表达式返回此唯一值。\n- **groupByFields**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Text](https://developers.arcgis.com/arcade/guide/types/#text)&gt; \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)&gt; - 用于按唯一值对统计数据进行分组的字段和/或表达式。 此参数可以为单个字段名称、字段名称数组或者 指定与输出 FeatureSet 的表达式(通常为字段名称)配对的列名称。 如果指定对象数组，则每个对象必须遵循以下规范：\n\n  - **name**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 存储给定表达式结果的列的名称。\n  - **expression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 用于对统计数据进行分组的 SQL-92 表达式。 通常为字段名称。\n- **statistics**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)&gt; - 要针对每个组计算的汇总统计数据。 此参数可以是字典或字典数组，指定要为每个组返回的输出统计信息。 必须使用以下规范：\n\n  - **name**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 用于存储输出 FeatureSet 中给定统计查询的结果的列名称。\n  - **expression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 用于查询统计数据的 SQL-92 表达式或字段名称。\n  - **statistic**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 查询给定字段或表达式的统计类型。  \n可能的值：SUM \\| COUNT \\| MIN \\| MAX \\| AVG \\| STDEV \\| VAR\n\n**返回值**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"intersects","bundle":"data-access","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#intersects","description":"从与另一个几何相交的 FeatureSet 返回要素。\n\n试__Feature geometries in the visualization and labeling profiles________________________________验 试_are generalized according to the view's scale resolution to improve drawing performance_____________________________________________验. 试_Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts_______________________________________________________验 试_will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry.______________________________________________________________验","examples":"\n**示例**\n\n返回与面相交的要素数\n\n```arcade\nvar geom2 = Polygon({ ... });\nCount( Intersects($layer, geom2) );\n```\n\n","completion":{"label":"Intersects","detail":"Intersects(features, inputGeometry) -> FeatureSet","insertText":"Intersects(${1:features_}, ${2:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n从与另一个几何相交的 FeatureSet 返回要素。\n\n试__Feature geometries in the visualization and labeling profiles________________________________验 试_are generalized according to the view's scale resolution to improve drawing performance_____________________________________________验. 试_Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts_______________________________________________________验 试_will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry.______________________________________________________________验\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 用于测试与 `geometry` 的相交关系的 FeatureSet。\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 被相交的几何。\n\n**返回值**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)\n\n**其他资源**\n\n* [Intersects](https://esri.github.io/geometry-api-java/doc/Intersects.html)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"length","bundle":"data-access","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#length","description":"以给定单位返回输入 FeatureSet 的长度。 这是使用笛卡尔算法的平面测量。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n以米为单位返回图层的平面长度\n\n```arcade\nLength($layer, 'meters')\n```\n\n","completion":{"label":"Length","detail":"Length(features, unit?) -> Number","insertText":"Length(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n以给定单位返回输入 FeatureSet 的长度。 这是使用笛卡尔算法的平面测量。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 待计算平面长度的 FeatureSet。\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 返回值的测量单位。 这可能是下面可能的值之一，或者是下面附加资源部分中列出的数字代码之一。 对于可视化、标注和弹出窗口文件，默认单位是地图的空间参考。 在其他配置文件中，如字段计算，默认基于数据的空间参考。  \n可能的值：`centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**其他资源**\n\n* [LengthGeodetic()](https://developers.arcgis.com/arcade/function-reference/featureset_functions/#lengthgeodetic)\n* [Length3d()](https://developers.arcgis.com/arcade/function-reference/featureset_functions/#length3d)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"length3d","bundle":"data-access","sinceVersion":"1.14","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#length3d","description":"根据高度或 Z 信息，返回输入 FeatureSet 的平面(即笛卡尔)长度。 必须为提供给该函数的几何分配一个投影坐标系。 如果空间参考不提供 Z 单位的值，则返回结果将以米为单位。 请记住，并非所有客户端(例如 ArcGIS API for JavaScript 的 3.x 系列)都支持 即使数据包含 Z 信息，也请求 Z 值。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n以米为单位返回图层要素的 3D 长度\n\n```arcade\nLength3D($layer, 'meters')\n```\n\n","completion":{"label":"Length3D","detail":"Length3D(features, unit?) -> Number","insertText":"Length3D(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.14](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n根据高度或 Z 信息，返回输入 FeatureSet 的平面(即笛卡尔)长度。 必须为提供给该函数的几何分配一个投影坐标系。 如果空间参考不提供 Z 单位的值，则返回结果将以米为单位。 请记住，并非所有客户端(例如 ArcGIS API for JavaScript 的 3.x 系列)都支持 即使数据包含 Z 信息，也请求 Z 值。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 用于计算 3D 空间中平面长度的 FeatureSet。\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 返回值的测量单位。 这可能是下面可能的值之一，或者是下面附加资源部分中列出的数字代码之一。 对于可视化、标注和弹出窗口文件，默认单位是地图的空间参考。 在其他配置文件中，如字段计算，默认基于数据的空间参考。  \n可能的值：`centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**其他资源**\n\n* [LengthGeodetic()](https://developers.arcgis.com/arcade/function-reference/featureset_functions/#lengthgeodetic)\n* [Length()](https://developers.arcgis.com/arcade/function-reference/featureset_functions/#length)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"lengthgeodetic","bundle":"data-access","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#lengthgeodetic","description":"以给定单位返回输入 FeatureSet 的测量长度。 这是比“Length()”更可靠的长度测量 因为它考虑到了地球的曲率。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n以米为单位返回图层的测量长度\n\n```arcade\nLengthGeodetic($layer, 'meters')\n```\n\n","completion":{"label":"LengthGeodetic","detail":"LengthGeodetic(features, unit?, curveType?) -> Number","insertText":"LengthGeodetic(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n以给定单位返回输入 FeatureSet 的测量长度。 这是比“Length()”更可靠的长度测量 因为它考虑到了地球的曲率。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 待计算测量长度的 FeatureSet。\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 返回值的测量单位。 这可能是下面可能的值之一，或者是下面附加资源部分中列出的数字代码之一。 对于可视化、标注和弹出窗口文件，默认单位是地图的空间参考。 在其他配置文件中，如字段计算，默认基于数据的空间参考。  \n可能的值：`centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n- **curveType** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 试__Since 1.31_ The type of curve to use for the geodetic length calculation______________________________________验. 试_If no value is provided, the default is `Geodesic`____________________________验.  \n试_Possible values___________________验:  \n  试_- `Geodesic` - Defined by the shortest distance between two points on an ellipsoid_____________________________________________验.  \n  试_- `GreatElliptic` - Defined by the intersection of a plane that contains the center of the spheroid and the spheroid surface and passes through two points. This is also known as a great circle when a sphere is used. It is not necessarily the shortest path between two points_____________________________________________________________________________________________________________________________________________验.  \n  试_- `Loxodrome` - Defined by the line of constant bearing, or azimuth, between two points. It represents a rhumb-line path on the earth that crosses each meridian at the same acute angle, thus forming a spiral that converges on the north or south pole. The Mercator projection shows loxodromes as straight lines______________________________________________________________________________________________________________________________________________________________验.  \n  试_- `NormalSection` - Defined by the intersection of a plane that passes through two points on the surface of the spheroid and is perpendicular to the surface at the first point. It is not necessarily the shortest path between two points_________________________________________________________________________________________________________________________验.  \n  试_- `ShapePreserving` - The segment shape is preserved in the projection where it is defined. This is often used in situations where maintaining the visual representation of a feature is crucial, like when working with boundaries or coastlines___________________________________________________________________________________________________________________________验.\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**其他资源**\n\n* [Length()](https://developers.arcgis.com/arcade/function-reference/featureset_functions/#length)\n* [Length3d()](https://developers.arcgis.com/arcade/function-reference/featureset_functions/#length3d)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":1,"max":3}},{"type":"function","name":"max","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#max","description":"返回 FeatureSet 中给定数值字段的最大值。","examples":"\n**示例**\n\n打印图层中所有要素的人口字段的最大值\n\n```arcade\nMax($layer, 'population')\n```\n\n计算图层中所有要素每平方英里的最大人口数\n\n```arcade\nMax($layer, 'population / area')\n```\n\n","completion":{"label":"Max","detail":"Max(features, fieldNameOrSQLExpression) -> Number","insertText":"Max(${1:features_}, ${2:fieldNameOrSQLExpression_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回 FeatureSet 中给定数值字段的最大值。\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 要对其执行运算的 FeatureSet。\n- **fieldNameOrSQLExpression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 指定将从输入 FeatureSet 计算统计数据的数值字段的名称或 SQL92 表达式。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"mean","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#mean","description":"返回 FeatureSet 中给定数值字段的平均值。","examples":"\n**示例**\n\n计算要素人口与图层中所有要素平均人口的差值\n\n```arcade\n$feature.population - Mean($layer, 'population')\n```\n\n计算图层中所有要素每平方英里的平均人口数\n\n```arcade\nMean($layer, 'population / area')\n```\n\n","completion":{"label":"Mean","detail":"Mean(features, fieldNameOrSQLExpression) -> Number","insertText":"Mean(${1:features_}, ${2:fieldNameOrSQLExpression_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回 FeatureSet 中给定数值字段的平均值。\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 用于计算平均值的 FeatureSet。\n- **fieldNameOrSQLExpression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 指定将从输入 FeatureSet 计算统计数据的数值字段的名称或 SQL92 表达式。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"min","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#min","description":"返回 FeatureSet 中给定数值字段的最小值。","examples":"\n**示例**\n\n打印图层中所有要素的人口字段的最小值\n\n```arcade\nMin($layer, 'population')\n```\n\n返回图层中所有要素每平方英里的最小人口数\n\n```arcade\nMin($layer, 'population / area')\n```\n\n","completion":{"label":"Min","detail":"Min(features, fieldNameOrSQLExpression) -> Number","insertText":"Min(${1:features_}, ${2:fieldNameOrSQLExpression_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回 FeatureSet 中给定数值字段的最小值。\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 要对其执行运算的 FeatureSet。\n- **fieldNameOrSQLExpression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 指定将从输入 FeatureSet 计算统计数据的数值字段的名称或 SQL92 表达式。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"orderby","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#orderby","description":"使用 SQL92 OrderBy 子句对 FeatureSet 进行排序。","examples":"\n**示例**\n\n按人口对要素进行排序，人口最多的要素排列在第一位\n\n```arcade\nOrderBy($layer, 'POPULATION DESC')\n```\n\n按照等级以升序对要素进行排序\n\n```arcade\nOrderBy($layer, 'Rank ASC')\n```\n\n","completion":{"label":"OrderBy","detail":"OrderBy(features, sqlExpression) -> FeatureSet","insertText":"OrderBy(${1:features_}, ${2:sqlExpression_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n使用 SQL92 OrderBy 子句对 FeatureSet 进行排序。\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 要排序的 FeatureSet 或图层。\n- **sqlExpression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 用于对图层中的要素进行排序的 SQL92 表达式。\n\n**返回值**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"overlaps","bundle":"data-access","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#overlaps","description":"从与另一个几何重叠的 FeatureSet 返回要素。\n\n试__Feature geometries in the visualization and labeling profiles________________________________验 试_are generalized according to the view's scale resolution to improve drawing performance_____________________________________________验. 试_Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts_______________________________________________________验 试_will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry.______________________________________________________________验","examples":"\n**示例**\n\n返回与面重叠的要素数\n\n```arcade\nvar geom2 = Polygon({ ... });\nCount( Overlaps($layer, geom2) );\n```\n\n","completion":{"label":"Overlaps","detail":"Overlaps(overlappingFeatures, inputGeometry) -> FeatureSet","insertText":"Overlaps(${1:overlappingFeatures_}, ${2:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n从与另一个几何重叠的 FeatureSet 返回要素。\n\n试__Feature geometries in the visualization and labeling profiles________________________________验 试_are generalized according to the view's scale resolution to improve drawing performance_____________________________________________验. 试_Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts_______________________________________________________验 试_will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry.______________________________________________________________验\n\n**参数**\n\n- **overlappingFeatures**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 用于测试与 `geometry` 的“重叠”关系的要素。\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于测试与 `overlappingFeatures` 的重叠关系的比较几何。\n\n**返回值**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)\n\n**其他资源**\n\n* [Overlaps](https://esri.github.io/geometry-api-java/doc/Overlaps.html)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"schema","bundle":"data-access","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#schema","description":"返回所提供 `FeatureSet` 的方案描述。","examples":"","completion":{"label":"Schema","detail":"Schema(features) -> Dictionary","insertText":"Schema(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回所提供 `FeatureSet` 的方案描述。\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 具有要返回方案的 FeatureSet。\n\n**返回值**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)  \n返回以下属性描述的字典。\n\n- **objectIdField**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - FeatureSet 的 objectId 字段。\n- **globalIdField**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - FeatureSet 的全局 ID 字段。 如果未启用 globalId，则将返回 `\"\"`。\n- **geometryType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - FeatureSet 中要素的几何类型。 为没有几何的表返回 `esriGeometryNull`。  \n可能的值为：`esriGeometryPoint`、`esriGeometryLine`、`esriGeometryPolygon`、`esriGeometryNull`\n- **fields**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)&gt; - 返回用于描述 FeatureSet 中字段的字典数组。 每个字典描述字段 `name`、`alias`、`type`、`subtype`、`domain`、`length`、 以及它是否为 `editable` 和 `nullable`。"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"stdev","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#stdev","description":"返回 FeatureSet 中给定数值字段的值的标准差。","examples":"\n**示例**\n\n打印 'population' 字段值的标准差\n\n```arcade\nStdev($layer, 'population')\n```\n\n计算图层中所有要素每平方英里的人口标准差\n\n```arcade\nStdev($layer, 'population / area')\n```\n\n","completion":{"label":"Stdev","detail":"Stdev(features, fieldNameOrSQLExpression) -> Number","insertText":"Stdev(${1:features_}, ${2:fieldNameOrSQLExpression_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回 FeatureSet 中给定数值字段的值的标准差。\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 要对其执行运算的 FeatureSet。\n- **fieldNameOrSQLExpression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 指定将从输入 FeatureSet 计算统计数据的数值字段的名称或 SQL92 表达式。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"subtypes","bundle":"data-access","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#subtypes","description":"返回子类型编码值字典。 当未在图层上启用子类型时，将返回 `null`。","examples":"\n**示例**\n\n返回包含 FeatureSet 编码值的子类型。\n\n```arcade\nvar fsTransformer = FeatureSetByName($layer, \"Transformer\")\nSubtypes(fsTransformer)\n// returns the following dictionary\n// {\n//   subtypeField: 'assetGroup',\n//   subtypes: [\n//     { name: \"Unknown\", code: 0 },\n//     { name: \"Single Phase\", code: 1 },\n//     { name: \"Two Phase\", code: 2 }\n//   ]\n// }\n```\n\n","completion":{"label":"Subtypes","detail":"Subtypes(features) -> Dictionary","insertText":"Subtypes(${1:features_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回子类型编码值字典。 当未在图层上启用子类型时，将返回 `null`。\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 用于获取子类型的 FeatureSet。\n\n**返回值**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)  \n返回以下属性描述的字典。\n\n- **subtypeField**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 包含子类型的字段。\n- **subtypes**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)&gt; - 用于描述子类型的字典数组。 每个字典都有一个 `code` 属性，其中包含实际的字段值， 和一个 `name` 属性，其中包含对值的简明易懂的描述（例如 `{ code: 1, name: \"pavement\" }`）。"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"sum","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#sum","description":"返回从 FeatureSet 中的给定数值字段返回的值的总和。","examples":"\n**示例**\n\n计算当前要素人口占图层中所有要素总人口的百分比\n\n```arcade\n( $feature.population / Sum($layer, 'population') ) * 100\n```\n\n计算整个数据集的选举投票总数\n\n```arcade\nSum($layer, 'democrat + republican + other')\n```\n\n","completion":{"label":"Sum","detail":"Sum(features, fieldNameOrSQLExpression) -> Number","insertText":"Sum(${1:features_}, ${2:fieldNameOrSQLExpression_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回从 FeatureSet 中的给定数值字段返回的值的总和。\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 要对其执行运算的 FeatureSet。\n- **fieldNameOrSQLExpression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 指定将从输入 FeatureSet 计算统计数据的数值字段的名称或 SQL92 表达式。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"top","bundle":"data-access","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#top","description":"截断 FeatureSet 并返回第一个给定要素数。","examples":"\n**示例**\n\n返回人口最多的前 5 个要素\n\n```arcade\nTop( OrderBy($layer, 'POPULATION DESC'), 5 )\n```\n\n","completion":{"label":"Top","detail":"Top(features, numItems) -> FeatureSet","insertText":"Top(${1:features_}, ${2:numItems_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n截断 FeatureSet 并返回第一个给定要素数。\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 要截断的 FeatureSet。\n- **numItems**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要从 FeatureSet 开始处返回的要素数量。\n\n**返回值**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"touches","bundle":"data-access","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#touches","description":"从与另一个几何接触的 FeatureSet 返回要素。\n\n试__Feature geometries in the visualization and labeling profiles________________________________验 试_are generalized according to the view's scale resolution to improve drawing performance_____________________________________________验. 试_Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts_______________________________________________________验 试_will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry.______________________________________________________________验","examples":"\n**示例**\n\n返回图层中与几何相接触的要素数。\n\n```arcade\nvar geom = Polygon({ ... });\nCount( Touches($layer, geom) );\n```\n\n","completion":{"label":"Touches","detail":"Touches(touchingFeatures, inputGeometry) -> FeatureSet","insertText":"Touches(${1:touchingFeatures_}, ${2:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n从与另一个几何接触的 FeatureSet 返回要素。\n\n试__Feature geometries in the visualization and labeling profiles________________________________验 试_are generalized according to the view's scale resolution to improve drawing performance_____________________________________________验. 试_Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts_______________________________________________________验 试_will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry.______________________________________________________________验\n\n**参数**\n\n- **touchingFeatures**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 用于和 `geometry` 测试接触关系的要素。\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于测试与 `touchingFeatures` 的“接触”关系的几何。\n\n**返回值**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)\n\n**其他资源**\n\n* [Touches](https://esri.github.io/geometry-api-java/doc/Touches.html)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"variance","bundle":"data-access","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#variance","description":"返回 FeatureSet 中给定数值字段的值的方差。","examples":"\n**示例**\n\n打印给定图层中人口字段的方差\n\n```arcade\nVariance($layer, 'population')\n```\n\n计算图层中所有要素每平方英里的人口方差\n\n```arcade\nVariance($layer, 'population / area')\n```\n\n","completion":{"label":"Variance","detail":"Variance(features, fieldNameOrSQLExpression) -> Number","insertText":"Variance(${1:features_}, ${2:fieldNameOrSQLExpression_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回 FeatureSet 中给定数值字段的值的方差。\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 要对其执行运算的 FeatureSet。\n- **fieldNameOrSQLExpression**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 指定将从输入 FeatureSet 计算统计数据的数值字段的名称或 SQL92 表达式。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"within","bundle":"data-access","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/featureset_functions/#within","description":"从包含 `innerGeometry` 的 FeatureSet 返回要素。\n\n试__Feature geometries in the visualization and labeling profiles________________________________验 试_are generalized according to the view's scale resolution to improve drawing performance_____________________________________________验. 试_Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts_______________________________________________________验 试_will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry.______________________________________________________________验","examples":"\n**示例**\n\n返回图层中位于面内的要素数\n\n```arcade\nvar outerGeom = Polygon({ ... });\nCount( Within(outerGeom, $layer) );\n```\n\n","completion":{"label":"Within","detail":"Within(innerGeometry, outerFeatures) -> FeatureSet","insertText":"Within(${1:innerGeometry_}, ${2:outerFeatures_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n从包含 `innerGeometry` 的 FeatureSet 返回要素。\n\n试__Feature geometries in the visualization and labeling profiles________________________________验 试_are generalized according to the view's scale resolution to improve drawing performance_____________________________________________验. 试_Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts_______________________________________________________验 试_will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry.______________________________________________________________验\n\n**参数**\n\n- **innerGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于测试与 `outerFeatures` 的“位于”关系的基础几何。\n- **outerFeatures**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 用于测试与 `innerGeometry` 的“包含”关系的比较要素。\n\n**返回值**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)\n\n**其他资源**\n\n* [Within](https://esri.github.io/geometry-api-java/doc/Within.html)\n"}},"parametersInfo":{"min":2,"max":2}}]},{"id":"enterprise_functions","title":"企业函数","items":[{"type":"function","name":"nextsequencevalue","bundle":"database","sinceVersion":"1.4","link":"https://developers.arcgis.com/arcade/function-reference/enterprise_functions/#nextsequencevalue","description":"从指定的数据库序列返回下一顺序值。 如果 `inputSequenceName` 不存在，则表达式将出现错误。","examples":"\n**示例**\n\n返回具有下一顺序值的数值\n\n```arcade\nNextSequenceValue('PipeIDSeq')\n```\n\n","completion":{"label":"NextSequenceValue","detail":"NextSequenceValue(sequenceName) -> Number","insertText":"NextSequenceValue(${1:sequenceName_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.4](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n从指定的数据库序列返回下一顺序值。 如果 `inputSequenceName` 不存在，则表达式将出现错误。\n\n**参数**\n\n- **sequenceName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 序列的名称。 必须已在数据库中配置此内容。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}}]},{"id":"voxel_functions","title":"体素函数","items":[{"type":"function","name":"defaultvalue","bundle":"core","sinceVersion":"1.30","link":"https://developers.arcgis.com/arcade/function-reference/voxel_functions/#defaultvalue","description":"如果体素中的字段名不存在或者指定字段的值为“null”或空文本值，则返回指定的默认值。","examples":"\n**示例**\n\n如果体素属性不存在或为空，则返回“n/a”\n\n```arcade\nDefaultValue($voxel, \"sea_temp\", \"n/a\")\n// Returns the sea_temp value if available\n// or n/a if not available\n```\n\n","completion":{"label":"DefaultValue","detail":"DefaultValue(inputVoxel, fieldName, defaultValue) -> Any","insertText":"DefaultValue(${1:inputVoxel_}, ${2:fieldName_}, ${3:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.30](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n如果体素中的字段名不存在或者指定字段的值为“null”或空文本值，则返回指定的默认值。\n\n**参数**\n\n- **inputVoxel**: [Voxel](https://developers.arcgis.com/arcade/guide/types/#voxel) - 要检查的输入体素。\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 要检查的字段名。\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 如果字段名称不存在或者指定字段的值为“null”或空文本值，则返回此值。\n\n**返回值**: [Any](https://developers.arcgis.com/arcade/guide/types/#any)  \n如果已定义，则返回指定字段的值。 否则，返回 `defaultValue` 中指定的值。"}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"haskey","bundle":"core","sinceVersion":"1.30","link":"https://developers.arcgis.com/arcade/function-reference/voxel_functions/#haskey","description":"指示体素是否具有输入键。","examples":"\n**示例**\n\n如果该体素具有名为“sea_temp”的字段，则返回“true”\n\n```arcade\nHasKey($voxel, 'sea_temp');\n```\n\n","completion":{"label":"HasKey","detail":"HasKey(inputVoxel, key) -> Boolean","insertText":"HasKey(${1:inputVoxel_}, ${2:key_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.30](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n指示体素是否具有输入键。\n\n**参数**\n\n- **inputVoxel**: [Voxel](https://developers.arcgis.com/arcade/guide/types/#voxel) - 要检查字段名的体素。\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 要检查的字段名。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"hasvalue","bundle":"core","sinceVersion":"1.30","link":"https://developers.arcgis.com/arcade/function-reference/voxel_functions/#hasvalue","description":"指示体素是否具有给定字段，以及该字段是否有值。","examples":"\n**示例**\n\n如果体素属性不存在或为空，则返回 false\n\n```arcade\niif(HasValue($voxel, \"sea_temp\"), ($voxel.sea_temp - 32) * 5/9, false)\n// Returns the temp in celsius if sea_temp is available\n```\n\n","completion":{"label":"HasValue","detail":"HasValue(inputVoxel, fieldName) -> Boolean","insertText":"HasValue(${1:inputVoxel_}, ${2:fieldName_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.30](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n指示体素是否具有给定字段，以及该字段是否有值。\n\n**参数**\n\n- **inputVoxel**: [Voxel](https://developers.arcgis.com/arcade/guide/types/#voxel) - 要检查的体素。\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 要检查的字段名。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}}]},{"id":"geometry_functions","title":"几何函数","items":[[{"type":"function","name":"angle","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#angle1","description":"返回两点之间的线的算数角度 (0 - 360)。 相对于东方以逆时针方向测量该角度。 例如，90 度角的点位于正北。\n\n测量中仅考虑 x-y 平面。 将忽略所有 z 坐标。 可以使用点要素代替任何或两个点几何。 _如果这些点相同，则将返回 0 度角。_","examples":"\n**示例**\n\n返回从点到要素的角度(以度为单位)\n\n```arcade\nvar pointA = Point({ \"x\":976259, \"y\":8066511, \"spatialReference\": { \"wkid\": 3857 } });\nAngle(pointA, $feature)\n```\n\n","completion":{"label":"Angle","detail":"Angle(pointA, pointB) -> Number","insertText":"Angle(${1:pointA_}, ${2:pointB_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回两点之间的线的算数角度 (0 - 360)。 相对于东方以逆时针方向测量该角度。 例如，90 度角的点位于正北。\n\n测量中仅考虑 x-y 平面。 将忽略所有 z 坐标。 可以使用点要素代替任何或两个点几何。 _如果这些点相同，则将返回 0 度角。_\n\n**参数**\n\n- **pointA**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于计算角度的第一个点或要素。\n- **pointB**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于计算角度的第二个点或要素。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"angle","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#angle2","description":"返回三点之间的线的算数角度 (0 - 360)。 在 `pointB` 周围，按逆时针方向从 `pointA` 到 `pointC` 测量角度。\n\n测量中仅考虑 x-y 平面。 将忽略所有 z 坐标。 可以使用点要素代替任何或所有点几何。 _如果这些点相同，则将返回 0 或 180 度角(取决于内部算术)。_","examples":"\n**示例**\n\n返回要素周围两点之间角度(以度为单位)。\n\n```arcade\nvar pointA = Point({ \"x\":976259, \"y\":8066511, \"spatialReference\": { \"wkid\": 3857 } });\nvar pointC = Point({ \"x\":308654, \"y\":9005421, \"spatialReference\": { \"wkid\": 3857 } });\nAngle(pointA, $feature, pointC)\n```\n\n","completion":{"label":"Angle","detail":"Angle(pointA, pointB, pointC) -> Number","insertText":"Angle(${1:pointA_}, ${2:pointB_}, ${3:pointC_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回三点之间的线的算数角度 (0 - 360)。 在 `pointB` 周围，按逆时针方向从 `pointA` 到 `pointC` 测量角度。\n\n测量中仅考虑 x-y 平面。 将忽略所有 z 坐标。 可以使用点要素代替任何或所有点几何。 _如果这些点相同，则将返回 0 或 180 度角(取决于内部算术)。_\n\n**参数**\n\n- **pointA**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于计算角度的第一个点或要素。\n- **pointB**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于计算角度的第二个点或要素。\n- **pointC**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于计算角度的第三个点或要素。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":3,"max":3}}],{"type":"function","name":"area","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#area","description":"以给定单位返回输入几何或要素的面积。 这是使用笛卡尔算法的平面测量。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n以平方米为单位返回要素面积\n\n```arcade\nArea($feature, 'square-meters')\n```\n\n","completion":{"label":"Area","detail":"Area(polygon, unit?) -> Number","insertText":"Area(${1:polygon_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n以给定单位返回输入几何或要素的面积。 这是使用笛卡尔算法的平面测量。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **polygon**: [Polygon](https://developers.arcgis.com/arcade/guide/types/#polygon) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Point](https://developers.arcgis.com/arcade/guide/types/#point)&gt; - 待计算平面面积的面或 Feature。\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 返回值的测量单位。 试_This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below_______________________________________________________________验. 试_For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference____________________________________________________验. 试_In other profiles, like field calculation, the default is based on the spatial reference of the data_____________________________________________________验.  \n试_Possible values: `acres` | `hectares` | `square-centimeters` | `square-decimeters` | `square-feet` | `square-inches` | `square-kilometers` | `square-meters` | `square-miles`  | `square-millimeters` | `square-us-feet` | `square-us-miles`  | `square-yards`_________________________________________________________________________________________________________________________________验  \n\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**其他资源**\n\n* [AreaGeodetic()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#areageodetic)\n* [Available numeric codes for unit parameter](https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic7922.html#i-heading-remarks)\n"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"areageodetic","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#areageodetic","description":"以给定单位返回输入几何或要素的大地测量面积。 这是比 `Area()` 更可靠的面积测量 因为它考虑到了地球的曲率。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n以平方米为单位返回要素的大地测量面积。\n\n```arcade\nAreaGeodetic($feature, 'square-meters')\n```\n\n","completion":{"label":"AreaGeodetic","detail":"AreaGeodetic(polygon, unit?, curveType?) -> Number","insertText":"AreaGeodetic(${1:polygon_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n以给定单位返回输入几何或要素的大地测量面积。 这是比 `Area()` 更可靠的面积测量 因为它考虑到了地球的曲率。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **polygon**: [Polygon](https://developers.arcgis.com/arcade/guide/types/#polygon) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Point](https://developers.arcgis.com/arcade/guide/types/#point)&gt; - 待计算测量面积的面或 Feature。\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 返回值的测量单位。 试_This may be one of the possible values below, or one of the numeric codes listed in the additional resources section below_______________________________________________________________验. 试_For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference____________________________________________________验. 试_In other profiles, like field calculation, the default is based on the spatial reference of the data_____________________________________________________验.  \n试_Possible values: `acres` | `hectares` | `square-centimeters` | `square-decimeters` | `square-feet` | `square-inches` | `square-kilometers` | `square-meters` | `square-miles`  | `square-millimeters` | `square-us-feet` | `square-us-miles`  | `square-yards`________________________________________________________________________________________________________________________________验\n- **curveType** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 试__Since 1.31_ The type of curve to use for the geodetic area calculation_____________________________________验. 试_If no value is provided, the default is `Geodesic`____________________________验.  \n试_Possible values___________________验:  \n  试_- `Geodesic` - Defined by the shortest distance between two points on an ellipsoid_____________________________________________验.  \n  试_- `GreatElliptic` - Defined by the intersection of a plane that contains the center of the spheroid and the spheroid surface and passes through two points. This is also known as a great circle when a sphere is used. It is not necessarily the shortest path between two points_____________________________________________________________________________________________________________________________________________验.  \n  试_- `Loxodrome` - Defined by the line of constant bearing, or azimuth, between two points. It represents a rhumb-line path on the earth that crosses each meridian at the same acute angle, thus forming a spiral that converges on the north or south pole. The Mercator projection shows loxodromes as straight lines______________________________________________________________________________________________________________________________________________________________验.  \n  试_- `NormalSection` - Defined by the intersection of a plane that passes through two points on the surface of the spheroid and is perpendicular to the surface at the first point. It is not necessarily the shortest path between two points_________________________________________________________________________________________________________________________验.  \n  试_- `ShapePreserving` - The segment shape is preserved in the projection where it is defined. This is often used in situations where maintaining the visual representation of a feature is crucial, like when working with boundaries or coastlines___________________________________________________________________________________________________________________________验.\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**其他资源**\n\n* [Area()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#area)\n* [Available numeric codes for unit parameter](https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic7922.html#i-heading-remarks)\n"}},"parametersInfo":{"min":1,"max":3}},[{"type":"function","name":"bearing","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#bearing1","description":"返回两点之间的线的地理角度(0 - 360)。 相对于北向以顺时针方向测量方位角。 例如，225 度的方位角表示西南方向。\n\n测量中仅考虑 x-y 平面。 将忽略所有 z 坐标。 可以使用点要素代替任何或两个点几何。 _如果这些点相同，则将返回 0。_","examples":"\n**示例**\n\n返回从点到要素的方位角(以度为单位)。\n\n```arcade\nvar pointA = Point({ \"x\":976259, \"y\":8066511, \"spatialReference\": { \"wkid\": 3857 } });\nBearing(pointA,$feature)\n```\n\n","completion":{"label":"Bearing","detail":"Bearing(pointA, pointB) -> Number","insertText":"Bearing(${1:pointA_}, ${2:pointB_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回两点之间的线的地理角度(0 - 360)。 相对于北向以顺时针方向测量方位角。 例如，225 度的方位角表示西南方向。\n\n测量中仅考虑 x-y 平面。 将忽略所有 z 坐标。 可以使用点要素代替任何或两个点几何。 _如果这些点相同，则将返回 0。_\n\n**参数**\n\n- **pointA**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于计算方位角的第一个点。\n- **pointB**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于计算方位角的第二个点。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"bearing","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#bearing2","description":"返回三点之间的线的地理角度(0 - 360)。 在 `pointB` 周围，按顺时针方向从 `pointA` 到 `pointC` 测量方位角。\n\n测量中仅考虑 x-y 平面。 将忽略所有 z 坐标。 可以使用点要素代替任何或所有点几何。 _如果这些点相同，则将返回 0 或 180 度角(取决于内部算术)。_","examples":"\n**示例**\n\n返回要素周围两点之间方位角(以度为单位)。\n\n```arcade\nvar pointA = Point({ \"x\":976259, \"y\":8066511, \"spatialReference\": { \"wkid\": 3857 } });\nvar pointC = Point({ \"x\":308654, \"y\":9005421, \"spatialReference\": { \"wkid\": 3857 } });\nBearing(pointA,$feature,pointC)\n```\n\n","completion":{"label":"Bearing","detail":"Bearing(pointA, pointB, pointC) -> Number","insertText":"Bearing(${1:pointA_}, ${2:pointB_}, ${3:pointC_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回三点之间的线的地理角度(0 - 360)。 在 `pointB` 周围，按顺时针方向从 `pointA` 到 `pointC` 测量方位角。\n\n测量中仅考虑 x-y 平面。 将忽略所有 z 坐标。 可以使用点要素代替任何或所有点几何。 _如果这些点相同，则将返回 0 或 180 度角(取决于内部算术)。_\n\n**参数**\n\n- **pointA**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于计算方位角的第一个点。\n- **pointB**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于计算方位角的第二个点。\n- **pointC**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于计算方位角的第三个点。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":3,"max":3}}],{"type":"function","name":"buffer","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#buffer","description":"返回输入几何周围指定距离的平面(或欧氏)缓冲。 这是使用笛卡尔算法的平面测量。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n返回一个面，表示输入几何周围 1/2 英里的缓冲区\n\n```arcade\nBuffer($feature, 0.5, 'miles')\n```\n\n","completion":{"label":"Buffer","detail":"Buffer(inputGeometry, distance, unit?) -> Polygon","insertText":"Buffer(${1:inputGeometry_}, ${2:distance_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回输入几何周围指定距离的平面(或欧氏)缓冲。 这是使用笛卡尔算法的平面测量。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 要缓冲的几何。\n- **distance**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 对几何进行缓冲的距离。\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 缓冲区“距离”计算单位。 这可能是下面可能的值之一，或者是下面附加资源部分中列出的数字代码之一。 对于可视化、标注和弹出窗口文件，默认单位是地图的空间参考。 在其他配置文件中，如字段计算，默认基于数据的空间参考。  \n可能的值：`centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n\n**返回值**: [Polygon](https://developers.arcgis.com/arcade/guide/types/#polygon)\n\n**其他资源**\n\n* [BufferGeodetic()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#buffergeodetic)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"buffergeodetic","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#buffergeodetic","description":"返回输入几何周围指定距离的大地缓冲。 这是在椭圆体上计算距离的测地线测量。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n返回一个面，表示输入几何周围 1/2 英里的缓冲区\n\n```arcade\nBufferGeodetic($feature, 0.5, 'miles')\n```\n\n","completion":{"label":"BufferGeodetic","detail":"BufferGeodetic(inputGeometry, distance, unit?, curveType?) -> Polygon","insertText":"BufferGeodetic(${1:inputGeometry_}, ${2:distance_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回输入几何周围指定距离的大地缓冲。 这是在椭圆体上计算距离的测地线测量。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 要缓冲的几何。\n- **distance**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 对几何进行缓冲的距离。\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 缓冲区“距离”计算单位。 这可能是下面可能的值之一，或者是下面附加资源部分中列出的数字代码之一。 对于可视化、标注和弹出窗口文件，默认单位是地图的空间参考。 在其他配置文件中，如字段计算，默认基于数据的空间参考。  \n可能的值：`centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n- **curveType** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 试__Since 1.31_ The type of curve to use for the geodetic buffer calculation______________________________________验. 试_If no value is provided, the default is `Geodesic`____________________________验.  \n试_Possible values___________________验:  \n  试_- `Geodesic` - Defined by the shortest distance between two points on an ellipsoid_____________________________________________验.  \n  试_- `GreatElliptic` - Defined by the intersection of a plane that contains the center of the spheroid and the spheroid surface and passes through two points. This is also known as a great circle when a sphere is used. It is not necessarily the shortest path between two points_____________________________________________________________________________________________________________________________________________验.  \n  试_- `Loxodrome` - Defined by the line of constant bearing, or azimuth, between two points. It represents a rhumb-line path on the earth that crosses each meridian at the same acute angle, thus forming a spiral that converges on the north or south pole. The Mercator projection shows loxodromes as straight lines______________________________________________________________________________________________________________________________________________________________验.  \n  试_- `NormalSection` - Defined by the intersection of a plane that passes through two points on the surface of the spheroid and is perpendicular to the surface at the first point. It is not necessarily the shortest path between two points_________________________________________________________________________________________________________________________验.  \n  试_- `ShapePreserving` - The segment shape is preserved in the projection where it is defined. This is often used in situations where maintaining the visual representation of a feature is crucial, like when working with boundaries or coastlines___________________________________________________________________________________________________________________________验.\n\n**返回值**: [Polygon](https://developers.arcgis.com/arcade/guide/types/#polygon)\n\n**其他资源**\n\n* [Buffer()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#buffer)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"centroid","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#centroid","description":"返回输入几何的质心。","examples":"\n**示例**\n\n返回给定面的质心。\n\n```arcade\nCentroid($feature)\n```\n\n返回给定面环的质心\n\n```arcade\nvar ringPoints = Geometry($feature).rings[0];\nCentroid(ringPoints);\n```\n\n返回给定面或折线的质心，并确保其在输入几何内\n\n```arcade\nCentroid($feature, 'labelPoint')\n```\n\n","completion":{"label":"Centroid","detail":"Centroid(polygon, algorithm?) -> Point","insertText":"Centroid(${1:polygon_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回输入几何的质心。\n\n**参数**\n\n- **polygon**: [Polygon](https://developers.arcgis.com/arcade/guide/types/#polygon) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Point](https://developers.arcgis.com/arcade/guide/types/#point)&gt; - 构成面的面或点数组。\n- **algorithm** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - _自 1.29 起_ 确定质心位置的方法。 可能的值：\n\n  - geometric：返回几何的真正质心(默认值)。 对于点数组，几何质心将返回所有点的平均值，而对于面，几何质心代表形状的区域。 对于不规则面，几何质心可能不在面本身内。 对于折线，几何质心可能不在线本身上。\n\n  - labelPoint：对于面，请确保此函数返回的质心在面本身内。 对于折线，请确保质心在线本身上。\n\n**返回值**: [Point](https://developers.arcgis.com/arcade/guide/types/#point)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"clip","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#clip","description":"通过包络矩形计算目标几何的裁剪几何。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n返回裁剪几何的面积\n\n```arcade\nvar envelope = Extent({ ... });\nArea(Clip($feature, envelope), 'square-miles');\n```\n\n","completion":{"label":"Clip","detail":"Clip(inputGeometry, envelope) -> Geometry","insertText":"Clip(${1:inputGeometry_}, ${2:envelope_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n通过包络矩形计算目标几何的裁剪几何。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 要裁剪的几何。\n- **envelope**: [Extent](https://developers.arcgis.com/arcade/guide/types/#extent) - 用于裁剪 `geometry` 的包络矩形。\n\n**返回值**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"contains","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#contains","description":"指示一个几何是否包含另一个几何。\n\n试_**Be aware that using `$feature` as input to this function will yield results only as precise as the view's scale resolution________________________________________________________________验. 试_Therefore values returned from expressions using this function may change after zooming between scales.**______________________________________________________验","examples":"\n**示例**\n\n如果要素包含在给定面内，则返回 true\n\n```arcade\nvar container = Polygon({ ... });\nContains(containerGeometry, $feature);\n```\n\n","completion":{"label":"Contains","detail":"Contains(containerGeometry, insideGeometry) -> Boolean","insertText":"Contains(${1:containerGeometry_}, ${2:insideGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n指示一个几何是否包含另一个几何。\n\n试_**Be aware that using `$feature` as input to this function will yield results only as precise as the view's scale resolution________________________________________________________________验. 试_Therefore values returned from expressions using this function may change after zooming between scales.**______________________________________________________验\n\n**参数**\n\n- **containerGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于测试与 `insideGeometry` 的“包含”关系的几何。 把这种几何看作是 `insideGeometry` 的潜在“容器”。\n- **insideGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于测试与 `containerGeometry` 的‘位于’关系的几何。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**其他资源**\n\n* [Contains](https://esri.github.io/geometry-api-java/doc/Contains.html)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"convertdirection","bundle":"geometry","sinceVersion":"1.13","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#convertdirection","description":"角度可以有多种解释，可以表示为数字、文本或格式良好的数组。 此函数采用一种输入表达并将其转换为另一种。\n\n输入值由指定角度类型的字典描述，并且 方向类型。 如果 angleType 和 directionType 不适用于输入，则转换将失败。\n\n所需的输出值由字典描述，该字典可指定输出类型、 角度类型、方向类型和文本输出的可选格式。\n\n如果输出类型是 value：  \n - 将为角度类型 dms 或方向类型 quadrant 返回一个数组  \n - 对于所有其他情况，将返回一个数字\n\n如果输出类型是 text，则将使用默认填充和分隔符，除非 提供了可选的 format 属性。  \nformat 可以控制输出文本的顺序、间距、填充和分隔符。  \n小数点前的格式说明符字符串表示最小填充(例如 DDD-> 000)。  \n小数点后的格式字符字符串表示精度(例如 D.DD -> 0.00)。\n\n仅支持 format 字符：  \n- D - 度  \n- R - 弧度  \n- G - 百分度  \n- d - DMS 度  \n- m - DMS 分  \n- s - DMS 秒  \n- P - 长子午线(例如 North 与 South)  \n- p - 短子午线(例如 N 与 S)  \n- B - 长方向(例如 East 与 West)  \n- b - 短方向(例如 E 与 W)  \n- [ ] - 转义字符  \n\n\n对于 dms 格式化，如果未使用 s，则 m 将舍入最近的分。 同样，如果未使用 m，则将舍入 d。","examples":"\n**示例**\n\n`outputType` 为 `value` 的示例。\n\n```arcade\nConvertDirection( 30, {directionType:'North', angleType: 'Degrees'}, {directionType:'Quadrant', angleType: 'DMS', outputType: 'value'})\n// returns ['N', 30, 0, 0, 'E']\n \nConvertDirection( 25.99, {directionType:'North', angleType : 'Gradians'}, {directionType:'North', outputType: 'value', angleType : 'Gradians'})\n// returns 25.99\n \nConvertDirection( 1, {directionType:'North', angleType: 'DEGREES'}, {directionType: 'Quadrant', angleType: 'Degrees', outputType: 'value'})\n// returns ['N',1,'E']\n \nConvertDirection( 0.9, {directionType: 'North', angleType: 'degrees'}, {directionType:'North', angleType: 'gradians', outputType: 'value'})\n// returns 1.0 \n \nConvertDirection( 180.0, {directionType:'North', angleType: 'degrees'}, {directionType:'North', angleType: 'radians', outputType : 'value'})\n// returns PI\n```\n\n`outputType` 为 `text` 的示例。\n\n```arcade\nConvertDirection( 25.34, {directionType: 'North', angleType: 'DEGREES'}, {directionType:'North', outputType: 'text', format: 'DDDD.D'})\n// returns '0025.3'\n \nConvertDirection( 25.34, {directionType: 'North', angleType: 'DEGREES'}, {directionType:'North', outputType: 'text', format: 'R'})\n// returns '0'\n \nConvertDirection( 25.34, {directionType: 'North', angleType: 'DEGREES'}, {directionType:'North', outputType: 'text', format: '[DD.DD]'})\n// returns 'DD.DD'\n \nConvertDirection( 25.34, {directionType:'North', angleType: 'DEGREES'}, {directionType:'quadrant', outputType: 'text', format: 'P B'})\n// returns 'North East'\n \nConvertDirection( [001,01,59.99], {directionType:'North', angleType: 'DMS'}, {directionType:'North', angleType: 'DMS', outputType: 'text', format: 'dddA mm[B] ssC'})\n// returns '001A 02B 00C'\n```\n\n","completion":{"label":"ConvertDirection","detail":"ConvertDirection(input, inputSpec, outputSpec) -> Array<Number|Text>,Number,Text","insertText":"ConvertDirection(${1:input_}, ${2:inputSpec_}, ${3:outputSpec_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.13](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n角度可以有多种解释，可以表示为数字、文本或格式良好的数组。 此函数采用一种输入表达并将其转换为另一种。\n\n输入值由指定角度类型的字典描述，并且 方向类型。 如果 angleType 和 directionType 不适用于输入，则转换将失败。\n\n所需的输出值由字典描述，该字典可指定输出类型、 角度类型、方向类型和文本输出的可选格式。\n\n如果输出类型是 value：  \n - 将为角度类型 dms 或方向类型 quadrant 返回一个数组  \n - 对于所有其他情况，将返回一个数字\n\n如果输出类型是 text，则将使用默认填充和分隔符，除非 提供了可选的 format 属性。  \nformat 可以控制输出文本的顺序、间距、填充和分隔符。  \n小数点前的格式说明符字符串表示最小填充(例如 DDD-> 000)。  \n小数点后的格式字符字符串表示精度(例如 D.DD -> 0.00)。\n\n仅支持 format 字符：  \n- D - 度  \n- R - 弧度  \n- G - 百分度  \n- d - DMS 度  \n- m - DMS 分  \n- s - DMS 秒  \n- P - 长子午线(例如 North 与 South)  \n- p - 短子午线(例如 N 与 S)  \n- B - 长方向(例如 East 与 West)  \n- b - 短方向(例如 E 与 W)  \n- [ ] - 转义字符  \n\n\n对于 dms 格式化，如果未使用 s，则 m 将舍入最近的分。 同样，如果未使用 m，则将舍入 d。\n\n**参数**\n\n- **input**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)&gt; \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 方位角的原始制图表达 `input` 类型和 `inputSpec` 值用于决定输入的解析方式。\n- **inputSpec**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 包含有关如何解译输入的信息。\n\n  - **angleType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 描述输入角度单位。 受支持的值：`DEGREES`, `DMS`, `RADIANS`, `GONS`, `GRADIANS`\n  - **directionType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 描述输入方位角的子午线和方向。 受支持的值：`NORTH`, `SOUTH`, `POLAR`, `QUADRANT`\n- **outputSpec**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 包含有关如何格式化输出的信息。\n\n  - **outputType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 控制输出类型。 受支持的值：`value`、`text`\n  - **angleType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 描述输出角度单位。 受支持的值：`DEGREES`, `DMS`, `RADIANS`, `GONS`, `GRADIANS`\n  - **directionType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 描述输出方位角的子午线和方向。 受支持的值：`NORTH`, `SOUTH`, `POLAR`, `QUADRANT`\n  - **format** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 控制文本格式化。 仅当 `outputType` 为 `text` 时才适用。\n\n**返回值**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)&gt; \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"convexhull","bundle":"geometry","sinceVersion":"1.19","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#convexhull","description":"计算几何的凸多边形。 凸包是包围几何的最小凸多边形。 凸包通常是多边形，但在退化情况下也可以是折线或点。\n\n**请注意，如果使用 `$feature` 作为此函数的输入，将只产生与视图的比例分辨率具有同等精度的结果。 因此，使用此函数返回的表达式值可能会在比例缩放后发生更改。**","examples":"\n**示例**\n\n返回当前要素几何的凸多边形几何中的顶点数\n\n```arcade\nCount(ConvexHull(Geometry($feature)).Rings[0])\n```\n\n返回具有凹区域的几何图形的凸多边形(凸多边形将忽略)\n\n```arcade\nvar pacman_like_shape = Polygon({\n       \"rings\": [[[1, 2], [2, 0], [1, -2], [-1, -2], [-2, -1], [-1, -1.5], [0, -1.5], [-2, 1], [-1, 2]]],\n       \"spatialReference\": { \"wkid\": 3857 }\n});\nreturn ConvexHull(pacman_like_shape).rings[0];\n// Returns the geometry [[1,2],[2,0],[1,-2],[-1,-2],[-2,-1],[-2,1],[-1,2],[1,2]]\n```\n\n","completion":{"label":"ConvexHull","detail":"ConvexHull(inputGeometry) -> Geometry","insertText":"ConvexHull(${1:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.19](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n计算几何的凸多边形。 凸包是包围几何的最小凸多边形。 凸包通常是多边形，但在退化情况下也可以是折线或点。\n\n**请注意，如果使用 `$feature` 作为此函数的输入，将只产生与视图的比例分辨率具有同等精度的结果。 因此，使用此函数返回的表达式值可能会在比例缩放后发生更改。**\n\n**参数**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 要分析的点、线或多边形几何。\n\n**返回值**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"crosses","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#crosses","description":"试_Indicates if one geometry crosses another geometry___________________________验.\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n如果要素与指定面交叉，则返回 true\n\n```arcade\nvar geom2 = Polygon({ ... });\nCrosses($feature, geom2);\n```\n\n","completion":{"label":"Crosses","detail":"Crosses(geometry1, geometry2) -> Boolean","insertText":"Crosses(${1:geometry1_}, ${2:geometry2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n试_Indicates if one geometry crosses another geometry___________________________验.\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 交叉的几何。\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 被交叉的几何。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**其他资源**\n\n* [Crosses](https://esri.github.io/geometry-api-java/doc/Crosses.html)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"cut","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#cut","description":"在输入折线或面与剪切折线相交的地方将其分割。 对于折线，所有生成的左切割均被归到第一个几何中。 右切割和重合切割被归到第二个几何中。 每个未定义的切割以及任何未切割的部分将输出为独立折线。\n\n对于面，所有生成的左切割归到第一个面中，所有右切割归到第二个面中， 每个未定义切割以及切割后的剩余部分输出为独立面。 如果没有返回切割，则数组为空。 未定义的切割只有在产生左切割或右切割且切割后有剩余部分的情况下， 或者切割为切割线左侧和右侧的界线时才会产生。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n使用给定折线切割要素的几何\n\n```arcade\nvar cutter = Polyline({ ... });\nCut($feature, cutter));\n```\n\n","completion":{"label":"Cut","detail":"Cut(polylineOrPolygon, cutter) -> Array<Geometry>","insertText":"Cut(${1:polylineOrPolygon_}, ${2:cutter_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n在输入折线或面与剪切折线相交的地方将其分割。 对于折线，所有生成的左切割均被归到第一个几何中。 右切割和重合切割被归到第二个几何中。 每个未定义的切割以及任何未切割的部分将输出为独立折线。\n\n对于面，所有生成的左切割归到第一个面中，所有右切割归到第二个面中， 每个未定义切割以及切割后的剩余部分输出为独立面。 如果没有返回切割，则数组为空。 未定义的切割只有在产生左切割或右切割且切割后有剩余部分的情况下， 或者切割为切割线左侧和右侧的界线时才会产生。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **polylineOrPolygon**: [Polyline](https://developers.arcgis.com/arcade/guide/types/#polyline) \\| [Polygon](https://developers.arcgis.com/arcade/guide/types/#polygon) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 要切割的几何。\n- **cutter**: [Polyline](https://developers.arcgis.com/arcade/guide/types/#polyline) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于切割 `geometry` 的折线。\n\n**返回值**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)&gt;"}},"parametersInfo":{"min":2,"max":2}},[{"type":"function","name":"defaultvalue","bundle":"core","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#defaultvalue1","description":"如果几何中的键不存在，或指定键处的值为 `null` 或空文本值，则返回指定默认值。","examples":"\n**示例**\n\n具有 z 值的点\n\n```arcade\nDefaultValue(Geometry($feature), \"z\", 1000)\n// Geometry($feature).hasZ is true\n// returns the value of Geometry($feature).z\n```\n\n没有 z 值的点\n\n```arcade\nDefaultValue(Geometry($feature), \"z\", 1000)\n// Geometry($feature).hasZ is false\n// returns 1000\n```\n\n","completion":{"label":"DefaultValue","detail":"DefaultValue(inputGeometry, key, defaultValue) -> Any","insertText":"DefaultValue(${1:inputGeometry_}, ${2:key_}, ${3:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n如果几何中的键不存在，或指定键处的值为 `null` 或空文本值，则返回指定默认值。\n\n**参数**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - 要检查的输入几何。\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 要检查的键。\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 如果键不存在，或指定键处的值为 `null` 或空文本值，则返回该值。\n\n**返回值**: [Any](https://developers.arcgis.com/arcade/guide/types/#any)  \n如果已定义，则返回指定键处的值。 否则，返回 `defaultValue` 中指定的值。"}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"defaultvalue","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#defaultvalue2","description":"如果几何嵌套属性中至少一个键不存在，或指定键处的值为 `null` 或空文本值，则返回指定默认值。","examples":"\n**示例**\n\n环、坐标和 x 值均存在且有值\n\n```arcade\n// polygon with one ring\nvar shape = Polygon({\n  rings: [[\n    Point({ x: -97.06138, y: 32.837, z: 100, hasZ: true, spatialReference: { wkid: 102100 } }),\n    Point({ x: -97.06133, y: 32.836, z: 50, hasZ: true, spatialReference: { wkid: 102100 } }),\n    Point({ x: -97.06124, y: 32.834, z: 20, hasZ: true, spatialReference: { wkid: 102100 } }),\n    Point({ x: -97.06127, y: 32.832, z: 0, hasZ: true, spatialReference: { wkid: 102100 } })\n  ]],\n  hasZ: true,\n  spatialReference: { wkid: 102100 }\n});\n\nreturn DefaultValue(shape, [\"rings\",0,0,\"z\"], 1000)\n// returns 100\n```\n\n环不存在\n\n```arcade\n// polygon with one ring\nvar shape = Polygon({\n  rings: [[\n    Point({ x: -97.06138, y: 32.837, z: 100, hasZ: true, spatialReference: { wkid: 102100 } }),\n    Point({ x: -97.06133, y: 32.836, z: 50, hasZ: true, spatialReference: { wkid: 102100 } }),\n    Point({ x: -97.06124, y: 32.834, z: 20, hasZ: true, spatialReference: { wkid: 102100 } }),\n    Point({ x: -97.06127, y: 32.832, z: 0, hasZ: true, spatialReference: { wkid: 102100 } })\n  ]],\n  hasZ: true,\n  spatialReference: { wkid: 102100 }\n});\n\nreturn DefaultValue(shape, [\"rings\",2,0,\"z\"], 1000)\n// returns 1000\n```\n\n环和坐标存在，但 m 值不存在\n\n```arcade\n// polygon with one ring\nvar shape = Polygon({\n  rings: [[\n    Point({ x: -97.06138, y: 32.837, z: 100, hasZ: true, spatialReference: { wkid: 102100 } }),\n    Point({ x: -97.06133, y: 32.836, z: 50, hasZ: true, spatialReference: { wkid: 102100 } }),\n    Point({ x: -97.06124, y: 32.834, z: 20, hasZ: true, spatialReference: { wkid: 102100 } }),\n    Point({ x: -97.06127, y: 32.832, z: 0, hasZ: true, spatialReference: { wkid: 102100 } })\n  ]],\n  hasZ: true,\n  spatialReference: { wkid: 102100 }\n});\n\nreturn DefaultValue(shape, [\"rings\",0,0,\"m\"], 100)\n// returns 100\n```\n\n","completion":{"label":"DefaultValue","detail":"DefaultValue(inputGeometry, keys, defaultValue) -> Any","insertText":"DefaultValue(${1:inputGeometry_}, ${2:keys_}, ${3:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n如果几何嵌套属性中至少一个键不存在，或指定键处的值为 `null` 或空文本值，则返回指定默认值。\n\n**参数**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - 要检查的输入几何。\n- **keys**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)&gt; - 要在容器结构的每个层级中检查的键或索引数组。\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 如果至少一个键或索引不存在，或指定键处的值为 `null` 或空文本值，则返回该值。\n\n**返回值**: [Any](https://developers.arcgis.com/arcade/guide/types/#any)  \n如果已定义，则返回指定键或索引处的值。 否则，返回 `defaultValue` 中指定的值。"}},"parametersInfo":{"min":3,"max":3}}],{"type":"function","name":"densify","bundle":"geometry","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#densify","description":"通过输入折点以创建不长于指定间隔的线段，来增密几何。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n返回最长线段长度为 10 米的已增密几何\n\n```arcade\nvar maxLength = 10;\nDensify($feature, maxLength, 'meters');\n```\n\n","completion":{"label":"Densify","detail":"Densify(inputGeometry, maxSegmentLength, unit?) -> Geometry","insertText":"Densify(${1:inputGeometry_}, ${2:maxSegmentLength_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n通过输入折点以创建不长于指定间隔的线段，来增密几何。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 将增密输入几何。\n- **maxSegmentLength**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 允许的最长线段长度。 必须为正值。\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - maxSegmentLength 测量单位。 默认为输入几何的单位。 这可能是下面可能的值之一，或者是下面附加资源部分中列出的数字代码之一。 对于可视化、标注和弹出窗口文件，默认单位是地图的空间参考。 在其他配置文件中，如字段计算，默认基于数据的空间参考。  \n可能的值：`centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n\n**返回值**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)\n\n**其他资源**\n\n* [DensifyGeodetic()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#densifygeodetic)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"densifygeodetic","bundle":"geometry","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#densifygeodetic","description":"在每个输入几何的折点之间创建测地线，并使用附加折点来增密输出几何，以创建不长于指定间隔的线段。\n\n**请注意，如果使用 `$feature` 作为此函数的输入，将只产生与视图的比例分辨率具有同等精度的结果。 因此，使用此函数返回的表达式值可能会在比例缩放后发生更改。**","examples":"\n**示例**\n\n返回最长线段长度为 10000 的已增密几何\n\n```arcade\nDensifyGeodetic($feature, 10000, 'meters');\n```\n\n","completion":{"label":"DensifyGeodetic","detail":"DensifyGeodetic(inputGeometry, maxSegmentLength, unit?, curveType?) -> Geometry","insertText":"DensifyGeodetic(${1:inputGeometry_}, ${2:maxSegmentLength_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n在每个输入几何的折点之间创建测地线，并使用附加折点来增密输出几何，以创建不长于指定间隔的线段。\n\n**请注意，如果使用 `$feature` 作为此函数的输入，将只产生与视图的比例分辨率具有同等精度的结果。 因此，使用此函数返回的表达式值可能会在比例缩放后发生更改。**\n\n**参数**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 将增密输入几何。\n- **maxSegmentLength**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 允许的最长线段长度。 必须为正值。\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - maxSegmentLength 测量单位。 默认为输入几何的单位。 这可能是下面可能的值之一，或者是下面附加资源部分中列出的数字代码之一。 对于可视化、标注和弹出窗口文件，默认单位是地图的空间参考。 在其他配置文件中，如字段计算，默认基于数据的空间参考。  \n可能的值：`centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n- **curveType** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 试__Since 1.31_ The type of curve to use for the geodetic densify calculation_______________________________________验. 试_If no value is provided, the default is `Geodesic`____________________________验.  \n试_Possible values___________________验:  \n  试_- `Geodesic` - Defined by the shortest distance between two points on an ellipsoid_____________________________________________验.  \n  试_- `GreatElliptic` - Defined by the intersection of a plane that contains the center of the spheroid and the spheroid surface and passes through two points. This is also known as a great circle when a sphere is used. It is not necessarily the shortest path between two points_____________________________________________________________________________________________________________________________________________验.  \n  试_- `Loxodrome` - Defined by the line of constant bearing, or azimuth, between two points. It represents a rhumb-line path on the earth that crosses each meridian at the same acute angle, thus forming a spiral that converges on the north or south pole. The Mercator projection shows loxodromes as straight lines______________________________________________________________________________________________________________________________________________________________验.  \n  试_- `NormalSection` - Defined by the intersection of a plane that passes through two points on the surface of the spheroid and is perpendicular to the surface at the first point. It is not necessarily the shortest path between two points_________________________________________________________________________________________________________________________验.  \n  试_- `ShapePreserving` - The segment shape is preserved in the projection where it is defined. This is often used in situations where maintaining the visual representation of a feature is crucial, like when working with boundaries or coastlines___________________________________________________________________________________________________________________________验.\n\n**返回值**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)\n\n**其他资源**\n\n* [Densify()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#densify)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"difference","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#difference","description":"为两个几何执行拓扑差异运算。 生成的几何来自于 `inputGeometry`，而非 `subtractor`。 `subtractor` 的维度必须大于等于 `inputGeometry` 的维度。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n从要素中减去给定面的面积。\n\n```arcade\nvar subtractor = Polygon({ ... });\nDifference($feature, subtractor);\n```\n\n","completion":{"label":"Difference","detail":"Difference(inputGeometry, subtractor) -> Geometry","insertText":"Difference(${1:inputGeometry_}, ${2:subtractor_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n为两个几何执行拓扑差异运算。 生成的几何来自于 `inputGeometry`，而非 `subtractor`。 `subtractor` 的维度必须大于等于 `inputGeometry` 的维度。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 被减输入几何。\n- **subtractor**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 从 `geometry` 减去的几何。\n\n**返回值**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"disjoint","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#disjoint","description":"指示一个几何是否与另一个几何分离(不以任何形式相交)。\n\n试__Feature geometries in the visualization and labeling profiles________________________________验 试_are generalized according to the view's scale resolution to improve drawing performance_____________________________________________验. 试_Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts_______________________________________________________验 试_will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry.______________________________________________________________验","examples":"\n**示例**\n\n如果几何不相交，则返回 true\n\n```arcade\nvar geom2 = Polygon({ ... });\nDisjoint($feature, geom2);\n```\n\n","completion":{"label":"Disjoint","detail":"Disjoint(geometry1, geometry2) -> Boolean","insertText":"Disjoint(${1:geometry1_}, ${2:geometry2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n指示一个几何是否与另一个几何分离(不以任何形式相交)。\n\n试__Feature geometries in the visualization and labeling profiles________________________________验 试_are generalized according to the view's scale resolution to improve drawing performance_____________________________________________验. 试_Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts_______________________________________________________验 试_will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry.______________________________________________________________验\n\n**参数**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于测试与 `geometry2` 的 '分离' 关系的基础几何。\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于测试与 `geometry1` 的 '分离' 关系的比较几何。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**其他资源**\n\n* [Disjoint](https://esri.github.io/geometry-api-java/doc/Disjoint.html)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"distance","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#distance","description":"以给定单位返回两个几何间的平面距离。 这是使用笛卡尔算法的平面测量。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n以米为单位返回两个几何间的距离\n\n```arcade\nvar geom2 = Point({ ... });\nDistance($feature, geom2, 'meters')\n```\n\n","completion":{"label":"Distance","detail":"Distance(geometry1, geometry2, unit?) -> Number","insertText":"Distance(${1:geometry1_}, ${2:geometry2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n以给定单位返回两个几何间的平面距离。 这是使用笛卡尔算法的平面测量。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Point](https://developers.arcgis.com/arcade/guide/types/#point)&gt; - 用于测量距离 `geometry2` 的距离的几何。\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Point](https://developers.arcgis.com/arcade/guide/types/#point)&gt; - 用于测量距离 `geometry1` 的距离的几何。\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 返回值的测量单位。 这可能是下面可能的值之一，或者是下面附加资源部分中列出的数字代码之一。 对于可视化、标注和弹出窗口文件，默认单位是地图的空间参考。 在其他配置文件中，如字段计算，默认基于数据的空间参考。  \n可能的值：`centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**其他资源**\n\n* [DistanceGeodetic()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#distancegeodetic)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"distancegeodetic","bundle":"geometry","sinceVersion":"1.8","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#distancegeodetic","description":"计算沿大圆的两点之间的最短距离。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n返回从流图层中的公共汽车到中心站的距离(以千米为单位)\n\n```arcade\nvar unionStation = Point({\"x\": -118.15, \"y\": 33.80, \"spatialReference\": { \"wkid\": 3857 }});\ndistanceGeodetic($feature, unionStation, 'kilometers');\n```\n\n","completion":{"label":"DistanceGeodetic","detail":"DistanceGeodetic(point1, point2, unit?, curveType?) -> Number","insertText":"DistanceGeodetic(${1:point1_}, ${2:point2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.8](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n计算沿大圆的两点之间的最短距离。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **point1**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于测量距离 `point2` 的距离的点。\n- **point2**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于测量距离 `point1` 的距离的点。\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 返回值的测量单位。 这可能是下面可能的值之一，或者是下面附加资源部分中列出的数字代码之一。 对于可视化、标注和弹出窗口文件，默认单位是地图的空间参考。 在其他配置文件中，如字段计算，默认基于数据的空间参考。  \n可能的值：`centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n- **curveType** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 试__Since 1.31_ The type of curve to use for the geodetic distance calculation_______________________________________验. 试_If no value is provided, the default is `Geodesic`____________________________验.  \n试_Possible values___________________验:  \n  试_- `Geodesic` - Defined by the shortest distance between two points on an ellipsoid_____________________________________________验.  \n  试_- `GreatElliptic` - Defined by the intersection of a plane that contains the center of the spheroid and the spheroid surface and passes through two points. This is also known as a great circle when a sphere is used. It is not necessarily the shortest path between two points_____________________________________________________________________________________________________________________________________________验.  \n  试_- `Loxodrome` - Defined by the line of constant bearing, or azimuth, between two points. It represents a rhumb-line path on the earth that crosses each meridian at the same acute angle, thus forming a spiral that converges on the north or south pole. The Mercator projection shows loxodromes as straight lines______________________________________________________________________________________________________________________________________________________________验.  \n  试_- `NormalSection` - Defined by the intersection of a plane that passes through two points on the surface of the spheroid and is perpendicular to the surface at the first point. It is not necessarily the shortest path between two points_________________________________________________________________________________________________________________________验.  \n  试_- `ShapePreserving` - The segment shape is preserved in the projection where it is defined. This is often used in situations where maintaining the visual representation of a feature is crucial, like when working with boundaries or coastlines___________________________________________________________________________________________________________________________验.\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**其他资源**\n\n* [Distance()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#distance)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"distancetocoordinate","bundle":"geometry","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#distancetocoordinate","description":"根据给定距离沿输入线返回一个坐标。 尝试在给定距离内找到坐标时，考虑线的所有部分。 距离不包括线的路径(或部分)之间的间隙。 如果沿输入线未找到距离，则结果将为 `null`。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n根据给定距离值返回输入折线的坐标\n\n```arcade\nvar result = DistanceToCoordinate($feature, 1038);\n\nreturn result.coordinate;\n```\n\n","completion":{"label":"DistanceToCoordinate","detail":"DistanceToCoordinate(inputLine, inputDistance) -> Dictionary","insertText":"DistanceToCoordinate(${1:inputLine_}, ${2:inputDistance_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n根据给定距离沿输入线返回一个坐标。 尝试在给定距离内找到坐标时，考虑线的所有部分。 距离不包括线的路径(或部分)之间的间隙。 如果沿输入线未找到距离，则结果将为 `null`。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **inputLine**: [Polyline](https://developers.arcgis.com/arcade/guide/types/#polyline) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Point](https://developers.arcgis.com/arcade/guide/types/#point)&gt; \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于找到坐标的线或路径。 使用要素作为输入时，要素的几何必须是折线。\n- **inputDistance**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 用于沿 `inputLine` 从线起点找到坐标的距离。 尝试在给定距离内找到坐标时，考虑线的所有部分。 距离不包括线的路径(或部分)之间的间隙。 \n\n**返回值**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)  \n返回具有以下属性的字典。 如果沿输入线未找到距离，则结果将为 `null`。\n\n- **coordinate**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) - 根据给定距离值沿 `inputLine` 的点的坐标。\n- **partId**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 在折线输入的情况下，`coordinate` 所属路径的索引。\n- **segmentId**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - `coordinate` 所属线段的索引(相对于路径)。 如果 `coordinate` 代表输入线的一个折点，则 `segmentId` 将返回前一个折点的索引。 如果 `coordinate` 是 `inputLine` 的第一个折点，则 `segmentId` 的值将为 0。"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"envelopeintersects","bundle":"geometry","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#envelopeintersects","description":"指示一个几何的包络(或范围)是否与其他几何的包络交互。 在下图中，红色高亮部分表示函数将返回 `true` 的场景。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n如果几何相交，则返回 true\n\n```arcade\nvar geom2 = Polygon({ ... });\nEnvelopeIntersects($feature, geom2);\n```\n\n","completion":{"label":"EnvelopeIntersects","detail":"EnvelopeIntersects(geometry1, geometry2) -> Boolean","insertText":"EnvelopeIntersects(${1:geometry1_}, ${2:geometry2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n指示一个几何的包络(或范围)是否与其他几何的包络交互。 在下图中，红色高亮部分表示函数将返回 `true` 的场景。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于测试与另一几何的相交关系的几何。\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 被相交的几何。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"equals","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#equals","description":"指示两个几何在给定空间参考和数据容差的情况下是否相等或在地理上相等。 视作相等的两个输入几何不一定要互为克隆。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何（即 `Geometry($feature)`）作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n如果几何相等，则返回 true\n\n```arcade\nvar geom2 = Point({ ... });\nEquals(Geometry($feature), geom2);\n```\n\n","completion":{"label":"Equals","detail":"Equals(geometry1, geometry2) -> Boolean","insertText":"Equals(${1:geometry1_}, ${2:geometry2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n指示两个几何在给定空间参考和数据容差的情况下是否相等或在地理上相等。 视作相等的两个输入几何不一定要互为克隆。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何（即 `Geometry($feature)`）作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - 第一个输入几何。\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - 第二个输入几何。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**其他资源**\n\n* [Equals](https://esri.github.io/geometry-api-java/doc/Equals.html)\n"}},"parametersInfo":{"min":2,"max":2}},[{"type":"function","name":"extent","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#extent1","description":"从字典构建一个 Extent 对象。","examples":"\n**示例**\n\n创建 Extent 对象\n\n```arcade\nExtent({\n  xMax: -95.34,\n  xMin: -97.06138,\n  yMax: 32.837,\n  yMin: 12.003,\n  hasM: false,\n  hasZ: false,\n  spatialReference: { wkid: 3857 }\n});\n```\n\n","completion":{"label":"Extent","detail":"Extent(geometryDefinition) -> Extent","insertText":"Extent(${1:geometryDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n从字典构建一个 Extent 对象。\n\n**参数**\n\n- **geometryDefinition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 从中构建范围几何对象的属性。\n\n  - **xMax**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 几何的上限或可能的最大 x 坐标。\n  - **xMin**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 几何的下限或可能的最小 x 坐标。\n  - **yMax**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 几何的上限或可能的最大 y 坐标。\n  - **yMin**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 几何的下限或可能的最小 y 坐标。\n  - **mMax**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 几何的上限或最大可能的 m 值。 如果设置此值，则必须将 `hasM` 设置为 `true`。\n  - **mMin**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 几何的下限或可能的最小 m 值。 如果设置此值，则必须将 `hasM` 设置为 `true`。\n  - **zMax**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 几何的上限或最大可能的 z 值。 如果设置此值，则必须将 `hasZ` 设置为 `true`。\n  - **zMin**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 几何的下限或可能的最小 z 值。 如果设置此值，则必须将 `hasZ` 设置为 `true`。\n  - **hasM**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 指示几何是否具有 m 值。\n  - **hasZ**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 指示几何是否具有 z 值。\n  - **spatialReference**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 几何的空间参考。\n\n    - **wkid**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 地理或投影坐标系的 Well-known ID，用于定义绘制几何的参考。\n\n**返回值**: [Extent](https://developers.arcgis.com/arcade/guide/types/#extent)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"extent","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#extent2","description":"返回输入要素、面、点、折线或多点的范围。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n返回要素的范围\n\n```arcade\nExtent($feature);\n```\n\n","completion":{"label":"Extent","detail":"Extent(inputGeometry) -> Extent","insertText":"Extent(${1:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回输入要素、面、点、折线或多点的范围。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 要从中获取范围的要素或几何。\n\n**返回值**: [Extent](https://developers.arcgis.com/arcade/guide/types/#extent)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"extent","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#extent3","description":"从序列化的 JSON 文本构建一个 Extent 对象。 JSON 方案必须遵循 Envelope 对象的 ArcGIS REST API JSON 规范。","examples":"\n**示例**\n\n从 JSON 创建一个 Extent 对象\n\n```arcade\nvar extentJSON = '{\"xmin\": -109.55, \"ymin\": 25.76, \"xmax\": -86.39, \"ymax\": 49.94, \"spatialReference\": { \"wkid\": 3857 }}';\nExtent(extentJSON);\n```\n\n","completion":{"label":"Extent","detail":"Extent(jsonDefinition) -> Extent","insertText":"Extent(${1:jsonDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n从序列化的 JSON 文本构建一个 Extent 对象。 JSON 方案必须遵循 Envelope 对象的 ArcGIS REST API JSON 规范。\n\n**参数**\n\n- **jsonDefinition**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 从中构造 Extent 对象的 JSON 文本。\n\n**返回值**: [Extent](https://developers.arcgis.com/arcade/guide/types/#extent)\n\n**其他资源**\n\n* [ArcGIS REST API JSON specification for Envelope objects](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm#ENVELOPE)\n"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"generalize","bundle":"geometry","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#generalize","description":"基于给定偏差值，减少输入几何的折点数量。 点几何和多点几何将保持不变。 包络将转换为面，然后进行概化。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n返回输入几何的概化版本。\n\n```arcade\n// Removes vertices so segments are no more than 100 meters from the original geometry\nGeneralize($feature, 100, true, 'meters')\n```\n\n","completion":{"label":"Generalize","detail":"Generalize(inputGeometry, maxDeviation, removeDegenerateParts?, maxDeviationUnit?) -> Geometry","insertText":"Generalize(${1:inputGeometry_}, ${2:maxDeviation_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n基于给定偏差值，减少输入几何的折点数量。 点几何和多点几何将保持不变。 包络将转换为面，然后进行概化。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 将概化输入几何。\n- **maxDeviation**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 允许的概化几何与原始几何的最大偏差。\n- **removeDegenerateParts** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 当设置为 `true` 时，几何的退化部分将从输出中移除(绘制中不需要)。\n- **maxDeviationUnit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - maxDeviation 测量单位。 默认为输入几何的单位。  \n可能的值：`centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n\n**返回值**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"geometry","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#geometry","description":"从序列化的 JSON 文本或字典构建一个几何对象。 JSON 方案必须遵循 Geometry 对象的 ArcGIS REST API JSON 规范。 该函数还可以返回输入要素的几何。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n返回要素几何\n\n```arcade\nGeometry($feature)\n```\n\n构建点几何。 可以使用任何几何类型完成。\n\n```arcade\nvar pointJSON = {\"x\": -118.15, \"y\": 33.80, \"spatialReference\": { \"wkid\": 3857 } };\nGeometry(pointJSON);\n```\n\n","completion":{"label":"Geometry","detail":"Geometry(inputFeature) -> Geometry","insertText":"Geometry(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n从序列化的 JSON 文本或字典构建一个几何对象。 JSON 方案必须遵循 Geometry 对象的 ArcGIS REST API JSON 规范。 该函数还可以返回输入要素的几何。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) \\| [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 用于构建几何对象的要素或 JSON。 从 1.25 版本开始，在 ArcGIS Pro 和 ArcGIS Maps SDKs for Native Apps 中执行时，输入 JSON 文本以及面或折线的词典定义可能包含曲线对象。\n\n**返回值**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)\n\n**其他资源**\n\n* [ArcGIS REST API JSON specification for Geometry objects](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm)\n"}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"hasvalue","bundle":"core","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#hasvalue1","description":"指示几何在给定键或索引处是否有值。","examples":"\n**示例**\n\n具有 z 值的点\n\n```arcade\nif( TypeOf(Geometry($feature)) == \"Point\"){\n  return HasValue(Geometry($feature), \"z\")\n  // returns true\n}\n```\n\n键不存在的面\n\n```arcade\nif( TypeOf(Geometry($feature)) == \"Polygon\"){\n  return HasValue(Geometry($feature), \"verticalCoordinateSystem\")\n  // returns false\n}\n```\n\n","completion":{"label":"HasValue","detail":"HasValue(inputGeometry, key) -> Boolean","insertText":"HasValue(${1:inputGeometry_}, ${2:key_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n指示几何在给定键或索引处是否有值。\n\n**参数**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - 要检查的几何。\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 要检查的键或属性名称。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"hasvalue","bundle":"core","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#hasvalue2","description":"检查几何中嵌套多个层级的属性或索引是否存在值。 这允许您一步深入到嵌套结构中，而不是检查每个层级中的值。 如果结构的每个层级中均存在键和索引且包含非空值，则返回 `true`。","examples":"\n**示例**\n\n环、坐标和 x 值均存在且有值\n\n```arcade\n// polygon with one ring\nvar shape = Polygon({\n  rings: [[\n    Point({ x: -97.06138, y: 32.837, z: 100, hasZ: true, spatialReference: { wkid: 102100 } }),\n    Point({ x: -97.06133, y: 32.836, z: 50, hasZ: true, spatialReference: { wkid: 102100 } }),\n    Point({ x: -97.06124, y: 32.834, z: 20, hasZ: true, spatialReference: { wkid: 102100 } }),\n    Point({ x: -97.06127, y: 32.832, z: 0, hasZ: true, spatialReference: { wkid: 102100 } })\n  ]],\n  hasZ: true,\n  spatialReference: { wkid: 102100 }\n});\n\nif(HasValue(shape, [\"rings\",0,0,\"x\"])){\n  // if() evaluates to true, thus executing the return\n  return shape.rings[0][0].x;\n  // returns -97.06138\n}\n```\n\n环不存在\n\n```arcade\n// polygon with one ring\nvar shape = Polygon({\n  rings: [[\n    Point({ x: -97.06138, y: 32.837, z: 100, hasZ: true, spatialReference: { wkid: 102100 } }),\n    Point({ x: -97.06133, y: 32.836, z: 50, hasZ: true, spatialReference: { wkid: 102100 } }),\n    Point({ x: -97.06124, y: 32.834, z: 20, hasZ: true, spatialReference: { wkid: 102100 } }),\n    Point({ x: -97.06127, y: 32.832, z: 0, hasZ: true, spatialReference: { wkid: 102100 } })\n  ]],\n  hasZ: true,\n  spatialReference: { wkid: 102100 }\n});\n\nif(HasValue(shape, [\"rings\",2,0,\"x\"])){\n  // if() evaluates to false, thus not executing the return\n  return shape.rings[2][0].x;\n  // polygon only has one ring; there is not a third ring\n}\n```\n\n环和坐标存在，但 m 值不存在\n\n```arcade\n// polygon with one ring\nvar shape = Polygon({\n  rings: [[\n    Point({ x: -97.06138, y: 32.837, z: 100, hasZ: true, spatialReference: { wkid: 102100 } }),\n    Point({ x: -97.06133, y: 32.836, z: 50, hasZ: true, spatialReference: { wkid: 102100 } }),\n    Point({ x: -97.06124, y: 32.834, z: 20, hasZ: true, spatialReference: { wkid: 102100 } }),\n    Point({ x: -97.06127, y: 32.832, z: 0, hasZ: true, spatialReference: { wkid: 102100 } })\n  ]],\n  hasZ: true,\n  spatialReference: { wkid: 102100 }\n});\n\nif(HasValue(shape, [\"rings\",0,3,\"m\"])){\n  // if() evaluates to false, thus not executing the return\n  return shape.rings[0][3].m;\n  // there is a coordinate at this location, but it does not have an m value\n}\n```\n\n","completion":{"label":"HasValue","detail":"HasValue(inputGeometry, keys) -> Boolean","insertText":"HasValue(${1:inputGeometry_}, ${2:keys_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n检查几何中嵌套多个层级的属性或索引是否存在值。 这允许您一步深入到嵌套结构中，而不是检查每个层级中的值。 如果结构的每个层级中均存在键和索引且包含非空值，则返回 `true`。\n\n**参数**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - 要检查的字典或功能。\n- **keys**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)&gt; - 要在结构的每个层级中检查的键或索引数组。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}}],{"type":"function","name":"intersection","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#intersection","description":"构建两个几何间的集论交点并返回新几何。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n返回两个面的公共面积\n\n```arcade\nvar geom2 = Polygon({ ... });\nArea(Intersection($feature, geom2), 'square-miles');\n```\n\n","completion":{"label":"Intersection","detail":"Intersection(geometry1, geometry2) -> Geometry","insertText":"Intersection(${1:geometry1_}, ${2:geometry2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n构建两个几何间的集论交点并返回新几何。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 与 `geometry2` 相交的几何。\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 与 `geometry1` 相交的几何。\n\n**返回值**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"intersects","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#intersects","description":"指示一个几何是否与另一个几何相交。\n\n试__Feature geometries in the visualization and labeling profiles________________________________验 试_are generalized according to the view's scale resolution to improve drawing performance_____________________________________________验. 试_Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts_______________________________________________________验 试_will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry.______________________________________________________________验","examples":"\n**示例**\n\n如果几何相交，则返回 true\n\n```arcade\nvar geom2 = Polygon({ ... });\nIntersects($feature, geom2);\n```\n\n","completion":{"label":"Intersects","detail":"Intersects(geometry1, geometry2) -> Boolean","insertText":"Intersects(${1:geometry1_}, ${2:geometry2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n指示一个几何是否与另一个几何相交。\n\n试__Feature geometries in the visualization and labeling profiles________________________________验 试_are generalized according to the view's scale resolution to improve drawing performance_____________________________________________验. 试_Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts_______________________________________________________验 试_will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry.______________________________________________________________验\n\n**参数**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于测试与 `geometry2` 的相交关系的几何。\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 被相交的几何。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**其他资源**\n\n* [Intersects](https://esri.github.io/geometry-api-java/doc/Intersects.html)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"isselfintersecting","bundle":"geometry","sinceVersion":"1.8","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#isselfintersecting","description":"指示输入几何是否具有与该几何的其他部分相交或交叉的环、路径或点。 例如，路径彼此相交的单个折线要素或具有自相交的环的面将返回 `true`。 ","examples":"\n**示例**\n\n如果折线的路径彼此相交，则返回 true\n\n```arcade\nvar polyline = Polyline({ ... });\nIsSelfIntersecting(polyline);\n```\n\n","completion":{"label":"IsSelfIntersecting","detail":"IsSelfIntersecting(inputGeometry) -> Boolean","insertText":"IsSelfIntersecting(${1:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.8](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n指示输入几何是否具有与该几何的其他部分相交或交叉的环、路径或点。 例如，路径彼此相交的单个折线要素或具有自相交的环的面将返回 `true`。 \n\n**参数**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于测试自相交的面、折线或多点几何。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"issimple","bundle":"geometry","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#issimple","description":"指示几何的拓扑结构是否比较简单。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n如果几何的拓扑结构比较简单，则将返回 true\n\n```arcade\nIsSimple($feature);\n```\n\n","completion":{"label":"IsSimple","detail":"IsSimple(inputGeometry) -> Boolean","insertText":"IsSimple(${1:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n指示几何的拓扑结构是否比较简单。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 输入几何。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"length","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#length","description":"以给定单位返回输入几何或要素的长度。 这是使用笛卡尔算法的平面测量。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n以千米为单位返回要素的平面长度\n\n```arcade\nLength($feature, 'kilometers')\n```\n\n","completion":{"label":"Length","detail":"Length(inputGeometry, unit?) -> Number","insertText":"Length(${1:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n以给定单位返回输入几何或要素的长度。 这是使用笛卡尔算法的平面测量。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Point](https://developers.arcgis.com/arcade/guide/types/#point)&gt; - 用于计算平面长度的一个或多个几何。\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 返回值的测量单位。 这可能是下面可能的值之一，或者是下面附加资源部分中列出的数字代码之一。 对于可视化、标注和弹出窗口文件，默认单位是地图的空间参考。 在其他配置文件中，如字段计算，默认基于数据的空间参考。  \n可能的值：`centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**其他资源**\n\n* [LengthGeodetic()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#lengthgeodetic)\n* [Length3d()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#length3d)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"length3d","bundle":"geometry","sinceVersion":"1.14","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#length3d","description":"根据高度或 Z 信息，返回输入几何或要素的平面(即笛卡尔)长度。 必须为提供给该函数的几何分配一个投影坐标系。 如果空间参考不提供 Z 单位的值，则返回结果将以米为单位。 请记住，并非所有客户端(例如 ArcGIS API for JavaScript 的 3.x 系列)都支持 即使数据包含 Z 信息，也请求 Z 值。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n以执行表达式的上下文的空间参考为单位，返回要素的 3D 平面长度。\n\n```arcade\nLength3D($feature)\n```\n\n返回要素的 3D 平面长度(以英尺为单位)。\n\n```arcade\nLength3D($feature, 'feet')\n```\n\n","completion":{"label":"Length3D","detail":"Length3D(inputGeometry, unit?) -> Number","insertText":"Length3D(${1:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.14](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n根据高度或 Z 信息，返回输入几何或要素的平面(即笛卡尔)长度。 必须为提供给该函数的几何分配一个投影坐标系。 如果空间参考不提供 Z 单位的值，则返回结果将以米为单位。 请记住，并非所有客户端(例如 ArcGIS API for JavaScript 的 3.x 系列)都支持 即使数据包含 Z 信息，也请求 Z 值。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Point](https://developers.arcgis.com/arcade/guide/types/#point)&gt; - 用于计算 3D 空间中平面长度的几何或 Feature。\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 返回值的测量单位。 这可能是下面可能的值之一，或者是下面附加资源部分中列出的数字代码之一。 对于可视化、标注和弹出窗口文件，默认单位是地图的空间参考。 在其他配置文件中，如字段计算，默认基于数据的空间参考。  \n可能的值：`centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**其他资源**\n\n* [LengthGeodetic()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#lengthgeodetic)\n* [Length()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#length)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"lengthgeodetic","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#lengthgeodetic","description":"以给定单位返回输入几何或要素的大地测量长度。 这是比“Length()”更可靠的长度测量 因为它考虑到了地球的曲率。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n以千米为单位返回要素的大地测量长度\n\n```arcade\nLengthGeodetic($feature, 'kilometers')\n```\n\n","completion":{"label":"LengthGeodetic","detail":"LengthGeodetic(inputGeometry, unit?, curveType?) -> Number","insertText":"LengthGeodetic(${1:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n以给定单位返回输入几何或要素的大地测量长度。 这是比“Length()”更可靠的长度测量 因为它考虑到了地球的曲率。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Point](https://developers.arcgis.com/arcade/guide/types/#point)&gt; - 要计算大地测量长度的几何。\n- **unit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 返回值的测量单位。 这可能是下面可能的值之一，或者是下面附加资源部分中列出的数字代码之一。 对于可视化、标注和弹出窗口文件，默认单位是地图的空间参考。 在其他配置文件中，如字段计算，默认基于数据的空间参考。  \n可能的值：`centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n- **curveType** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 试__Since 1.31_ The type of curve to use for the geodetic length calculation______________________________________验. 试_If no value is provided, the default is `Geodesic`____________________________验.  \n试_Possible values___________________验:  \n  试_- `Geodesic` - Defined by the shortest distance between two points on an ellipsoid_____________________________________________验.  \n  试_- `GreatElliptic` - Defined by the intersection of a plane that contains the center of the spheroid and the spheroid surface and passes through two points. This is also known as a great circle when a sphere is used. It is not necessarily the shortest path between two points_____________________________________________________________________________________________________________________________________________验.  \n  试_- `Loxodrome` - Defined by the line of constant bearing, or azimuth, between two points. It represents a rhumb-line path on the earth that crosses each meridian at the same acute angle, thus forming a spiral that converges on the north or south pole. The Mercator projection shows loxodromes as straight lines______________________________________________________________________________________________________________________________________________________________验.  \n  试_- `NormalSection` - Defined by the intersection of a plane that passes through two points on the surface of the spheroid and is perpendicular to the surface at the first point. It is not necessarily the shortest path between two points_________________________________________________________________________________________________________________________验.  \n  试_- `ShapePreserving` - The segment shape is preserved in the projection where it is defined. This is often used in situations where maintaining the visual representation of a feature is crucial, like when working with boundaries or coastlines___________________________________________________________________________________________________________________________验.\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**其他资源**\n\n* [Length()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#length)\n* [Length3d()](https://developers.arcgis.com/arcade/function-reference/geometry_functions/#length3d)\n* [Available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnitType_Constants/000w00000042000000/)\n* [More available numeric codes for unit parameter](https://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#/esriSRUnit2Type_Constants/000w00000041000000/)\n"}},"parametersInfo":{"min":1,"max":3}},{"type":"function","name":"measuretocoordinate","bundle":"geometry","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#measuretocoordinate","description":"根据给定测量值或 m 值沿输入线返回第一个坐标。 如果沿输入线未找到测量值，则结果将为 `null`。 尝试在给定测量值处找到坐标时，考虑线的所有部分。 测量值不包括线的路径(或部分)之间的间隙。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n根据给定测量值返回输入折线的坐标\n\n```arcade\nvar result = MeasureToCoordinate(Geometry($feature), 110);\n\nreturn result.coordinate;\n```\n\n","completion":{"label":"MeasureToCoordinate","detail":"MeasureToCoordinate(inputLine, inputMeasure) -> Dictionary","insertText":"MeasureToCoordinate(${1:inputLine_}, ${2:inputMeasure_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n根据给定测量值或 m 值沿输入线返回第一个坐标。 如果沿输入线未找到测量值，则结果将为 `null`。 尝试在给定测量值处找到坐标时，考虑线的所有部分。 测量值不包括线的路径(或部分)之间的间隙。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **inputLine**: [Polyline](https://developers.arcgis.com/arcade/guide/types/#polyline) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Point](https://developers.arcgis.com/arcade/guide/types/#point)&gt; \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于找到坐标的线或路径。 输入线的 `hasM` 必须等于 `true`。 如果 `hasM` 为 `false`，则将返回 `null`。 使用要素作为输入时，要素的几何必须是折线。\n- **inputMeasure**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 从线起点沿 `inputLine` 找到坐标的测量值或 m 值。 尝试在给定测量值处找到坐标时，考虑线的所有部分。 测量值不包括线的路径(或部分)之间的间隙。\n\n**返回值**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)  \n返回具有以下属性的字典。 如果沿输入线未找到测量值，则结果将为 `null`。\n\n- **coordinate**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) - 根据给定测量值沿 `inputLine` 的点的第一个坐标。\n- **distanceAlong**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 从 `inputLine` 起点沿线测量到 `coordinate` 的平面距离。 在路径不相连的折线中，`distanceAlong` 值不包括路径起止折点间间隙的距离。\n- **partId**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 在折线输入的情况下，`coordinate` 所属路径的索引。\n- **segmentId**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - `coordinate` 所属线段的索引(相对于路径)。 如果 `coordinate` 代表输入线的一个折点，则 `segmentId` 将返回前一个折点的索引。 如果 `coordinate` 是 `inputLine` 的第一个折点，则 `segmentId` 的值将为 0。"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"multiparttosinglepart","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#multiparttosinglepart","description":"将多部件几何转换为独立几何。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n返回来自多部件几何的单部件几何的数组\n\n```arcade\nvar allParts = MultiPartToSinglePart($feature)\n```\n\n","completion":{"label":"MultiPartToSinglePart","detail":"MultiPartToSinglePart(inputGeometry) -> Array<Geometry>","insertText":"MultiPartToSinglePart(${1:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n将多部件几何转换为独立几何。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 分解为单个部件的多部件几何\n\n**返回值**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)&gt;"}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"multipoint","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#multipoint1","description":"仅使用一个值数组作为坐标从字典构造一个 Multipoint 对象。","examples":"\n**示例**\n\n创建只含 x, y 坐标的 Multipoint\n\n```arcade\nMultipoint({\n  points: [\n    [-97.06138,32.837],\n    [-97.06133,32.836],\n    [-97.06124,32.834],\n    [-97.06127,32.832],\n    [-97.06138,32.837]\n  ],\n  spatialReference: { wkid: 3857 }\n});\n```\n\n创建含 m 值的 Multipoint\n\n```arcade\nMultipoint({\n  hasM: true,\n  points: [\n    [-97.06138,32.837,0],\n    [-97.06133,32.836,15],\n    [-97.06124,32.834,30],\n    [-97.06127,32.832,50],\n    [-97.06138,32.837,0]\n  ],\n  spatialReference: { wkid: 3857 }\n});\n```\n\n创建含 z 值的 Multipoint\n\n```arcade\nMultipoint({\n  hasZ: true,\n  points: [\n    [-97.06138,32.837,1000],\n    [-97.06133,32.836,1500],\n    [-97.06124,32.834,1000],\n    [-97.06127,32.832,500],\n    [-97.06138,32.837,1000]\n  ],\n  spatialReference: { wkid: 3857 }\n});\n```\n\n创建含 z 和 m 值的 Multipoint\n\n```arcade\nMultipoint({\n  hasM: true,\n  hasZ: true,\n  points: [\n    [-97.06138,32.837,1000,0],\n    [-97.06133,32.836,1500,15],\n    [-97.06124,32.834,1000,30],\n    [-97.06127,32.832,500,50],\n    [-97.06138,32.837,1000,0]\n  ],\n  spatialReference: { wkid: 3857 }\n});\n```\n\n","completion":{"label":"Multipoint","detail":"Multipoint(geometryDefinition) -> Multipoint","insertText":"Multipoint(${1:geometryDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n仅使用一个值数组作为坐标从字典构造一个 Multipoint 对象。\n\n**参数**\n\n- **geometryDefinition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 从中构造多点几何对象的属性。\n\n  - **points**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 表示点位置的坐标数组。\n\n    - **singlePoint**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Number](https://developers.arcgis.com/arcade/guide/types/#number)&gt; - 表示单个点或坐标的数字数组。 数组中的第一项表示 x 坐标。 第二个元素表示 y 坐标。 如果 `hasM` 为真且 `hasZ` 为假，则第三个元素表示 m 坐标。 否则，第三个元素表示 z 坐标。 如果 `hasZ` 和 `hasM` 都为真，则第三个元素表示 z 坐标，第四个元素表示 m 坐标。\n  - **hasM**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 指示几何是否具有 m 值。\n  - **hasZ**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 指示几何是否具有 z 值。\n  - **spatialReference**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 几何的空间参考。\n\n    - **wkid**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 地理或投影坐标系的 Well-known ID，用于定义绘制几何的参考。\n\n**返回值**: [Multipoint](https://developers.arcgis.com/arcade/guide/types/#multipoint)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"multipoint","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#multipoint2","description":"使用 Point 对象数组从字典构造一个 Multipoint 对象。","examples":"\n**示例**\n\n创建只含 x, y 坐标的 Multipoint\n\n```arcade\nMultipoint({\n  points: [\n    Point({ x: -97.06138, y: 32.837, spatialReference: { wkid: 3857 } }),\n    Point({ x: -97.06133, y: 32.836, spatialReference: { wkid: 3857 } }),\n    Point({ x: -97.06124, y: 32.834, spatialReference: { wkid: 3857 } }),\n    Point({ x: -97.06127, y: 32.832, spatialReference: { wkid: 3857 } }),\n    Point({ x: -97.06138, y: 32.837, spatialReference: { wkid: 3857 } })\n  ],\n  spatialReference: { wkid: 3857 }\n});\n```\n\n","completion":{"label":"Multipoint","detail":"Multipoint(geometryDefinition) -> Multipoint","insertText":"Multipoint(${1:geometryDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n使用 Point 对象数组从字典构造一个 Multipoint 对象。\n\n**参数**\n\n- **geometryDefinition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 从中构造多点几何对象的属性。\n\n  - **points**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Point](https://developers.arcgis.com/arcade/guide/types/#point)&gt; - 一组点对象。\n  - **hasM**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 指示几何是否具有 m 值。\n  - **hasZ**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 指示几何是否具有 z 值。\n  - **spatialReference**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 几何的空间参考。\n\n    - **wkid**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 地理或投影坐标系的 Well-known ID，用于定义绘制几何的参考。\n\n**返回值**: [Multipoint](https://developers.arcgis.com/arcade/guide/types/#multipoint)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"multipoint","bundle":"geometry","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#multipoint3","description":"从序列化的 JSON 文本构建一个多点对象。 JSON 方案必须遵循 Multipoint 对象的 ArcGIS REST API JSON 规范。","examples":"\n**示例**\n\n\n\n```arcade\n// Creates a Multipoint object\nvar multipointJSON = '{\"points\": [[-97.06138,32.837],[-97.06133,32.836],[-97.06124,32.834],[-97.06127,32.832]],\"spatialReference\" : { \"wkid\": 3857 }}';\nMultipoint(multipointJSON);\n```\n\n","completion":{"label":"Multipoint","detail":"Multipoint(jsonDefinition) -> Multipoint","insertText":"Multipoint(${1:jsonDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"从序列化的 JSON 文本构建一个多点对象。 JSON 方案必须遵循 Multipoint 对象的 ArcGIS REST API JSON 规范。\n\n**参数**\n\n- **jsonDefinition**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 用于构建多点几何对象的 JSON。\n\n**返回值**: [Multipoint](https://developers.arcgis.com/arcade/guide/types/#multipoint)\n\n**其他资源**\n\n* [ArcGIS REST API JSON specification for Multipoint objects](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm#MULTIPOINT)\n"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"nearestcoordinate","bundle":"geometry","sinceVersion":"1.23","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#nearestcoordinate","description":"将输入几何的最近坐标（非折点）返回到搜索点。 返回的字典还包括从搜索点到最近坐标的最短平面距离。 如果搜索点与输入几何相交，则搜索点将作为结果返回，距离为零。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n返回距离输入面最近的坐标以及与该坐标的距离\n\n```arcade\nvar buildings = FeatureSetByPortalItem(\n  Portal('https://www.arcgis.com'),\n  '7b1fb95ab77f40bf8aa09c8b59045449',\n  0,\n  ['*'],\n  true\n);\n\nvar nearestBuilding = First(Intersects(buildings, BufferGeodetic($feature, 100, \"feet\")));\n\nvar result = NearestCoordinate(nearestBuilding, $feature);\n\nreturn result.distance;\n\n// or\n\nreturn result.coordinate;\n```\n\n","completion":{"label":"NearestCoordinate","detail":"NearestCoordinate(inputGeometry, searchPoint) -> Dictionary","insertText":"NearestCoordinate(${1:inputGeometry_}, ${2:searchPoint_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.23](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n将输入几何的最近坐标（非折点）返回到搜索点。 返回的字典还包括从搜索点到最近坐标的最短平面距离。 如果搜索点与输入几何相交，则搜索点将作为结果返回，距离为零。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 从中获取最近坐标的几何。\n- **searchPoint**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 根据其找到 `inputGeometry` 的最近坐标的点。\n\n**返回值**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)  \n返回具有以下属性的字典。\n\n- **coordinate**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) - 从 `inputGeometry` 到 `searchPoint` 的最近坐标。\n- **distance**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 从最近坐标到 `searchPoint` 的平面距离。 这表示 `inputGeometry` 和 `searchPoint` 之间的最短距离。\n- **sideOfLine**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - `searchPoint` 与 `inputGeometry` 至最近坐标的段之间的空间关系。 可能的值： \n\n`left` - `searchPoint` 位于 `inputGeometry` 的左侧。\n\n`right` - `searchPoint` 位于 `inputGeometry` 的右侧。\n\n`straddle` - `searchPoint` 横跨或位于 `inputGeometry` 的上方。"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"nearestvertex","bundle":"geometry","sinceVersion":"1.23","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#nearestvertex","description":"将输入几何的最近折点返回到搜索点。 返回的字典包括从搜索点到最近折点的平面距离。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n返回距离输入面最近的折点以及与该折点的距离\n\n```arcade\nvar buildings = FeatureSetByPortalItem(\n  Portal('https://www.arcgis.com'),\n  '7b1fb95ab77f40bf8aa09c8b59045449',\n  0,\n  ['*'],\n  true\n);\n\nvar nearestBuilding = First(Intersects(buildings, BufferGeodetic($feature, 100, \"feet\")));\n\nvar result = NearestVertex(nearestBuilding, $feature);\n\nreturn result.distance;\n\n// or\n\nreturn result.coordinate;\n```\n\n","completion":{"label":"NearestVertex","detail":"NearestVertex(inputGeometry, searchPoint) -> Dictionary","insertText":"NearestVertex(${1:inputGeometry_}, ${2:searchPoint_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.23](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n将输入几何的最近折点返回到搜索点。 返回的字典包括从搜索点到最近折点的平面距离。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 从中获取最近折点的几何。\n- **searchPoint**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 根据其找到 `inputGeometry` 的最近折点的点。\n\n**返回值**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)  \n返回具有以下属性的字典。\n\n- **coordinate**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) - 表示从 `inputGeometry` 到 `searchPoint` 的最近折点的点位置。\n- **distance**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 从输入几何的最近折点到 `searchPoint` 的平面距离。\n- **sideOfLine**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - `searchPoint` 与 `inputGeometry` 至最近折点的段之间的空间关系。 可能的值： \n\n`left` - `searchPoint` 位于 `inputGeometry` 的左侧。\n\n`right` - `searchPoint` 位于 `inputGeometry` 的右侧。\n\n`straddle` - `searchPoint` 横跨或位于 `inputGeometry` 的上方。"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"offset","bundle":"geometry","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#offset","description":"创建与输入几何保持恒定平面距离的几何。 它与缓冲相似，但是将生成单侧结果。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n返回偏移几何\n\n```arcade\nOffset($feature, 10, 'meters', 'square');\n```\n\n","completion":{"label":"Offset","detail":"Offset(inputGeometry, offsetDistance, offsetUnit?, joinType?, bevelRatio?, flattenError?) -> Geometry","insertText":"Offset(${1:inputGeometry_}, ${2:offsetDistance_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n创建与输入几何保持恒定平面距离的几何。 它与缓冲相似，但是将生成单侧结果。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 将偏移的几何。 不支持点几何。\n- **offsetDistance**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 与输入几何偏移的平面距离。 如果 `offsetDistance > 0`，则将在输入几何的右侧构造偏移几何； 如果 `offsetDistance = 0`，则将不会更改几何，否则将在几何左侧进行构造。 输入几何的路径或环的方向用于确定该几何的哪一侧将认为是右侧， 哪一侧被认为是左侧。 对于简单面，外环方向为顺时针， 内环方向为逆时针。 因此，简单面的右侧将始终位于其内侧。\n- **offsetUnit** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - `offsetDistance` 测量单位。 默认为输入几何的单位。  \n可能的值：`centimeters` | `decimeters` | `inches` | `feet` | `kilometers` | `meters` | `miles` | `millimeters` | `nautical-miles` | `us-feet` | `us-miles` | `yards`\n- **joinType** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 连接类型。 可能的值有 `round`、`bevel`、`miter` 或 `square`。\n- **bevelRatio** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 适用于 `joinType = 'miter'` 情况；`bevelRatio` 乘以偏移距离， 其结果用于指定在形成斜面角之前斜接角偏移交点的位置。\n- **flattenError** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 适用于 `joinType = 'round'` 情况；`flattenError` 用于指定生成线段相对于实际圆弧的最大距离。 算法针对每个圆形连接生成的折点数不会超过 180 个。\n\n**返回值**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":2,"max":6}},{"type":"function","name":"overlaps","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#overlaps","description":"指示一个几何是否与另一个几何重叠。\n\n试__Feature geometries in the visualization and labeling profiles________________________________验 试_are generalized according to the view's scale resolution to improve drawing performance_____________________________________________验. 试_Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts_______________________________________________________验 试_will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry.______________________________________________________________验","examples":"\n**示例**\n\n如果几何重叠，则返回 true\n\n```arcade\nvar geom2 = Polygon({ ... });\nOverlaps($feature, geom2);\n```\n\n","completion":{"label":"Overlaps","detail":"Overlaps(geometry1, geometry2) -> Boolean","insertText":"Overlaps(${1:geometry1_}, ${2:geometry2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n指示一个几何是否与另一个几何重叠。\n\n试__Feature geometries in the visualization and labeling profiles________________________________验 试_are generalized according to the view's scale resolution to improve drawing performance_____________________________________________验. 试_Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts_______________________________________________________验 试_will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry.______________________________________________________________验\n\n**参数**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于测试与 `geometry2` 的“重叠”关系的基础几何。\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于测试与 `geometry1` 的重叠关系的比较几何。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**其他资源**\n\n* [Overlaps](https://esri.github.io/geometry-api-java/doc/Overlaps.html)\n"}},"parametersInfo":{"min":2,"max":2}},[{"type":"function","name":"point","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#point1","description":"从字典构造一个 Point 对象。","examples":"\n**示例**\n\n创建只含 x, y 坐标的 Point\n\n```arcade\nPoint({\n  x: -97.06138,\n  y: 32.837,\n  spatialReference: { wkid: 3857 }\n});\n```\n\n创建含 m 值的 Point\n\n```arcade\nPoint({\n  hasM: true,\n  x: -97.06138,\n  y: 32.837,\n  m: 15,\n  spatialReference: { wkid: 3857 }\n});\n```\n\n创建含 z 值的 Point\n\n```arcade\nPoint({\n  hasZ: true,\n  x: -97.06138,\n  y: 32.837,\n  z: 1500,\n  spatialReference: { wkid: 3857 }\n});\n```\n\n创建含 z 和 m 值的 Point\n\n```arcade\nPoint({\n  hasM: true,\n  hasZ: true,\n  x: -97.06138,\n  y: 32.837,\n  z: 1500,\n  m: 15,\n  spatialReference: { wkid: 3857 }\n});\n```\n\n","completion":{"label":"Point","detail":"Point(geometryDefinition) -> Point","insertText":"Point(${1:geometryDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n从字典构造一个 Point 对象。\n\n**参数**\n\n- **geometryDefinition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 从中构建 Point 几何对象的属性。\n\n  - **x**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 点位置的 x 坐标（经度）。\n  - **y**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 点位置的 y 坐标（纬度）。\n  - **m**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 点位置的 m 值（度量）。 如果提供 m 值，则必须将 `hasM` 设置为 `true`。\n  - **z**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 点位置的 z 值（高程或高度）。 如果提供 z 值，则必须将 `hasZ` 设置为 `true`。\n  - **hasM**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 指示几何是否具有 m 值。\n  - **hasZ**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 指示几何是否具有 z 值。\n  - **spatialReference**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 几何的空间参考。\n\n    - **wkid**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 地理或投影坐标系的 Well-known ID，用于定义绘制几何的参考。\n\n**返回值**: [Point](https://developers.arcgis.com/arcade/guide/types/#point)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"point","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#point2","description":"从序列化的 JSON 文本构建 Point 对象。 JSON 方案必须遵循 Point 对象的 ArcGIS REST API JSON 规范。","examples":"\n**示例**\n\n\n\n```arcade\n// Creates a Point object\nvar pointJSON = '{ \"x\": -118.15, \"y\": 33.80, \"spatialReference\": { \"wkid\": 3857 }}';\nPoint(pointJSON)\n```\n\n","completion":{"label":"Point","detail":"Point(jsonDefinition) -> Point","insertText":"Point(${1:jsonDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n从序列化的 JSON 文本构建 Point 对象。 JSON 方案必须遵循 Point 对象的 ArcGIS REST API JSON 规范。\n\n**参数**\n\n- **jsonDefinition**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 用于构建点几何对象的 JSON。\n\n**返回值**: [Point](https://developers.arcgis.com/arcade/guide/types/#point)\n\n**其他资源**\n\n* [ArcGIS REST API JSON specification for Point objects](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm#POINT)\n"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"pointtocoordinate","bundle":"geometry","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#pointtocoordinate","description":"返回搜索点到输入线的最近坐标和到该坐标的距离。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n根据打开弹出窗口单击的位置，返回到输入折线的最近坐标的距离。\n\n```arcade\nvar result;\n\nif (TypeOf($userInput) == \"Point\"){\n  result = PointToCoordinate(Geometry($feature), $userInput);\n}\n\nreturn result.distanceAlong;\n```\n\n","completion":{"label":"PointToCoordinate","detail":"PointToCoordinate(inputLine, searchPoint) -> Dictionary","insertText":"PointToCoordinate(${1:inputLine_}, ${2:searchPoint_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回搜索点到输入线的最近坐标和到该坐标的距离。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **inputLine**: [Polyline](https://developers.arcgis.com/arcade/guide/types/#polyline) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Point](https://developers.arcgis.com/arcade/guide/types/#point)&gt; \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于获取最近坐标的线或路径。 使用要素作为输入时，要素的几何必须是折线。\n- **searchPoint**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) - 根据其找到 `inputLine` 的最近坐标的点。\n\n**返回值**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)  \n返回具有以下属性的字典。\n\n- **coordinate**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) - 表示沿 `inputLine` 到 `searchPoint` 的最近坐标的点坐标。 如果 `searchPoint` 中的 `hasZ` 为 `false`，则在 x/y 坐标中执行搜索，且 z 值被插值。\n- **distance**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 从 `searchPoint` 到 `coordinate` 的平面距离。\n- **distanceAlong**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 从 `inputLine` 起点沿线测量到 `coordinate` 的平面距离。 在路径不相连的折线中，`distanceAlong` 值不包括路径起止折点间间隙的距离。\n- **partId**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 在折线输入的情况下，`coordinate` 所属路径的索引。\n- **segmentId**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - `coordinate` 所属线段的索引(相对于路径)。 如果 `coordinate` 代表输入线的一个折点，则 `segmentId` 将返回前一个折点的索引。 如果 `coordinate` 是 `inputLine` 的第一个折点，则 `segmentId` 的值将为 0。"}},"parametersInfo":{"min":2,"max":2}},[{"type":"function","name":"polygon","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#polygon1","description":"仅使用一个值数组作为坐标从字典构造 Polygon 对象。","examples":"\n**示例**\n\n创建只含 x, y 坐标的 Polygon\n\n```arcade\n// Creates a Polygon with 2 rings\nPolygon({\n  rings: [\n    [\n      [-97.06138,32.837],\n      [-97.06133,32.836],\n      [-97.06124,32.834],\n      [-97.06127,32.832],\n      [-97.06138,32.837]\n    ],\n    [\n      [-97.06326,32.759],\n      [-97.06298,32.755],\n      [-97.06326,32.759]\n    ]\n  ],\n  spatialReference: { wkid: 3857 }\n});\n```\n\n创建含 m 值的 Polygon\n\n```arcade\n// Creates a Polygon with 1 ring\nPolygon({\n  hasM: true,\n  rings: [\n    [\n      [-97.06138,32.837,0],\n      [-97.06133,32.836,15],\n      [-97.06124,32.834,30],\n      [-97.06127,32.832,50],\n      [-97.06138,32.837,0]\n    ]\n  ],\n  spatialReference: { wkid: 3857 }\n});\n```\n\n创建含 z 值的 Polygon\n\n```arcade\n// Creates a Polygon with 1 ring\nPolygon({\n  hasZ: true,\n  rings: [\n    [\n      [-97.06138,32.837,1000],\n      [-97.06133,32.836,1500],\n      [-97.06124,32.834,1000],\n      [-97.06127,32.832,500],\n      [-97.06138,32.837,1000]\n    ]\n  ],\n  spatialReference: { wkid: 3857 }\n});\n```\n\n创建含 z 和 m 值的 Polygon\n\n```arcade\n// Creates a Polygon with 1 ring\nPolygon({\n  hasM: true,\n  hasZ: true,\n  rings: [\n    [\n      [-97.06138,32.837,1000,0],\n      [-97.06133,32.836,1500,15],\n      [-97.06124,32.834,1000,30],\n      [-97.06127,32.832,500,50],\n      [-97.06138,32.837,1000,0]\n    ]\n  ],\n  spatialReference: { wkid: 3857 }\n});\n```\n\n","completion":{"label":"Polygon","detail":"Polygon(geometryDefinition) -> Polygon","insertText":"Polygon(${1:geometryDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n仅使用一个值数组作为坐标从字典构造 Polygon 对象。\n\n**参数**\n\n- **geometryDefinition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 用于构建 Polygon 几何对象的属性。\n\n  - **rings**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 一组环（或形状），其中每个环都是一组折点。\n\n    - **ring**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 环中的折点数组。 所有环都应该是闭合的，这意味着每个环的第一个折点应该始终与最后一个折点相同。 折点应按顺时针顺序定义。 以逆时针顺序定义折点的环将导致面孔洞。\n\n      - **vertex**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Number](https://developers.arcgis.com/arcade/guide/types/#number)&gt; - 表示环中单个折点或坐标的数字数组。 数组中的第一项表示 x 坐标。 第二个元素表示 y 坐标。 如果 `hasM` 为真且 `hasZ` 为假，则第三个元素表示 m 坐标。 否则，第三个元素表示 z 坐标。 如果 `hasZ` 和 `hasM` 都为真，则第三个元素表示 z 坐标，第四个元素表示 m 坐标。\n  - **curveRings**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - _自 ArcGIS Pro 和 ArcGIS Maps SDKs for Native Apps 版本 1.25 以来。_ 可能包含曲线的环（或形状）数组。\n\n    - **ring**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 环中的折点或曲线对象数组。 所有环都应该是闭合的，这意味着每个环的第一个折点应该始终与最后一个折点相同。 折点应按顺时针顺序定义。 以逆时针顺序定义折点的环将导致面孔洞。 数组中的每个项目可以是顶点或曲线对象。\n\n      - **vertex**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Number](https://developers.arcgis.com/arcade/guide/types/#number)&gt; - 表示环中单个折点或坐标的数字数组。 数组中的第一项表示 x 坐标。 第二个元素表示 y 坐标。 如果 `hasM` 为真且 `hasZ` 为假，则第三个元素表示 m 坐标。 否则，第三个元素表示 z 坐标。 如果 `hasZ` 和 `hasM` 都为真，则第三个元素表示 z 坐标，第四个元素表示 m 坐标。\n      - **curve**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 表示环的一段的曲线对象。 曲线对象具有以下属性：\n\n        - **a**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 定义椭圆弧或圆弧。 圆弧在数组中有 4 个元素；椭圆弧必须有 7 个元素。\n        - **b**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 表示三次贝塞尔曲线。 这是由一个代表端点和两个控制点的三个数组定义的。\n        - **c**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - c 属性表示开放的圆弧。 它被定义为两个双精度值的数组，分别表示圆心的 x 和 y 坐标。\n  - **hasM**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 指示几何是否具有 m 值。\n  - **hasZ**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 指示几何是否具有 z 值。\n  - **spatialReference**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 几何的空间参考。\n\n    - **wkid**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 地理或投影坐标系的 Well-known ID，用于定义绘制几何的参考。\n\n**返回值**: [Polygon](https://developers.arcgis.com/arcade/guide/types/#polygon)\n\n**其他资源**\n\n* [Curve objects](https://developers.arcgis.com/rest/services-reference/enterprise/geometry-objects/#curve-objects)\n"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"polygon","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#polygon2","description":"使用一个点数组作为坐标从字典构造 Polygon 对象。","examples":"\n**示例**\n\n创建只含 x, y 坐标的 Polygon\n\n```arcade\n// Creates a Polygon with 2 rings\nPolygon({\n  rings: [\n    [\n      Point({ x: -97.06138, y: 32.837, spatialReference: { wkid: 3857 } }),\n      Point({ x: -97.06133, y: 32.836, spatialReference: { wkid: 3857 } }),\n      Point({ x: -97.06124, y: 32.834, spatialReference: { wkid: 3857 } }),\n      Point({ x: -97.06127, y: 32.832, spatialReference: { wkid: 3857 } }),\n      Point({ x: -97.06138, y: 32.837, spatialReference: { wkid: 3857 } })\n    ],\n    [\n      Point({ x: -97.06326, y: 32.759, spatialReference: { wkid: 3857 } }),\n      Point({ x: -97.06298, y: 32.755, spatialReference: { wkid: 3857 } }),\n      Point({ x: -97.06326, y: 32.759, spatialReference: { wkid: 3857 } })\n    ]\n  ],\n  spatialReference: { wkid: 3857 }\n});\n```\n\n","completion":{"label":"Polygon","detail":"Polygon(geometryDefinition) -> Polygon","insertText":"Polygon(${1:geometryDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n使用一个点数组作为坐标从字典构造 Polygon 对象。\n\n**参数**\n\n- **geometryDefinition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 用于构建 Polygon 几何对象的属性。\n\n  - **rings**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 一组环（或形状），其中每个环都是一个点数组。\n\n    - **ring**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Point](https://developers.arcgis.com/arcade/guide/types/#point)&gt; - 表示环的点数组。 所有环都应该是闭合的，这意味着每个环的第一个点应该始终与最后一个点相同。 点应按顺时针顺序定义。 以逆时针顺序定义折点的环将导致面孔洞。\n  - **curveRings**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - _自 ArcGIS Pro 和 ArcGIS Maps SDKs for Native Apps 版本 1.25 以来。_ 可能包含曲线的环（或形状）数组。\n\n    - **ring**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 环中的折点或曲线对象数组。 所有环都应该是闭合的，这意味着每个环的第一个折点应该始终与最后一个折点相同。 折点应按顺时针顺序定义。 以逆时针顺序定义折点的环将导致面孔洞。 数组中的每个项目可以是顶点或曲线对象。\n\n      - **vertex**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) - 表示环中单个顶点或坐标的点。\n      - **curve**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 表示环的一段的曲线对象。 曲线对象具有以下属性：\n\n        - **a**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 定义椭圆弧或圆弧。 圆弧在数组中有 4 个元素；椭圆弧必须有 7 个元素。\n        - **b**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 表示三次贝塞尔曲线。 这是由一个代表端点和两个控制点的三个数组定义的。\n        - **c**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - c 属性表示开放的圆弧。 它被定义为两个双精度值的数组，分别表示圆心的 x 和 y 坐标。\n  - **hasM**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 指示几何是否具有 m 值。\n  - **hasZ**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 指示几何是否具有 z 值。\n  - **spatialReference**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 几何的空间参考。\n\n    - **wkid**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 地理或投影坐标系的 Well-known ID，用于定义绘制几何的参考。\n\n**返回值**: [Polygon](https://developers.arcgis.com/arcade/guide/types/#polygon)\n\n**其他资源**\n\n* [Curve objects](https://developers.arcgis.com/rest/services-reference/enterprise/geometry-objects/#curve-objects)\n"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"polygon","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#polygon3","description":"从序列化的 JSON 文本构建 Polygon 对象。 JSON 方案必须遵循 Polygon 对象的 ArcGIS REST API JSON 规范。 从 1.25 版本开始，JSON 文本可能包含 ArcGIS Pro 和 ArcGIS Maps SDKs for Native Apps 中的曲线对象。","examples":"\n**示例**\n\n\n\n```arcade\n// Creates a Polygon object\nvar polygonJSON = '{\"rings\": [[[-97.06138,32.837],[-97.06133,32.836],[-97.06124,32.834],[-97.06127,32.832], [-97.06138,32.837]],[[-97.06326,32.759],[-97.06298,32.755],[-97.06153,32.749], [-97.06326,32.759]]],\"spatialReference\": { \"wkid\": 3857 }}';\nPolygon(polygonJSON);\n```\n\n","completion":{"label":"Polygon","detail":"Polygon(jsonDefinition) -> Polygon","insertText":"Polygon(${1:jsonDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n从序列化的 JSON 文本构建 Polygon 对象。 JSON 方案必须遵循 Polygon 对象的 ArcGIS REST API JSON 规范。 从 1.25 版本开始，JSON 文本可能包含 ArcGIS Pro 和 ArcGIS Maps SDKs for Native Apps 中的曲线对象。\n\n**参数**\n\n- **jsonDefinition**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 用于构建面几何对象的 JSON。\n\n**返回值**: [Polygon](https://developers.arcgis.com/arcade/guide/types/#polygon)\n\n**其他资源**\n\n* [ArcGIS REST API JSON specification for Polygon objects](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm#POLYGON)\n"}},"parametersInfo":{"min":1,"max":1}}],[{"type":"function","name":"polyline","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#polyline1","description":"仅使用一个值数组作为坐标从字典构造 Polyline 对象。","examples":"\n**示例**\n\n创建只含 x, y 坐标的 Polyline\n\n```arcade\n// Creates a Polyline with 2 paths\nPolyline({\n  paths: [\n    [\n      [-97.06138,32.837],\n      [-97.06133,32.836],\n      [-97.06124,32.834],\n      [-97.06127,32.832]\n    ],\n    [\n      [-97.06326,32.759],\n      [-97.06298,32.755]\n    ]\n  ],\n  spatialReference: { wkid: 3857 }\n});\n```\n\n创建含 m 值的 Polyline\n\n```arcade\n// Creates a Polyline with 1 path\nPolyline({\n  hasM: true,\n  paths: [\n    [\n      [-97.06138,32.837,0],\n      [-97.06133,32.836,15],\n      [-97.06124,32.834,30],\n      [-97.06127,32.832,50]\n    ]\n  ],\n  spatialReference: { wkid: 3857 }\n});\n```\n\n创建含 z 值的 Polyline\n\n```arcade\n// Creates a Polyline with 1 path\nPolyline({\n  hasZ: true,\n  paths: [\n    [\n      [-97.06138,32.837,1000],\n      [-97.06133,32.836,1500],\n      [-97.06124,32.834,1000],\n      [-97.06127,32.832,500]\n    ]\n  ],\n  spatialReference: { wkid: 3857 }\n});\n```\n\n创建含 z 和 m 值的 Polyline\n\n```arcade\n// Creates a Polyline with 1 path\nPolyline({\n  hasM: true,\n  hasZ: true,\n  paths: [\n    [\n      [-97.06138,32.837,1000,0],\n      [-97.06133,32.836,1500,15],\n      [-97.06124,32.834,1000,30],\n      [-97.06127,32.832,500,50]\n    ]\n  ],\n  spatialReference: { wkid: 3857 }\n});\n```\n\n","completion":{"label":"Polyline","detail":"Polyline(geometryDefinition) -> Polyline","insertText":"Polyline(${1:geometryDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n仅使用一个值数组作为坐标从字典构造 Polyline 对象。\n\n**参数**\n\n- **geometryDefinition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 用于构建 Polyline 几何对象的属性。\n\n  - **paths**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 一组路径（或线段），其中每条路径都是一组折点。\n\n    - **path**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 线段或路径中的折点数组。\n\n      - **vertex**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Number](https://developers.arcgis.com/arcade/guide/types/#number)&gt; - 表示线段中单个折点或坐标的数字数组。 数组中的第一项表示 x 坐标。 第二个元素表示 y 坐标。 如果 `hasM` 为真且 `hasZ` 为假，则第三个元素表示 m 坐标。 否则，第三个元素表示 z 坐标。 如果 `hasZ` 和 `hasM` 都为真，则第三个元素表示 z 坐标，第四个元素表示 m 坐标。\n  - **curvePaths**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - _自 ArcGIS Pro 和 ArcGIS Maps SDKs for Native Apps 版本 1.25 以来。_ 可能包含曲线的路径（或线段）数组。\n\n    - **path**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 路径中的折点或曲线对象数组。\n\n      - **vertex**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Number](https://developers.arcgis.com/arcade/guide/types/#number)&gt; - 表示线段中单个折点或坐标的数字数组。 数组中的第一项表示 x 坐标。 第二个元素表示 y 坐标。 如果 `hasM` 为真且 `hasZ` 为假，则第三个元素表示 m 坐标。 否则，第三个元素表示 z 坐标。 如果 `hasZ` 和 `hasM` 都为真，则第三个元素表示 z 坐标，第四个元素表示 m 坐标。\n      - **curve**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 表示路径的一段的曲线对象。 曲线对象具有以下属性：\n\n        - **a**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 定义椭圆弧或圆弧。 圆弧在数组中有 4 个元素；椭圆弧必须有 7 个元素。\n        - **b**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 表示三次贝塞尔曲线。 这是由一个代表端点和两个控制点的三个数组定义的。\n        - **c**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - c 属性表示开放的圆弧。 它被定义为两个双精度值的数组，分别表示圆心的 x 和 y 坐标。\n  - **hasM**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 指示几何是否具有 m 值。\n  - **hasZ**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 指示几何是否具有 z 值。\n  - **spatialReference**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 几何的空间参考。\n\n    - **wkid**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 地理或投影坐标系的 Well-known ID，用于定义绘制几何的参考。\n\n**返回值**: [Polyline](https://developers.arcgis.com/arcade/guide/types/#polyline)\n\n**其他资源**\n\n* [Curve objects](https://developers.arcgis.com/rest/services-reference/enterprise/geometry-objects/#curve-objects)\n"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"polyline","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#polyline2","description":"仅使用一个点数组作为坐标从字典构造 Polyline 对象。","examples":"\n**示例**\n\n创建只含 x, y 坐标的 Polyline\n\n```arcade\n// Creates a Polyline with 2 paths\nPolyline({\n  paths: [\n    [\n      Point({ x: -97.06138, y: 32.837, spatialReference: { wkid: 3857 } }),\n      Point({ x: -97.06133, y: 32.836, spatialReference: { wkid: 3857 } }),\n      Point({ x: -97.06124, y: 32.834, spatialReference: { wkid: 3857 } }),\n      Point({ x: -97.06127, y: 32.832, spatialReference: { wkid: 3857 } })\n    ],\n    [\n      Point({ x: -97.06326, y: 32.759, spatialReference: { wkid: 3857 } }),\n      Point({ x: -97.06298, y: 32.755, spatialReference: { wkid: 3857 } })\n    ]\n  ],\n  spatialReference: { wkid: 3857 }\n});\n```\n\n","completion":{"label":"Polyline","detail":"Polyline(geometryDefinition) -> Polyline","insertText":"Polyline(${1:geometryDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n仅使用一个点数组作为坐标从字典构造 Polyline 对象。\n\n**参数**\n\n- **geometryDefinition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 用于构建 Polyline 几何对象的属性。\n\n  - **paths**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 一组路径（或线段），其中每条路径都是一组点对象。\n\n    - **path**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Point](https://developers.arcgis.com/arcade/guide/types/#point)&gt; - 表示线段或路径的点数组。\n  - **curvePaths**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - _自 ArcGIS Pro 和 ArcGIS Maps SDKs for Native Apps 版本 1.25 以来。_ 可能包含曲线的路径（或线段）数组。\n\n    - **path**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 路径中的折点或曲线对象数组。\n\n      - **vertex**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) - 表示路径中顶点的点。\n      - **curve**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 表示路径的一段的曲线对象。 曲线对象具有以下属性：\n\n        - **a**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 定义椭圆弧或圆弧。 圆弧在数组中有 4 个元素；椭圆弧必须有 7 个元素。\n        - **b**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 表示三次贝塞尔曲线。 这是由一个代表端点和两个控制点的三个数组定义的。\n        - **c**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - c 属性表示开放的圆弧。 它被定义为两个双精度值的数组，分别表示圆心的 x 和 y 坐标。\n  - **hasM**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 指示几何是否具有 m 值。\n  - **hasZ**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 指示几何是否具有 z 值。\n  - **spatialReference**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 几何的空间参考。\n\n    - **wkid**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 地理或投影坐标系的 Well-known ID，用于定义绘制几何的参考。\n\n**返回值**: [Polyline](https://developers.arcgis.com/arcade/guide/types/#polyline)\n\n**其他资源**\n\n* [Curve objects](https://developers.arcgis.com/rest/services-reference/enterprise/geometry-objects/#curve-objects)\n"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"polyline","bundle":"geometry","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#polyline3","description":"从序列化的 JSON 文本构建 Polyline 对象。 JSON 方案必须遵循 Polyline 对象的 ArcGIS REST API JSON 规范。 从 1.25 版本开始，JSON 文本可能包含 ArcGIS Pro 和 ArcGIS Maps SDKs for Native Apps 中的曲线对象。","examples":"\n**示例**\n\n\n\n```arcade\n// Creates a Polyline object\nvar polylineJSON = '{\"paths\": [[[-97.06138,32.837],[-97.06133,32.836],[-97.06124,32.834],[-97.06127,32.832]], [[-97.06326,32.759],[-97.06298,32.755]]], \"spatialReference\": { \"wkid\": 3857 } }'\nPolyline(polylineJSON);\n```\n\n","completion":{"label":"Polyline","detail":"Polyline(jsonDefinition) -> Polyline","insertText":"Polyline(${1:jsonDefinition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n从序列化的 JSON 文本构建 Polyline 对象。 JSON 方案必须遵循 Polyline 对象的 ArcGIS REST API JSON 规范。 从 1.25 版本开始，JSON 文本可能包含 ArcGIS Pro 和 ArcGIS Maps SDKs for Native Apps 中的曲线对象。\n\n**参数**\n\n- **jsonDefinition**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 用于构建折线几何对象的 JSON 文本。\n\n**返回值**: [Polyline](https://developers.arcgis.com/arcade/guide/types/#polyline)\n\n**其他资源**\n\n* [ArcGIS REST API JSON specification for Polyline objects](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm#POLYLINE)\n"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"relate","bundle":"geometry","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#relate","description":"指示对于两个几何来说，给定的 DE-9IM 关系是否为 `true`。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n如果输入几何关系匹配，则返回 true\n\n```arcade\nRelate($feature, geometry2, 'TTTFFTFFT')\n```\n\n","completion":{"label":"Relate","detail":"Relate(geometry1, geometry2, relation) -> Boolean","insertText":"Relate(${1:geometry1_}, ${2:geometry2_}, ${3:relation_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n指示对于两个几何来说，给定的 DE-9IM 关系是否为 `true`。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 关系的第一个几何。\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 关系的第二个几何。\n- **relation**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 用于测试两个几何关系(编码为文本值)的维度扩展九交模型(DE-9IM)。 此文本包含 DE-9IM 矩阵中表示的每个交叉点的测试结果。 每个结果为文本的一个字符，可以表示为数字(返回的最大维度：0、1、2)、 布尔值(T 或 F)或掩码字符(忽略结果：\\\\*')\n\n例如：下列每个 DE-9IM 文本编码对于测试面几何是否完全包含线几何来说都是有效的： TTTFFTFFT (布尔)、'T\\\\*\\\\*\\\\*\\\\*\\\\*\\\\*FF\\\\*' (忽略不相关的交点)或者 '102FF\\\\*FF\\\\*' (维度形式)。 返回的每个结果均相同。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"ringisclockwise","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#ringisclockwise","description":"指示面环中的点是否以顺时针方向排序。","examples":"\n**示例**\n\n\n\n```arcade\n// $feature is a polygon feature\nvar polygonRings = Geometry($feature).rings;\nIIf(RingIsClockwise(polygonRings[0]), 'correct polygon', 'incorrect direction')\n```\n\n","completion":{"label":"RingIsClockwise","detail":"RingIsClockwise(points) -> Boolean","insertText":"RingIsClockwise(${1:points_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n指示面环中的点是否以顺时针方向排序。\n\n**参数**\n\n- **points**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Point](https://developers.arcgis.com/arcade/guide/types/#point)&gt; - 面环中的点数组。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"rotate","bundle":"geometry","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#rotate","description":"按照指定度数，以逆时针方向旋转几何。 将以质心或者给定旋转点进行旋转。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n返回围绕质心旋转 90 度的输入要素\n\n```arcade\nRotate($feature, 90)\n```\n\n","completion":{"label":"Rotate","detail":"Rotate(inputGeometry, angle, rotationOrigin?) -> Geometry","insertText":"Rotate(${1:inputGeometry_}, ${2:angle_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n按照指定度数，以逆时针方向旋转几何。 将以质心或者给定旋转点进行旋转。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 要旋转的几何。\n- **angle**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 旋转角度(以度为单位)\n- **rotationOrigin** (_Optional_): [Point](https://developers.arcgis.com/arcade/guide/types/#point) - 旋转几何时围绕的点。 默认值为几何质心。\n\n**返回值**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"setgeometry","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#setgeometry","description":"在用户定义的要素上设置或替换几何。 请注意引用为全局变量的要素是恒定的；其几何不能更改。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n在要素上设置新几何\n\n```arcade\nvar pointFeature = Feature(Point( ... ), 'name', 'buffer centroid');\nvar mileBuffer = BufferGeodetic(Geometry(pointFeature), 1, 'mile');\nSetGeometry(pointFeature, mileBuffer);\n```\n\n","completion":{"label":"SetGeometry","detail":"SetGeometry(inputFeature, inputGeometry) -> Null","insertText":"SetGeometry(${1:inputFeature_}, ${2:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n在用户定义的要素上设置或替换几何。 请注意引用为全局变量的要素是恒定的；其几何不能更改。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 几何将被更新的要素\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - 要在输入要素上设置的几何\n\n**返回值**: Null"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"simplify","bundle":"geometry","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#simplify","description":"对几何执行简化操作。 这会改变给定的几何形状，使其在拓扑上合法。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n返回已简化的要素几何\n\n```arcade\nSimplify($feature);\n```\n\n","completion":{"label":"Simplify","detail":"Simplify(inputGeometry) -> Geometry","insertText":"Simplify(${1:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n对几何执行简化操作。 这会改变给定的几何形状，使其在拓扑上合法。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 要简化的几何。\n\n**返回值**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"symmetricdifference","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#symmetricdifference","description":"对两个几何执行对称差集运算。 对称差集包括两个几何的非共有部分。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n返回用于表示两个输入不重叠区域的面\n\n```arcade\nvar geom2 = Polygon({ ... });\nSymmetricDifference($feature, geom2);\n```\n\n","completion":{"label":"SymmetricDifference","detail":"SymmetricDifference(leftGeometry, rightGeometry) -> Geometry","insertText":"SymmetricDifference(${1:leftGeometry_}, ${2:rightGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n对两个几何执行对称差集运算。 对称差集包括两个几何的非共有部分。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **leftGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 在异或运算中与 `rightGeometry` 作比较的几何实例。\n- **rightGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 在异或运算中与 `leftGeometry` 作比较的几何实例。\n\n**返回值**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"touches","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#touches","description":"试_Indicates if one geometry touches another geometry___________________________验.\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_","examples":"\n**示例**\n\n如果几何相接触，则返回 true\n\n```arcade\nvar geom2 = Polygon({ ... });\nTouches($feature, geom2);\n```\n\n","completion":{"label":"Touches","detail":"Touches(geometry1, geometry2) -> Boolean","insertText":"Touches(${1:geometry1_}, ${2:geometry2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n试_Indicates if one geometry touches another geometry___________________________验.\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此，在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件，例如弹出窗口，提供全分辨率几何。_\n\n**参数**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于测试与 `geometry2` 的“接触”关系的几何。\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于和 `geometry1` 测试接触关系的几何。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**其他资源**\n\n* [Touches](https://esri.github.io/geometry-api-java/doc/Touches.html)\n"}},"parametersInfo":{"min":2,"max":2}},[{"type":"function","name":"union","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#union1","description":"以输入数组的形式构建几何或要素的集论并集并返回单个几何。 所有输入必须具有相同的几何类型，并共享同一空间参考。\n\n**请注意，如果使用 `$feature` 作为此函数的输入，将只产生与视图的比例分辨率具有同等精度的结果。 因此，使用此函数返回的表达式值可能会在比例缩放后发生更改。**","examples":"\n**示例**\n\n\n\n```arcade\nvar geom2 = Polygon({ ... });\nUnion([ $feature, geom2 ]);\n```\n\n","completion":{"label":"Union","detail":"Union(geometries) -> Geometry","insertText":"Union(${1:geometries_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n以输入数组的形式构建几何或要素的集论并集并返回单个几何。 所有输入必须具有相同的几何类型，并共享同一空间参考。\n\n**请注意，如果使用 `$feature` 作为此函数的输入，将只产生与视图的比例分辨率具有同等精度的结果。 因此，使用此函数返回的表达式值可能会在比例缩放后发生更改。**\n\n**参数**\n\n- **geometries**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)&gt; \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Feature](https://developers.arcgis.com/arcade/guide/types/#feature)&gt; - 一组几何图形或一组要素，用于组合成一个单一几何。 这可以是任意数量的几何。\n\n**返回值**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"union","bundle":"geometry","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#union2","description":"构建几何列表的集论并集并返回单个几何。 所有输入必须具有相同的几何类型，并共享同一空间参考。\n\n**请注意，如果使用 `$feature` 作为此函数的输入，将只产生与视图的比例分辨率具有同等精度的结果。 因此，使用此函数返回的表达式值可能会在比例缩放后发生更改。**","examples":"\n**示例**\n\n\n\n```arcade\nvar geom2 = Polygon({ ... });\nvar geom3 = Polygon({ ... });\nvar geom4 = Polygon({ ... });\nUnion(Geometry($feature), geom2, geom3, geom4);\n```\n\n","completion":{"label":"Union","detail":"Union(geometry1, [geometry2, ..., geometryN]?) -> Geometry","insertText":"Union(${1:geometry1_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n构建几何列表的集论并集并返回单个几何。 所有输入必须具有相同的几何类型，并共享同一空间参考。\n\n**请注意，如果使用 `$feature` 作为此函数的输入，将只产生与视图的比例分辨率具有同等精度的结果。 因此，使用此函数返回的表达式值可能会在比例缩放后发生更改。**\n\n**参数**\n\n- **geometry1**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于与其他几何合并为单一几何的几何。\n- **[geometry2, ..., geometryN]** (_Optional_): [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 要组合成单一几何的几何体或要素的持续列表。 这可以是任意数量的几何。\n\n**返回值**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)"}},"parametersInfo":{"min":1,"max":-1}}],{"type":"function","name":"within","bundle":"geometry","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/geometry_functions/#within","description":"指示一个几何是否在另一个几何之内。\n\n试__Feature geometries in the visualization and labeling profiles________________________________验 试_are generalized according to the view's scale resolution to improve drawing performance_____________________________________________验. 试_Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts_______________________________________________________验 试_will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry.______________________________________________________________验","examples":"\n**示例**\n\n如果要素在给定面之内，则返回 true\n\n```arcade\nvar outerGeom = Polygon({ ... });\nWithin($feature, outerGeom);\n```\n\n","completion":{"label":"Within","detail":"Within(innerGeometry, outerGeometry) -> Boolean","insertText":"Within(${1:innerGeometry_}, ${2:outerGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n指示一个几何是否在另一个几何之内。\n\n试__Feature geometries in the visualization and labeling profiles________________________________验 试_are generalized according to the view's scale resolution to improve drawing performance_____________________________________________验. 试_Therefore, using a feature's geometry (i.e. `$feature`) as input to any geometry function in these contexts_______________________________________________________验 试_will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry.______________________________________________________________验\n\n**参数**\n\n- **innerGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于测试与 `outerGeometry` 的“位于”关系的基础几何。\n- **outerGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于测试与 `innerGeometry` 的包含关系的比较几何。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)\n\n**其他资源**\n\n* [Within](https://esri.github.io/geometry-api-java/doc/Within.html)\n"}},"parametersInfo":{"min":2,"max":2}}]},{"id":"feature_functions","title":"功能函数","items":[{"type":"function","name":"defaultvalue","bundle":"core","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#defaultvalue","description":"如果要素中的字段名称不存在或者指定字段的值为“null”或空文本值，则返回指定的默认值。","examples":"\n**示例**\n\n如果要素属性不存在或为空，则返回“n/a”\n\n```arcade\nDefaultValue($feature, \"population\", \"n/a\")\n// Returns the population value if available\n// or n/a if not available\n```\n\n","completion":{"label":"DefaultValue","detail":"DefaultValue(inputFeature, fieldName, defaultValue) -> Any","insertText":"DefaultValue(${1:inputFeature_}, ${2:fieldName_}, ${3:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n如果要素中的字段名称不存在或者指定字段的值为“null”或空文本值，则返回指定的默认值。\n\n**参数**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 要检查的输入要素。\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 要检查的字段名。\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 如果字段名称不存在或者指定字段的值为“null”或空文本值，则返回此值。\n\n**返回值**: [Any](https://developers.arcgis.com/arcade/guide/types/#any)  \n如果已定义，则返回指定字段的值。 否则，返回 `defaultValue` 中指定的值。"}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"domain","bundle":"core","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#domain","description":"返回分配给所提供 `feature` 的给定字段的属性域。 如果 `feature` 属于子类型类，则将返回分配给该子类型的属性域。","examples":"\n**示例**\n\n分配给要素子类型的属性域。\n\n```arcade\nvar d = Domain($feature, \"poleType\")\n// the poleType field has a coded value domain called poleTypes\n// the value of d will be\n// {\n//   type: \"codedValue\" ,\n//   name: \"poleTypes\",\n//   dataType: \"number\",\n//   codedValues: [\n//     { name: \"Unknown\", code: 0 },\n//     { name: \"Wood\", code: 1 },\n//     { name: \"Steel\", code: 2 }\n//   ]\n// }\n```\n\n","completion":{"label":"Domain","detail":"Domain(inputFeature, fieldName) -> Dictionary","insertText":"Domain(${1:inputFeature_}, ${2:fieldName_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回分配给所提供 `feature` 的给定字段的属性域。 如果 `feature` 属于子类型类，则将返回分配给该子类型的属性域。\n\n**参数**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 具有包含属性域的字段的要素。\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 分配属性域的字段名称(非字段别名)。\n\n**返回值**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)  \n返回以下属性描述的字典。\n\n- **type**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 属性域类型 - `codedValue` 或 `range`。\n- **name**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 属性域名称。\n- **dataType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 属性域字段的数据类型。 可以是下列值中的一个： “esriFieldTypeSmallInteger”、“esriFieldTypeInteger”、“esriFieldTypeBigInteger”、“esriFieldTypeSingle”、“esriFieldTypeDouble”、“esriFieldTypeString”、 `esriFieldTypeDate`, `esriFieldTypeOID`, `esriFieldTypeGeometry`, `esriFieldTypeBlob`, `esriFieldTypeRaster`, `esriFieldTypeGUID`, `esriFieldTypeGlobalID`, `esriFieldTypeXML`.\n- **codedValues**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)&gt; - 仅适用于 `codedValue` 属性域。 用于描述字段有效值的字典数组。 每个字典都有一个 `code` 属性，其中包含实际的字段值， 和一个 `name` 属性，其中包含对值的简明易懂的描述（例如 `{ code: 1, name: \"pavement\" }`）。\n- **min**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 仅适用于 `range` 属性域。 属性域的最小值。\n- **max**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 仅适用于 `range` 属性域。 属性域的最大值。"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"domaincode","bundle":"core","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#domaincode","description":"返回要素中的关联属性域描述的代码。","examples":"\n**示例**\n\n打印参考字段的属性域代码。\n\n```arcade\nDomainCode($feature, 'Enabled', 'True')\n```\n\n","completion":{"label":"DomainCode","detail":"DomainCode(inputFeature, fieldName, value?, subtype?) -> Number,Text","insertText":"DomainCode(${1:inputFeature_}, ${2:fieldName_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回要素中的关联属性域描述的代码。\n\n**参数**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 具有包含属性域的字段的要素。\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 包含属性域的字段名称(非字段别名)。\n- **value** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 将要转换回代码的值。\n- **subtype** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 如果要素支持子类型，则为子类型的编码编号或名称。 如果未提供，将使用当前要素的子类型（如果有）。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"domainname","bundle":"core","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#domainname","description":"返回要素中属性域代码的描述性名称。","examples":"\n**示例**\n\n输出所参考字段的属性域描述\n\n```arcade\nDomainName($feature, 'fieldName')\n```\n\n","completion":{"label":"DomainName","detail":"DomainName(inputFeature, fieldName, code?, subtype?) -> Text","insertText":"DomainName(${1:inputFeature_}, ${2:fieldName_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回要素中属性域代码的描述性名称。\n\n**参数**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 具有包含属性域的字段的要素。\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 包含属性域的字段名称(非字段别名)。\n- **code** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 与所需描述性名称相关联的代码。 如未提供，则将返回要素中的字段值。\n- **subtype** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 如果要素支持子类型，则为子类型的编码编号或名称。 如果未提供，将使用要素的子类型(如果有)。\n\n**返回值**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"expects","bundle":"core","sinceVersion":"1.15","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#expects","description":"请求给定要素的附加属性。 在某些配置文件(例如可视化和标注)中，应用程序仅请求渲染每个要素或标注所需的数据属性。 某些表达式使用变量而不是文本动态引用字段名称。 这将导致渲染和标注引擎难以检测渲染所需的字段。 此功能允许您使用列表明确表示必填字段。 您还可以使用通配符请求全部或部分字段。 由于将基于每个要素执行表达式，因此需谨慎使用通配符，尤其是在包含许多要素的图层中。 请求过多的数据可能会导致应用程序性能很差。","examples":"\n**示例**\n\n渲染器不易检测到的请求字段\n\n```arcade\n// Request multiple years of population data if the\n// fields cannot be easily detected by the renderer or labels\nExpects($feature, 'POP_2020', 'POP_2010')\nvar thisYear = 2020;\nvar lastDecade = thisYear - 10;\nreturn $feature['POP_'+thisYear] - $feature['POP_'+lastDecade]\n```\n\n请求与字段名称中的模式匹配的所有数据\n\n```arcade\n// Request all the data beginning with 'POP'. This is\n// necessary because the renderer can't easily detect\n// the required fields based on this expression\nExpects($feature, 'POP*')\n\nvar startYear = 1880;\nvar endYear = 2020;\nvar changes = [];\n\nfor(var y=startYear; y<endYear; y+=10){\n  var startPop = $feature['POP_' + y];\n  var endPop = $feature['POP_' + (y+10)];\n  var change = endPop - startPop;\n  Push(changes, change);\n}\nMax(changes);\n```\n\n请求要素的所有数据\n\n```arcade\n// Request all fields because the required fields may\n// be based on unknown information like a relative date\nExpects($feature, '*')\n\nvar casesToday = $feature[ 'CASES_' + Text(d, 'MM_DD_Y') ];\nvar casesYesterday = $feature[ 'CASES_' + Text(DateAdd( Today(), -1, 'days', 'MM_DD_Y') ];\n// Change in cases from yesterday\nreturn casesToday - casesYesterday;\n```\n\n","completion":{"label":"Expects","detail":"Expects(inputFeature, field1, [field2, ..., fieldN]?) -> Null","insertText":"Expects(${1:inputFeature_}, ${2:field1_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.15](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n请求给定要素的附加属性。 在某些配置文件(例如可视化和标注)中，应用程序仅请求渲染每个要素或标注所需的数据属性。 某些表达式使用变量而不是文本动态引用字段名称。 这将导致渲染和标注引擎难以检测渲染所需的字段。 此功能允许您使用列表明确表示必填字段。 您还可以使用通配符请求全部或部分字段。 由于将基于每个要素执行表达式，因此需谨慎使用通配符，尤其是在包含许多要素的图层中。 请求过多的数据可能会导致应用程序性能很差。\n\n**参数**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 将请求字段附加到的要素。\n- **field1**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 请求给定要素的字段名称。 仅列出在表达式中使用所需的字段。 如有必要，您可以使用通配符 `*` 来请求所有字段。 但应该避免这种情况，以防止加载可能对应用程序性能产生负面影响的不必要的数据量。 该值必须是文本文字，不能是变量。\n- **[field2, ..., fieldN]** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 为给定要素请求的字段名称的正在使用的列表。 仅列出在表达式中使用所需的字段。 这些值必须是文本文字，不能是变量。\n\n**返回值**: Null"}},"parametersInfo":{"min":2,"max":-1}},[{"type":"function","name":"feature","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#feature1","description":"创建新要素。","examples":"\n**示例**\n\n\n\n```arcade\nFeature(pointGeometry, 'city_name', 'Spokane', 'population', 210721)\n```\n\n","completion":{"label":"Feature","detail":"Feature(inputGeometry, attribute1, value1, [attribute2, value2, ..., attributeN, valueN]?) -> Feature","insertText":"Feature(${1:inputGeometry_}, ${2:attribute1_}, ${3:value1_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n创建新要素。\n\n**参数**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - 要素的几何。\n- **attribute1**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 第一个属性的名称。\n- **value1**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 第一个属性的值。\n- **[attribute2, value2, ..., attributeN, valueN]** (_Optional_): [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 要素中每个属性正在使用的名称/值对。\n\n**返回值**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature)"}},"parametersInfo":{"min":3,"max":-1}},{"type":"function","name":"feature","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#feature2","description":"根据序列化的 JSON 字符串创建新要素。","examples":"\n**示例**\n\n\n\n```arcade\nvar JSONString = '{\"geometry\":{\"x\":10,\"y\":20,\"spatialReference\":{\"wkid\":102100}},\"attributes\":{\"hello\":10}}'\nvar ftr1 = Feature(JSONString)\n```\n\n","completion":{"label":"Feature","detail":"Feature(jsonText) -> Feature","insertText":"Feature(${1:jsonText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n根据序列化的 JSON 字符串创建新要素。\n\n**参数**\n\n- **jsonText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 表示要素的序列化 JSON。\n\n**返回值**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"feature","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#feature3","description":"根据几何和属性字典创建新要素。","examples":"\n**示例**\n\n\n\n```arcade\nvar dict = { hello:10 }\nvar p = point({x:10, y:20, spatialReference:{wkid:102100}})\nvar ftr = Feature(p,dict)\n```\n\n","completion":{"label":"Feature","detail":"Feature(inputGeometry, attributes) -> Feature","insertText":"Feature(${1:inputGeometry_}, ${2:attributes_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n根据几何和属性字典创建新要素。\n\n**参数**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - 要素的几何。\n- **attributes**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 包含属性及其值的字典。\n\n**返回值**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"feature","bundle":"core","sinceVersion":"1.23","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#feature4","description":"根据字典创建新要素。","examples":"\n**示例**\n\n根据字典创建新要素\n\n```arcade\nvar featureDict = {\n  geometry: Point({ x: -97.06138, y: 32.837, spatialReference: { wkid: 3857 } }),\n  attributes: {\n    name1: \"value1\",\n    name2: \"value2\"\n  }\n};\n// create a new feature from a dictionary of geometry and attributes\nvar newFeature = Feature(featureDict);\n```\n\n","completion":{"label":"Feature","detail":"Feature(inputDictionary) -> Feature","insertText":"Feature(${1:inputDictionary_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.23](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n根据字典创建新要素。\n\n**参数**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 具有要素几何和属性的字典。\n\n  - **geometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 要素的几何。 如果 `geometry` 为 Dictionary，则将使用 `Geometry` 函数构造一个新的 Geometry。 如果字典中的 `geometry` 为空或缺失，则将使用 `null` 几何创建 Feature。\n  - **attributes**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 包含属性及其值的字典。\n\n**返回值**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"feature","bundle":"core","sinceVersion":"1.23","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#feature5","description":"创建要素的副本。","examples":"\n**示例**\n\n创建要素的副本\n\n```arcade\nvar copiedFeature = Feature($feature);\n```\n\n","completion":{"label":"Feature","detail":"Feature(inputFeature) -> Feature","insertText":"Feature(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.23](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n创建要素的副本。\n\n**参数**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 要复制的要素\n\n**返回值**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature)"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"featureinfilter","bundle":"core","sinceVersion":"1.29","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#featureinfilter","description":"指示给定要素是否包含在提供的 SQL where 子句中。 如果提供的要素包含在 where 子句中，则函数返回 true，否则，返回 false。 此函数对于测试要素是否满足特定条件非常有用。 如果输入要素为 null，则函数返回 false。 如果 whereClause 为 null 或空，则函数返回 true。 如果两个参数均为 null，则函数返回 false。","examples":"\n**示例**\n\n如果要素包含在提供的 SQL where 子句中，则函数返回 true。\n\n```arcade\n// The provided feature has a 'magnitude' field with a value of 5.2\nif(FeatureInFilter($feature, 'magnitude >= 5')) {\n  return 'Significant earthquake';\n}\nreturn 'Minor earthquake';\n```\n\n","completion":{"label":"FeatureInFilter","detail":"FeatureInFilter(inputFeature, whereClause) -> Boolean","insertText":"FeatureInFilter(${1:inputFeature_}, ${2:whereClause_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.29](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n指示给定要素是否包含在提供的 SQL where 子句中。 如果提供的要素包含在 where 子句中，则函数返回 true，否则，返回 false。 此函数对于测试要素是否满足特定条件非常有用。 如果输入要素为 null，则函数返回 false。 如果 whereClause 为 null 或空，则函数返回 true。 如果两个参数均为 null，则函数返回 false。\n\n**参数**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 要检查的要素。\n- **whereClause**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - SQL where 子句(用于测试要素是否包含在其中)。 无效 SQL where 子句将导致错误。 接受标准化 SQL-92。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"gdbversion","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#gdbversion","description":"返回分支或版本化数据的当前地理数据库版本的名称。 当数据不在多用户地理数据库中时，将返回一个空文本值。","examples":"\n**示例**\n\n返回给定要素的地理数据库版本\n\n```arcade\nGdbVersion($feature)\n```\n\n","completion":{"label":"GdbVersion","detail":"GdbVersion(inputFeature) -> Text","insertText":"GdbVersion(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回分支或版本化数据的当前地理数据库版本的名称。 当数据不在多用户地理数据库中时，将返回一个空文本值。\n\n**参数**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 从中返回关联图层的当前地理数据库版本的要素。\n\n**返回值**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)\n\n**其他资源**\n\n* [Overview of Versioning](https://pro.arcgis.com/en/pro-app/help/data/geodatabases/overview/overview-of-versioning-in-arcgis-pro.htm)\n"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"haskey","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#haskey","description":"指示要素是否具有输入键。","examples":"\n**示例**\n\n如果该要素具有名为“temp”的字段，则返回“true”\n\n```arcade\nHasKey($feature, 'temp');\n```\n\n","completion":{"label":"HasKey","detail":"HasKey(inputFeature, key) -> Boolean","insertText":"HasKey(${1:inputFeature_}, ${2:key_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n指示要素是否具有输入键。\n\n**参数**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 要检查字段名的要素。\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 要检查的字段名。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"hasvalue","bundle":"core","sinceVersion":"1.20","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#hasvalue","description":"指示要素是否具有给定字段，以及该字段是否有值。","examples":"\n**示例**\n\n如果要素属性不存在或为空，则返回 false\n\n```arcade\nif(HasValue($feature, \"population\")){\n  return $feature.population / AreaGeodetic($feature)\n}\n// Returns the population density if population is available\n```\n\n","completion":{"label":"HasValue","detail":"HasValue(inputFeature, fieldName) -> Boolean","insertText":"HasValue(${1:inputFeature_}, ${2:fieldName_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.20](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n指示要素是否具有给定字段，以及该字段是否有值。\n\n**参数**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 要检查的要素。\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 要检查的字段名。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"schema","bundle":"core","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#schema","description":"返回所提供要素的方案描述。","examples":"","completion":{"label":"Schema","detail":"Schema(inputFeature) -> Dictionary","insertText":"Schema(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回所提供要素的方案描述。\n\n**参数**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 具有要返回方案的 Feature。\n\n**返回值**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)  \n返回以下属性描述的字典。\n\n- **fields**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)&gt; - 返回用于描述 Feature 中字段的字典数组。 每个字典将描述字段 `name`、`alias`、`type`、`subtype`、`domain`、`length`，以及其是否为 `editable` 和 `nullable`。\n- **geometryType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Feature 中要素的几何类型。 为没有几何的表返回 `esriGeometryNull`。  \n可能的值为：`esriGeometryPoint`、`esriGeometryLine`、`esriGeometryPolygon`、`esriGeometryNull`\n- **globalIdField**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Feature 的全局 ID 字段。 如果未启用 globalId，则将返回 `\"\"`。\n- **objectIdField**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Feature 的 objectId 字段。"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"subtypecode","bundle":"core","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#subtypecode","description":"返回给定要素的子类型编码。","examples":"\n**示例**\n\n返回子类型编码。\n\n```arcade\n// feature has a field named `assetGroup`\n// with the subtype described in the Subtypes function example\nSubtypeCode($feature)  // returns 1\n```\n\n","completion":{"label":"SubtypeCode","detail":"SubtypeCode(inputFeature) -> Number,Text,Date","insertText":"SubtypeCode(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回给定要素的子类型编码。\n\n**参数**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于获取子类型编码的要素。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Date](https://developers.arcgis.com/arcade/guide/types/#date)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"subtypename","bundle":"core","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#subtypename","description":"返回给定要素的子类型名称。","examples":"\n**示例**\n\n返回子类型名称。\n\n```arcade\n// feature has a field named `assetGroup`\n// with the subtype described in the Subtypes function example\nSubtypeName($feature) // returns \"Single Phase\"\n```\n\n","completion":{"label":"SubtypeName","detail":"SubtypeName(inputFeature) -> Text","insertText":"SubtypeName(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回给定要素的子类型名称。\n\n**参数**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于获取子类型名称的要素。\n\n**返回值**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"subtypes","bundle":"core","sinceVersion":"1.11","link":"https://developers.arcgis.com/arcade/function-reference/feature_functions/#subtypes","description":"返回子类型编码值字典。 当未在图层上启用子类型时，将返回 `null`。","examples":"\n**示例**\n\n返回包含要素编码值的子类型。\n\n```arcade\nSubtypes($feature)\n// returns the following dictionary\n// {\n//   subtypeField: 'assetGroup',\n//   subtypes: [\n//     { name: \"Unknown\", code: 0 },\n//     { name: \"Single Phase\", code: 1 },\n//     { name: \"Two Phase\", code: 2 }\n//   ]\n// }\n```\n\n","completion":{"label":"Subtypes","detail":"Subtypes(inputFeature) -> Dictionary","insertText":"Subtypes(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.11](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回子类型编码值字典。 当未在图层上启用子类型时，将返回 `null`。\n\n**参数**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于获取子类型的要素。\n\n**返回值**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)  \n返回以下属性描述的字典。\n\n- **subtypeField**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 包含子类型的字段。\n- **subtypes**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)&gt; - 用于描述子类型的字典数组。 每个字典都有一个 `code` 属性，其中包含实际的字段值， 和一个 `name` 属性，其中包含对值的简明易懂的描述（例如 `{ code: 1, name: \"pavement\" }`）。"}},"parametersInfo":{"min":1,"max":1}}]},{"id":"dictionary_functions","title":"字典函数","items":[[{"type":"function","name":"defaultvalue","bundle":"core","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#defaultvalue1","description":"如果字典中的键不存在，或指定键处的值为 `null` 或空文本值，则返回指定默认值。","examples":"\n**示例**\n\nDefaultValue 返回定义的值\n\n```arcade\nvar data = {\n  time: Date(2024, 0, 24, 12),\n  weather: {\n    precipitation: {\n      type: \"rain\",\n      value: 0.4,\n      unit: \"inches\"\n    },\n    temperature: {\n      value: 50,\n      unit: \"f\"\n    },\n    conditions: {\n      description: \"Overcast\"\n    }\n  }\n}\n\nDefaultValue(data, \"time\", \"No time logged\")\n// value of data.time is defined, so it is returned\n// returns Jan 24, 2024, 12:00:00 PM system time\n```\n\n如果指定键出没有值，则 DefaultValue 返回默认值。\n\n```arcade\nvar data = {\n  time: '',\n  weather: {\n    precipitation: {\n      type: \"rain\",\n      value: 0.4,\n      unit: \"inches\"\n    },\n    temperature: {\n      value: 50,\n      unit: \"f\"\n    },\n    conditions: {\n      description: \"Overcast\"\n    }\n  }\n}\n\nDefaultValue(data, \"time\", \"No time logged\")\n// value of data.time is empty, so the default is returned\n// returns \"No time logged\"\n```\n\n如果键不存在，则 DefaultValue 返回默认值。\n\n```arcade\nvar data = {\n  time: ''\n}\n\nDefaultValue(data, \"conditions\", \"n/a\")\n// the conditions key does not exist, so the default is returned\n// returns \"n/a\"\n```\n\n","completion":{"label":"DefaultValue","detail":"DefaultValue(inputDictionary, key, defaultValue) -> Any","insertText":"DefaultValue(${1:inputDictionary_}, ${2:key_}, ${3:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n如果字典中的键不存在，或指定键处的值为 `null` 或空文本值，则返回指定默认值。\n\n**参数**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \\| [Attachment](https://developers.arcgis.com/arcade/guide/types/#attachment) - 要检查的字典或附件。\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 要检查的键。\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 如果键不存在，或指定键处的值为 `null` 或空文本值，则返回该值。\n\n**返回值**: [Any](https://developers.arcgis.com/arcade/guide/types/#any)  \n如果已定义，则返回指定键处的值。 否则，返回 `defaultValue` 中指定的值。"}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"defaultvalue","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#defaultvalue2","description":"如果嵌套字典中至少一个键不存在，或指定键处的值为 `null` 或空文本值，则返回指定默认值。","examples":"\n**示例**\n\nDefaultValue 返回定义的值\n\n```arcade\nvar data = {\n  time: Date(2024, 0, 24, 12),\n  weather: {\n    precipitation: {\n      type: \"rain\",\n      value: 0.4,\n      unit: \"inches\"\n    },\n    temperature: {\n      value: 50,\n      unit: \"f\"\n    },\n    conditions: {\n      description: \"Overcast\"\n    }\n  }\n}\n\nDefaultValue(data, [\"weather\", \"precipitation\", \"value\"], \"No time logged\")\n// value of data.weather.precipitation.value is defined, so it is returned\n// returns 0.4\n```\n\n如果指定键出没有值，则 DefaultValue 返回默认值。\n\n```arcade\nvar data = {\n  time: Date(2024, 0, 24, 12),\n  weather: {\n    precipitation: {\n      type: \"rain\",\n      value: null,\n      unit: \"inches\"\n    },\n    temperature: {\n      value: 50,\n      unit: \"f\"\n    },\n    conditions: {\n      description: \"Overcast\"\n    }\n  }\n}\n\nDefaultValue(data, [\"weather\", \"precipitation\", \"value\"], 0)\n// value of data.weather.precipitation.value is null, so the default is returned\n// returns 0\n```\n\n如果键不存在，则 DefaultValue 返回默认值。\n\n```arcade\nvar data = {\n  time: Date(2024, 0, 24, 12),\n  weather: {\n    precipitation: {\n      type: \"rain\",\n      value: null,\n      unit: \"inches\"\n    },\n    temperature: {\n      value: 50,\n      unit: \"f\"\n    },\n    conditions: {\n      description: \"Overcast\"\n    }\n  }\n}\n\nDefaultValue(data, [\"weather\", \"wind\", \"value\"], \"n/a\")\n// the data.weather.wind key does not exist, so the default is returned\n// returns \"n/a\"\n```\n\n检查包含键的字典中的数组内是否存在空值\n\n```arcade\nvar data = {\n  time: Date(2024, 0, 24, 12),\n  interval: 1,\n  intervalUnit: \"days\",\n  weather: {\n    precipitation: {\n      type: \"rain\",\n      values: [0.4, 0, 0, null, 0.1, 0.8, 1],\n      unit: \"inches\"\n    },\n    temperature: {\n      values: [50, 50, 51, 52, 55, 49, 51],\n      unit: \"f\"\n    },\n  }\n}\n\nDefaultValue(data, [\"weather\", \"precipitation\", \"values\", 3], 0)\n// the value data.weather.precipitation.values[3] is null, so the default is returned\n// returns 0\n```\n\n","completion":{"label":"DefaultValue","detail":"DefaultValue(inputDictionary, keys, defaultValue) -> Any","insertText":"DefaultValue(${1:inputDictionary_}, ${2:keys_}, ${3:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n如果嵌套字典中至少一个键不存在，或指定键处的值为 `null` 或空文本值，则返回指定默认值。\n\n**参数**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \\| [Attachment](https://developers.arcgis.com/arcade/guide/types/#attachment) - 要检查的字典或附件。\n- **keys**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)&gt; - 要在容器结构的每个层级中检查的键或索引数组。\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 如果至少一个键或索引不存在，或指定键处的值为 `null` 或空文本值，则返回该值。\n\n**返回值**: [Any](https://developers.arcgis.com/arcade/guide/types/#any)  \n如果已定义，则返回指定键或索引处的值。 否则，返回 `defaultValue` 中指定的值。"}},"parametersInfo":{"min":3,"max":3}}],[{"type":"function","name":"dictionary","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#dictionary1","description":"根据提供的参数返回一个新字典。 参数为名称/值对。例如 dictionary('field1',val,'field2',val2,...)。","examples":"\n**示例**\n\n输出 3\n\n```arcade\nvar d = Dictionary('field1', 1, 'field2', 2)\nreturn d.field1 + d.field2\n```\n\n","completion":{"label":"Dictionary","detail":"Dictionary([name1, value1, ..., nameN, valueN]?) -> Dictionary","insertText":"Dictionary($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n根据提供的参数返回一个新字典。 参数为名称/值对。例如 dictionary('field1',val,'field2',val2,...)。\n\n**参数**\n\n- **[name1, value1, ..., nameN, valueN]** (_Optional_): [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 正在使用的名称/值对。\n\n**返回值**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)"}},"parametersInfo":{"min":0,"max":-1}},{"type":"function","name":"dictionary","bundle":"core","sinceVersion":"1.8","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#dictionary2","description":"将 JSON 文本反序列化为 Arcade 字典。","examples":"\n**示例**\n\n将 JSON 反序列化为字典。\n\n```arcade\nvar extraInfo = '{\"id\": 1, \"population\": 200, \"city\": \"Spencer, ID\"}'\nvar spencerIDdata = Dictionary(extraInfo)\nspencerIDdata.population // Returns 200\n```\n\n","completion":{"label":"Dictionary","detail":"Dictionary(jsonText) -> Dictionary","insertText":"Dictionary(${1:jsonText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.8](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n将 JSON 文本反序列化为 Arcade 字典。\n\n**参数**\n\n- **jsonText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 要转换为 Arcade 字典的 JSON。 这必须序列化为文本值。\n\n**返回值**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"dictionary","bundle":"geometry","sinceVersion":"1.23","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#dictionary3","description":"将几何值转换为字典。","examples":"\n**示例**\n\n更新点几何的 x 属性。\n\n```arcade\n// convert the $feature's geometry to a dictionary\nif (TypeOf(Geometry($feature)) == \"Point\") {\n  var ptDict = Dictionary(Geometry($feature));\n  ptDict.x *= 2; // stretch horizontally\n  // create a new geometry from the updated dictionary\n  return Geometry(ptDict);\n}\n```\n\n","completion":{"label":"Dictionary","detail":"Dictionary(inputGeometry) -> Dictionary","insertText":"Dictionary(${1:inputGeometry_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.23](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n将几何值转换为字典。\n\n**参数**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - 要转换为 Arcade 字典的几何。 从 1.25 版本开始，在 ArcGIS Pro 和 ArcGIS Maps SDKs for Native Apps 中执行时，面或折线输入可能包含曲线对象。\n\n**返回值**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"dictionary","bundle":"core","sinceVersion":"1.23","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#dictionary4","description":"将要素转换为字典。","examples":"\n**示例**\n\n将要素转换为字典\n\n```arcade\n// convert $feature to a dictionary\nvar featureDict = Dictionary($feature);\n```\n\n","completion":{"label":"Dictionary","detail":"Dictionary(inputFeature) -> Dictionary","insertText":"Dictionary(${1:inputFeature_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.23](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n将要素转换为字典。\n\n**参数**\n\n- **inputFeature**: [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 要转换为 Arcade 字典的要素。\n\n**返回值**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"dictionary","bundle":"core","sinceVersion":"1.23","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#dictionary5","description":"创建字典的浅拷贝或深拷贝。","examples":"\n**示例**\n\n创建字典的浅拷贝\n\n```arcade\nvar inputDict = {\n  company: {\n    name: \"Esri\",\n    location: \"Redlands, CA\"\n  },\n  office: \"M123\"\n};\nvar copiedDict = Dictionary(inputDict);\nreturn inputDict.company == copiedDict.company\n// returns true\n// this is a shallow copy of the Dictionary, so the dictionaries share the same references\n```\n\n创建字典的深拷贝\n\n```arcade\nvar deepCopy = Dictionary(inputDict, true);\nreturn inputDict.company == deepCopy.company\n// returns false\n// this is a deep copy of the Dictionary, so the dictionaries do NOT share the same references\n```\n\n","completion":{"label":"Dictionary","detail":"Dictionary(inputDictionary, deep?) -> Dictionary","insertText":"Dictionary(${1:inputDictionary_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.23](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n创建字典的浅拷贝或深拷贝。\n\n**参数**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 要复制的字典。\n- **deep** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 如果为 `true`，则将创建字典的深拷贝，这意味着输出字典的属性将不会与输入字典共享相同的参考。 默认值为 `false`。\n\n**返回值**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"dictionary","bundle":"core","sinceVersion":"1.30","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#dictionary6","description":"将体素转换为字典。","examples":"\n**示例**\n\n将体素转换为字典\n\n```arcade\n// convert $voxel to a dictionary\nvar voxelDict = Dictionary($voxel);\n```\n\n","completion":{"label":"Dictionary","detail":"Dictionary(inputVoxel) -> Dictionary","insertText":"Dictionary(${1:inputVoxel_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.30](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n将体素转换为字典。\n\n**参数**\n\n- **inputVoxel**: [Voxel](https://developers.arcgis.com/arcade/guide/types/#voxel) - 要转换为 Arcade 字典的体素。\n\n**返回值**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"fromjson","bundle":"core","sinceVersion":"1.14","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#fromjson","description":"将 JSON 文本反序列化为其等效 Arcade 数据类型。","examples":"\n**示例**\n\n将文本转换为布尔值\n\n```arcade\nFromJSON(\"true\")\n// Returns true\n```\n\n将文本转换为数值\n\n```arcade\nfromJSON(\"731.1\")\n// returns 731.1\n```\n\n将文本转换为字典\n\n```arcade\nvar d = fromJSON('{\"kids\": 3, \"adults\": 4 }')\nd.kids + d.adults\n// returns 7\n```\n\n将文本转换为数组\n\n```arcade\nfromJSON('[\"one\", 2, \"three\", false]')\n// returns [ \"one\", 2, \"three\", false ]\n```\n\n将文本转换为空值\n\n```arcade\nfromJSON(\"null\")\n// returns null\n```\n\n","completion":{"label":"FromJSON","detail":"FromJSON(jsonText) -> Dictionary,Array<Any>,Text,Boolean,Number","insertText":"FromJSON(${1:jsonText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.14](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n将 JSON 文本反序列化为其等效 Arcade 数据类型。\n\n**参数**\n\n- **jsonText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 要反序列化为 Arcade 数据类型的 JSON 文本。\n\n**返回值**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"haskey","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#haskey","description":"指示字典是否具有输入键。","examples":"\n**示例**\n\n输出 `true`\n\n```arcade\nvar d = Dictionary('Port Hope', 16214,  'Grafton', '<1000', 'Cobourg', 18519);\nHasKey(d, 'Cobourg');\n```\n\n","completion":{"label":"HasKey","detail":"HasKey(inputDictionary, key) -> Boolean","insertText":"HasKey(${1:inputDictionary_}, ${2:key_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n指示字典是否具有输入键。\n\n**参数**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 要检查键的字段。\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 要检查的键。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}},[{"type":"function","name":"hasvalue","bundle":"core","sinceVersion":"1.20","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#hasvalue1","description":"指示字典是否具有给定键以及该键是否具有值。","examples":"\n**示例**\n\n具有值的键的字典\n\n```arcade\nvar d = Dictionary('Port Hope', 16214,  'Grafton', '<1000', 'Cobourg', 18519);\nHasValue(d, 'Cobourg');\n// returns true\n```\n\n具有没有值的键的字典\n\n```arcade\nvar d = Dictionary('Port Hope', 16214,  'Grafton', '<1000', 'Cobourg', null);\nHasValue(d, 'Cobourg');\n// returns false\n```\n\n没有提供键的字典\n\n```arcade\nvar d = Dictionary('Port Hope', 16214,  'Grafton', '<1000');\nHasValue(d, 'Cobourg');\n// returns false\n```\n\n没有提供键的字典\n\n```arcade\nif ( HasValue( Schema($feature).fields[0], \"domain\" ) ) {\n  // Do something with the value if true\n}\n```\n\n","completion":{"label":"HasValue","detail":"HasValue(inputDictionary, key) -> Boolean","insertText":"HasValue(${1:inputDictionary_}, ${2:key_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.20](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n指示字典是否具有给定键以及该键是否具有值。\n\n**参数**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \\| [Attachment](https://developers.arcgis.com/arcade/guide/types/#attachment) - 要检查的字典或附件。\n- **key**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 要检查的密匙或字段名称。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"hasvalue","bundle":"core","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#hasvalue2","description":"检查字典中嵌套多个层级的属性是否存在值。 这允许您一步深入到嵌套结构中，而不是检查每个层级中的值。 如果结构的每个层级中均存在键和索引且包含非空值，则返回 `true`。","examples":"\n**示例**\n\n检查具有检查值的键的字典\n\n```arcade\nvar data = {\n  time: Date(2024, 0, 24, 12),\n  weather: {\n    precipitation: {\n      type: \"rain\",\n      value: 0.4,\n      unit: \"inches\"\n    },\n    temperature: {\n      value: 50,\n      unit: \"f\"\n    },\n    conditions: {\n      description: \"Overcast\"\n    }\n  }\n}\n\nif(HasValue(data, [\"weather\",\"precipitation\",\"value\"])){\n  // if() evaluates to true, thus executing the return\n  return data.weather.precipitation.value;\n}\n```\n\n检查包含不存在的键的字典中的值\n\n```arcade\nvar data = {\n  time: Date(2024, 0, 24, 12),\n  weather: {\n    precipitation: {\n      type: \"rain\",\n      value: 0.4,\n      unit: \"inches\"\n    },\n    temperature: {\n      value: 50,\n      unit: \"f\"\n    },\n    conditions: {\n      description: \"Overcast\"\n    }\n  }\n}\n\nif(HasValue(data, [\"weather\",\"precipitation\",\"values\", 0])){\n  // if() evaluates to false (\"values\" does not exist), thus avoiding the block\n  return data.weather.precipitation.values;\n}\n```\n\n检查包含存在键的字典中的数组内的值\n\n```arcade\nvar data = {\n  time: Date(2024, 0, 24, 12),\n  interval: 1,\n  intervalUnit: \"days\",\n  weather: {\n    precipitation: {\n      type: \"rain\",\n      values: [0.4, 0, 0, null, 0.1, 0.8, 1],\n      unit: \"inches\"\n    },\n    temperature: {\n      values: [50, 50, 51, 52, 55, 49, 51],\n      unit: \"f\"\n    },\n  }\n}\n\nif(HasValue(data, [\"weather\",\"precipitation\",\"values\", 6])){\n  // if() evaluates to true, thus executing the return\n  return data.weather.precipitation.values[6];\n}\n```\n\n","completion":{"label":"HasValue","detail":"HasValue(inputDictionary, keys) -> Boolean","insertText":"HasValue(${1:inputDictionary_}, ${2:keys_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n检查字典中嵌套多个层级的属性是否存在值。 这允许您一步深入到嵌套结构中，而不是检查每个层级中的值。 如果结构的每个层级中均存在键和索引且包含非空值，则返回 `true`。\n\n**参数**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \\| [Attachment](https://developers.arcgis.com/arcade/guide/types/#attachment) - 要检查的字典或附件。\n- **keys**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)&gt; - 要在结构的每个层级中检查的键或索引数组。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}}]]},{"id":"math_functions","title":"数学函数","items":[{"type":"function","name":"abs","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#abs","description":"返回数的绝对值。 如果输入为 `null`，则将返回 0。","examples":"\n**示例**\n\n输出 3\n\n```arcade\nAbs(-3)\n```\n\n","completion":{"label":"Abs","detail":"Abs(value) -> Number","insertText":"Abs(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回数的绝对值。 如果输入为 `null`，则将返回 0。\n\n**参数**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要对其执行运算的数字。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"acos","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#acos","description":"返回以弧度表示的输入值的反余弦值，范围为 0 到 PI。 如果输入值超出 +/- 1 的适当范围，则返回 NaN。","examples":"\n**示例**\n\n输出 1.266104\n\n```arcade\nAcos(0.3)\n```\n\n","completion":{"label":"Acos","detail":"Acos(value) -> Number","insertText":"Acos(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回以弧度表示的输入值的反余弦值，范围为 0 到 PI。 如果输入值超出 +/- 1 的适当范围，则返回 NaN。\n\n**参数**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要对其执行运算的数字，范围介于 -1 和 1 之间。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"asin","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#asin","description":"返回以弧度表示的输入值的反正弦值，范围为 -PI/2 和 PI/2。 如果输入值超出 +/- 1 的适当范围，则返回 NaN。","examples":"\n**示例**\n\n输出 0.304693\n\n```arcade\nAsin(0.3)\n```\n\n","completion":{"label":"Asin","detail":"Asin(value) -> Number","insertText":"Asin(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回以弧度表示的输入值的反正弦值，范围为 -PI/2 和 PI/2。 如果输入值超出 +/- 1 的适当范围，则返回 NaN。\n\n**参数**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要对其执行运算的数字，范围介于 -1 和 1 之间。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"atan","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#atan","description":"返回输入值的反正切，单位为弧度，范围为 -PI/2 至 PI/2。","examples":"\n**示例**\n\n输出 0.785398\n\n```arcade\nAtan(1)\n```\n\n","completion":{"label":"Atan","detail":"Atan(value) -> Number","insertText":"Atan(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回输入值的反正切，单位为弧度，范围为 -PI/2 至 PI/2。\n\n**参数**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要对其执行运算的数字。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"atan2","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#atan2","description":"返回输入值的商的反正切，单位为弧度，范围为 -PI 至 0 或 0 至 PI (取决于参数的符号)。","examples":"\n**示例**\n\n输出 -2.356194\n\n```arcade\nAtan2(-1, -1)\n```\n\n","completion":{"label":"Atan2","detail":"Atan2(y, x) -> Number","insertText":"Atan2(${1:y_}, ${2:x_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回输入值的商的反正切，单位为弧度，范围为 -PI 至 0 或 0 至 PI (取决于参数的符号)。\n\n**参数**\n\n- **y**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 表示 y 坐标的数字。\n- **x**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 表示 x 坐标的数字。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},[{"type":"function","name":"average","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#average1","description":"返回数字数组的平均值。","examples":"\n**示例**\n\n打印 5\n\n```arcade\nvar values = [0,5,10]\nAverage(values)\n```\n\n","completion":{"label":"Average","detail":"Average(numbers) -> Number","insertText":"Average(${1:numbers_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回数字数组的平均值。\n\n**参数**\n\n- **numbers**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Number](https://developers.arcgis.com/arcade/guide/types/#number)&gt; - 要对其执行操作的数字数组。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"average","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#average2","description":"返回一系列数字的平均值。","examples":"\n**示例**\n\n打印 5\n\n```arcade\nAverage(0,5,10)\n```\n\n","completion":{"label":"Average","detail":"Average([number1, ..., numberN]?) -> Number","insertText":"Average($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回一系列数字的平均值。\n\n**参数**\n\n- **[number1, ..., numberN]** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要对其执行操作的数字列表。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":-1}}],{"type":"function","name":"ceil","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#ceil","description":"返回输入值，向上四舍五入至给定的小数位数。","examples":"\n**示例**\n\n输出 2135.1\n\n```arcade\nCeil(2135.0905, 2)\n```\n\n","completion":{"label":"Ceil","detail":"Ceil(value, numPlaces?) -> Number","insertText":"Ceil(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回输入值，向上四舍五入至给定的小数位数。\n\n**参数**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要向上四舍五入的数字。\n- **numPlaces** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 对 `value` 四舍五入到的小数位数。 默认值为 0。 尾随零将被去掉。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"constrain","bundle":"core","sinceVersion":"1.2","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#constrain","description":"将给定输入 `value` 限制在下限与上限范围内。 例如，如果输入值为 `10`，下限为 `50`，上限为 `100`，则返回 `50`。","examples":"\n**示例**\n\n返回 5\n\n```arcade\nConstrain(5, 0, 10)\n```\n\n返回 0\n\n```arcade\nConstrain(-3, 0, 10)\n```\n\n返回 10\n\n```arcade\nConstrain(553, 0, 10)\n```\n\n","completion":{"label":"Constrain","detail":"Constrain(value, lowerBound, upperBound) -> Number","insertText":"Constrain(${1:value_}, ${2:lowerBound_}, ${3:upperBound_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.2](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n将给定输入 `value` 限制在下限与上限范围内。 例如，如果输入值为 `10`，下限为 `50`，上限为 `100`，则返回 `50`。\n\n**参数**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 限制在给定 `min` 和 `max` 范围内的值。\n- **lowerBound**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 限制输入 `value` 所依据的下限。 如果给定值小于 `min`，则返回 `min`。\n- **upperBound**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 限制输入 `value` 所依据的上限。 如果给定值大于 `max`，则返回 `max`。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"cos","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#cos","description":"返回输入值的余弦，单位为弧度。","examples":"\n**示例**\n\n输出 0.540302\n\n```arcade\nCos(1)\n```\n\n","completion":{"label":"Cos","detail":"Cos(value) -> Number","insertText":"Cos(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回输入值的余弦，单位为弧度。\n\n**参数**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要对其执行运算的数字，单位为弧度。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"exp","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#exp","description":"返回 e 的 x 幂值，其中 e 是自然对数的底数，为 `2.718281828`。","examples":"\n**示例**\n\n输出 7.389056\n\n```arcade\nExp(2)\n```\n\n","completion":{"label":"Exp","detail":"Exp(x) -> Number","insertText":"Exp(${1:x_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回 e 的 x 幂值，其中 e 是自然对数的底数，为 `2.718281828`。\n\n**参数**\n\n- **x**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 幂或者 `e` 自乘的次数。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"floor","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#floor","description":"返回输入值，向下四舍五入至给定的小数位数。","examples":"\n**示例**\n\n输出 2316.25\n\n```arcade\nFloor(2316.2562, 2)\n```\n\n","completion":{"label":"Floor","detail":"Floor(value, numPlaces?) -> Number","insertText":"Floor(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回输入值，向下四舍五入至给定的小数位数。\n\n**参数**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要向下四舍五入的数字。\n- **numPlaces** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 对数字四舍五入到的小数位数。 默认值为 0。 尾随零将被去掉。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"hash","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#hash","description":"生成给定变量的哈希编码值。","examples":"\n**示例**\n\n返回 `1649420691`。\n\n```arcade\nHash('text value')\n```\n\n","completion":{"label":"Hash","detail":"Hash(value) -> Number","insertText":"Hash(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n生成给定变量的哈希编码值。\n\n**参数**\n\n- **value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) \\| [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; \\| [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \\| [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) \\| [Time](https://developers.arcgis.com/arcade/guide/types/#time) - 要进行哈希处理的变量。 自 1.24 版本起，支持 DateOnly 和时间值。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"log","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#log","description":"返回 x 的自然对数(以 e 为底)。","examples":"\n**示例**\n\n输出 2.302585\n\n```arcade\nLog(10)\n```\n\n","completion":{"label":"Log","detail":"Log(x) -> Number","insertText":"Log(${1:x_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回 x 的自然对数(以 e 为底)。\n\n**参数**\n\n- **x**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要对其执行运算的数字。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"max","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#max1","description":"返回数字数组中的最大值。","examples":"\n**示例**\n\n输出 89\n\n```arcade\nMax([23,56,89])\n```\n\n","completion":{"label":"Max","detail":"Max(numbers) -> Number","insertText":"Max(${1:numbers_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回数字数组中的最大值。\n\n**参数**\n\n- **numbers**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Number](https://developers.arcgis.com/arcade/guide/types/#number)&gt; - 数字数组。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"max","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#max2","description":"返回一系列数字中的最大值。","examples":"\n**示例**\n\n打印 120\n\n```arcade\nMax(23,5,120,43,9)\n```\n\n","completion":{"label":"Max","detail":"Max([number1, ..., numberN]?) -> Number","insertText":"Max($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回一系列数字中的最大值。\n\n**参数**\n\n- **[number1, ..., numberN]** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 数字列表。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":-1}}],[{"type":"function","name":"mean","bundle":"core","sinceVersion":"1.1","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#mean1","description":"返回数字数组的平均值。","examples":"\n**示例**\n\n\n\n```arcade\nvar values = [1,2,3,4,5,6,7,8,9];\nMean(values);\n// returns 5\n```\n\n","completion":{"label":"Mean","detail":"Mean(numbers) -> Number","insertText":"Mean(${1:numbers_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.1](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回数字数组的平均值。\n\n**参数**\n\n- **numbers**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Number](https://developers.arcgis.com/arcade/guide/types/#number)&gt; - 从中计算平均值的数字数组。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"mean","bundle":"core","sinceVersion":"1.1","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#mean2","description":"返回一系列数字的平均值。","examples":"\n**示例**\n\n\n\n```arcade\nMean(1,2,3,4,5,6,7,8,9);\n// returns 5\n```\n\n","completion":{"label":"Mean","detail":"Mean([number1, ..., numberN]?) -> Number","insertText":"Mean($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.1](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回一系列数字的平均值。\n\n**参数**\n\n- **[number1, ..., numberN]** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 从中计算平均值的数字列表。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":-1}}],[{"type":"function","name":"min","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#min1","description":"返回给定数字数组内的最小值。","examples":"\n**示例**\n\n输出 23\n\n```arcade\nMin([23,56,89])\n```\n\n","completion":{"label":"Min","detail":"Min(numbers) -> Number","insertText":"Min(${1:numbers_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回给定数字数组内的最小值。\n\n**参数**\n\n- **numbers**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Number](https://developers.arcgis.com/arcade/guide/types/#number)&gt; - 数字数组。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"min","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#min2","description":"返回一系列给定数字内的最小值。","examples":"\n**示例**\n\n打印 5\n\n```arcade\nMin(23,5,120,43,9)\n```\n\n","completion":{"label":"Min","detail":"Min([number1, ..., numberN]?) -> Number","insertText":"Min($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回一系列给定数字内的最小值。\n\n**参数**\n\n- **[number1, ..., numberN]** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 数字列表。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":-1}}],{"type":"function","name":"number","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#number","description":"将输入值转换为数字。 日期值将转换为自 1970 年 1 月 1 日(即 Unix 时间)以来的毫秒数。","examples":"\n**示例**\n\n使用适合于执行表达式地区的分组分隔符解析数值\n\n```arcade\nNumber('1,365', ',###') // returns 1365\n```\n\n从数字中删除文本字符。\n\n```arcade\nNumber('abc10def', 'abc##def') // return 10\n```\n\n指定超过 0 的最小位数为 2，最大位数为 4。\n\n```arcade\nNumber('10.456','00.00##') // returns 10.456\n```\n\n指定超过 0 的最小位数为 2，最大位数为 4。 函数的左右两侧必须匹配，否则将返回 NaN。\n\n```arcade\nNumber('10.4','00.00##') // returns NaN\n```\n\n指出重复组的大小以及输入值的最终组的大小。\n\n```arcade\nNumber('12,12,456', ',##,###') // returns 1212456\n```\n\n如果存在负子模式，则仅能指定负的前缀和后缀。\n\n```arcade\nNumber('-12,23,345', ',##,###;-,##,###') // returns -1223345\n```\n\n除以 100。 可输入三个小数位中的最大值。\n\n```arcade\nNumber('99.99%', '#.##%') // 0.9999\n```\n\n返回自 1970 年 1 月 1 日以来的毫秒数。\n\n```arcade\nNumber(Date(1996,11,10)) // returns 850204800000\n```\n\n","completion":{"label":"Number","detail":"Number(value, pattern?) -> Number","insertText":"Number(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n将输入值转换为数字。 日期值将转换为自 1970 年 1 月 1 日(即 Unix 时间)以来的毫秒数。\n\n**参数**\n\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 要转换为数字的值。\n- **pattern** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 用于将本地化上下文中设置了格式的数字从文本值解析为数字的格式模式文本。 以下是用于定义模式的特殊字符：\n\n  - 0：必填数字  \n  - #：选填数字  \n  - %：除以 100  \n\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"pow","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#pow","description":"返回 x 的 y 次幂的值。","examples":"\n**示例**\n\n输出 9\n\n```arcade\nPow(3, 2)\n```\n\n","completion":{"label":"Pow","detail":"Pow(x, y) -> Number","insertText":"Pow(${1:x_}, ${2:y_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回 x 的 y 次幂的值。\n\n**参数**\n\n- **x**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 基础值。\n- **y**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 指数。 表示 `x` 自乘的次数。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"random","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#random","description":"返回一个介于 0 到 1 之间的随机数字。","examples":"\n**示例**\n\n\n\n```arcade\nRandom()\n```\n\n","completion":{"label":"Random","detail":"Random() -> Number","insertText":"Random($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回一个介于 0 到 1 之间的随机数字。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"round","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#round","description":"返回输入值，四舍五入至给定的小数位数。  \n_注意：如果您要格式化标注或弹出窗口中显示的值，请使用“Text()”函数。_","examples":"\n**示例**\n\n输出 2316.26\n\n```arcade\nRound(2316.2562, 2)\n```\n\n","completion":{"label":"Round","detail":"Round(value, numPlaces?) -> Number","insertText":"Round(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回输入值，四舍五入至给定的小数位数。  \n_注意：如果您要格式化标注或弹出窗口中显示的值，请使用“Text()”函数。_\n\n**参数**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要四舍五入的数字。\n- **numPlaces** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 对数字四舍五入到的小数位数。 默认值为 `0`。 尾随零将被去掉。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**其他资源**\n\n* [Text()](https://developers.arcgis.com/arcade/function-reference/text_functions/#text)\n"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"sin","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#sin","description":"返回输入值的正弦。","examples":"\n**示例**\n\n输出 0.841741\n\n```arcade\nSin(1)\n```\n\n","completion":{"label":"Sin","detail":"Sin(value) -> Number","insertText":"Sin(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回输入值的正弦。\n\n**参数**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要对其执行运算的数字，单位为弧度。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"sqrt","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#sqrt","description":"返回数字的平方根。","examples":"\n**示例**\n\n输出 3\n\n```arcade\nSqrt(9)\n```\n\n","completion":{"label":"Sqrt","detail":"Sqrt(value) -> Number","insertText":"Sqrt(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回数字的平方根。\n\n**参数**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要对其计算平方根的数字。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"stdev","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#stdev1","description":"试_Returns the standard deviation (population standard deviation) of an array of numbers____________________________________________验.","examples":"\n**示例**\n\n打印 27.5\n\n```arcade\nStdev([23,56,89,12,45,78])\n```\n\n","completion":{"label":"Stdev","detail":"Stdev(numbers) -> Number","insertText":"Stdev(${1:numbers_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n试_Returns the standard deviation (population standard deviation) of an array of numbers____________________________________________验.\n\n**参数**\n\n- **numbers**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Number](https://developers.arcgis.com/arcade/guide/types/#number)&gt; - 要对其执行操作的数字数组。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"stdev","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#stdev2","description":"返回一系列数字的标准差(人口标准差)。","examples":"\n**示例**\n\n打印 27.5\n\n```arcade\nStdev(23,56,89,12,45,78)\n```\n\n","completion":{"label":"Stdev","detail":"Stdev([number1, ..., numberN]?) -> Number","insertText":"Stdev($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回一系列数字的标准差(人口标准差)。\n\n**参数**\n\n- **[number1, ..., numberN]** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要对其执行操作的数字列表。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":-1}}],[{"type":"function","name":"sum","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#sum1","description":"返回数字数组的总和。","examples":"\n**示例**\n\n打印 303\n\n```arcade\nSum([23,56,89,12,45,78])\n```\n\n","completion":{"label":"Sum","detail":"Sum(numbers) -> Number","insertText":"Sum(${1:numbers_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回数字数组的总和。\n\n**参数**\n\n- **numbers**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Number](https://developers.arcgis.com/arcade/guide/types/#number)&gt; - 要对其执行操作的数字数组。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"sum","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#sum2","description":"返回一系列数字的总和。","examples":"\n**示例**\n\n打印 303\n\n```arcade\nSum(23,56,89,12,45,78)\n```\n\n","completion":{"label":"Sum","detail":"Sum([number1, ..., numberN]?) -> Number","insertText":"Sum($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回一系列数字的总和。\n\n**参数**\n\n- **[number1, ..., numberN]** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要对其执行操作的数字列表。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":-1}}],{"type":"function","name":"tan","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#tan","description":"返回角度的正切，单位为弧度。","examples":"\n**示例**\n\n输出 0.57389\n\n```arcade\nTan(0.521)\n```\n\n","completion":{"label":"Tan","detail":"Tan(value) -> Number","insertText":"Tan(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回角度的正切，单位为弧度。\n\n**参数**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要对其计算正切的数字。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"variance","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#variance1","description":"返回数字数组的方差(人口方差)。","examples":"\n**示例**\n\n打印 756.25\n\n```arcade\nVariance([12,23,45,56,78,89])\n```\n\n","completion":{"label":"Variance","detail":"Variance(numbers) -> Number","insertText":"Variance(${1:numbers_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回数字数组的方差(人口方差)。\n\n**参数**\n\n- **numbers**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Number](https://developers.arcgis.com/arcade/guide/types/#number)&gt; - 要对其执行操作的数字数组。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"variance","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/math_functions/#variance2","description":"返回一系列数字的方差(人口方差)。","examples":"\n**示例**\n\n打印 756.25\n\n```arcade\nVariance(12,23,45,56,78,89)\n```\n\n","completion":{"label":"Variance","detail":"Variance([number1, ..., numberN]?) -> Number","insertText":"Variance($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回一系列数字的方差(人口方差)。\n\n**参数**\n\n- **[number1, ..., numberN]** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要对其执行操作的数字数组。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":-1}}]]},{"id":"array_functions","title":"数组函数","items":[{"type":"function","name":"all","bundle":"core","sinceVersion":"1.16","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#all","description":"指示给定数组中的所有元素是否通过所提供函数的测试。 如果函数为输入数组中的所有项目返回 `true`，则返回 `true`。","examples":"\n**示例**\n\n返回 `false`，因为输入数组中的某些元素没有通过 `isEven` 测试\n\n```arcade\n// isEven is used to test if each element in the array is even\n// it returns true if the element is divisible by two, false if is not\nfunction isEven(value) { return value % 2 == 0 }\n// The isEven function will execute for each element in the array,\n// returning the following values: false, true, false, true, false\n// Since some of the values in the array did not pass the test\n// (return true), the return value will be false\nAll([1,2,3,4,5], isEven)\n```\n\n使用现有的 `isEmpty` Arcade 函数作为 `testFunction`。 这是有效的，因为 `isEmpty` 接受单个参数并返回一个布尔值。 如果所有字段均为空，则此表达式返回 `true`。\n\n```arcade\nvar myArray = [ $feature.field1, $feature.field2, $feature.field3, $feature.field4];\nAll(myArray, isEmpty)\n```\n\n","completion":{"label":"All","detail":"All(inputArray, testFunction) -> Boolean","insertText":"All(${1:inputArray_}, ${2:testFunction_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.16](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n指示给定数组中的所有元素是否通过所提供函数的测试。 如果函数为输入数组中的所有项目返回 `true`，则返回 `true`。\n\n**参数**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 要测试的输入数组。\n- **testFunction**: [Function](https://developers.arcgis.com/arcade/guide/logic/#user-defined-functions) - 用于测试数组 `testFunction(value: Any) -> Boolean` 中每个元素的函数。 如果元素通过测试，该函数必须返回一个真值。 该函数可以为用户定义函数，也可以为使用以下参数定义的核心 Arcade 函数：\n\n  - **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 表示数组中某个元素的值。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)  \n`true` 如果测试函数返回所有元素的真值。"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"any","bundle":"core","sinceVersion":"1.16","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#any","description":"测试给定数组中的某个元素是否通过所提供函数的测试。 如果函数为输入数组中的至少一个项目返回 `true`，则返回 `true`。","examples":"\n**示例**\n\n返回 `true`，因为输入数组中的至少一个元素通过了 `isEven` 测试。\n\n```arcade\n// isEven is used to test if each element in the array is even\n// it returns true if the element is divisible by two, false if is not\nfunction isEven(value) { return value % 2 == 0 } \n// The isEven function will execute for each element in the array,\n// returning the following values: false, true, false, true, false\n// Since at least one value in the array passed the test\n// (return true), the return value will be true\nAny([1,2,3,4,5], isEven)\n```\n\n使用现有的 `isEmpty` Arcade 函数作为 `testFunction`。 这是有效的，因为 `isEmpty` 接受单个参数并返回一个布尔值。 如果某个字段为空，则此表达式返回 `true`。\n\n```arcade\nvar myArray = [ $feature.field1, $feature.field2, $feature.field3, $feature.field4];\nAny(myArray, isEmpty)\n```\n\n","completion":{"label":"Any","detail":"Any(inputArray, testFunction) -> Boolean","insertText":"Any(${1:inputArray_}, ${2:testFunction_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.16](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n测试给定数组中的某个元素是否通过所提供函数的测试。 如果函数为输入数组中的至少一个项目返回 `true`，则返回 `true`。\n\n**参数**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 要测试的输入数组。\n- **testFunction**: [Function](https://developers.arcgis.com/arcade/guide/logic/#user-defined-functions) - 用于测试数组 `testFunction(value: Any) -> Boolean` 中每个元素的函数。 如果元素通过测试，该函数必须返回一个真值。 该函数可以为用户定义函数，也可以为使用以下参数定义的核心 Arcade 函数：\n\n  - **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 表示数组中某个元素的值。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)  \n`true` 如果测试函数返回所有元素的真值。"}},"parametersInfo":{"min":2,"max":2}},[{"type":"function","name":"array","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#array1","description":"返回给定长度的新数组。","examples":"\n**示例**\n\n返回 `[null, null, null, null, null]`。\n\n```arcade\nArray(5)\n```\n\n返回 `[\"hello\",\"hello\"]`\n\n```arcade\nArray(2, \"hello\")\n```\n\n返回 `[1,1,1]`。\n\n```arcade\nArray(3, 1)\n```\n\n","completion":{"label":"Array","detail":"Array(arrayLength, defaultValue?) -> Array<Any>","insertText":"Array(${1:arrayLength_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回给定长度的新数组。\n\n**参数**\n\n- **arrayLength**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 新数组的所需长度。\n- **defaultValue** (_Optional_): [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 数组中各元素的值。 如果未指定值，则默认值为 `null`。\n\n**返回值**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt;"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"array","bundle":"core","sinceVersion":"1.23","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#array2","description":"返回输入数组的浅拷贝或深拷贝。","examples":"\n**示例**\n\n创建输入数组的浅拷贝\n\n```arcade\nvar person1 = {\n  firstName: \"Jane\",\n  lastName: \"Doe\"\n};\nvar person2 = {\n  firstName: \"John\",\n  lastName: \"Smith\"\n};\nvar people = [ person1, person2 ];\n// create a shallow copy of the array\nvar copiedArray = Array(people);\npeople[0] == copiedArray[0];\n// returns true\n// this is a shallow copy of the array, so the elements share the same references\n```\n\n创建输入数组的深拷贝\n\n```arcade\nvar deepCopy = Array(people, true);\npeople[0] == deepCopy[0]\n// returns false\n// this is a deep copy of the array, so the elements do NOT share the same references\n```\n\n","completion":{"label":"Array","detail":"Array(inputArray, deep?) -> Array<Any>","insertText":"Array(${1:inputArray_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.23](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回输入数组的浅拷贝或深拷贝。\n\n**参数**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 要复制的数组。\n- **deep** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 当为 `true` 时，将创建输入数组中每个元素的深拷贝，这意味着输出数组中的元素将不会与输入数组的元素共享相同的参考。 默认值为 `false`。\n\n**返回值**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt;"}},"parametersInfo":{"min":1,"max":2}}],{"type":"function","name":"back","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#back","description":"返回数组中的最后一个元素。 如果输入数组为空，则表达式求值将失败。","examples":"\n**示例**\n\n返回 `'gray'`。\n\n```arcade\nvar colors = ['orange', 'purple', 'gray']\nBack(colors)\n```\n\n","completion":{"label":"Back","detail":"Back(inputArray) -> Any","insertText":"Back(${1:inputArray_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回数组中的最后一个元素。 如果输入数组为空，则表达式求值将失败。\n\n**参数**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 从中获取最后一个值的数组。\n\n**返回值**: [Any](https://developers.arcgis.com/arcade/guide/types/#any)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"count","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#count","description":"返回数组中的项目数。","examples":"\n**示例**\n\n返回 6\n\n```arcade\nCount([12,21,32,44,58,63])\n```\n\n","completion":{"label":"Count","detail":"Count(value) -> Number","insertText":"Count(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回数组中的项目数。\n\n**参数**\n\n- **value**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 要对其执行操作的数组。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"defaultvalue","bundle":"core","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#defaultvalue1","description":"如果数组中的索引不存在，或指定索引处的值为 `null` 或空文本值，则返回指定默认值。","examples":"\n**示例**\n\n给定索引处有值的数组\n\n```arcade\nvar a = [23,4,null,36,901]\nDefaultValue(a, 4, \"No data\");\n// returns 901\n```\n\n给定索引处无值的数组\n\n```arcade\nvar a = [23,4,null,36,901]\nDefaultValue(a, 5, \"No data\");\n// returns \"No data\"\n```\n\n给定索引处值为 null 的数组\n\n```arcade\nvar a = [23,4,null,36,901]\nDefaultValue(a, 2, \"No data\");\n// returns \"No data\"\n```\n\n","completion":{"label":"DefaultValue","detail":"DefaultValue(inputArray, index, defaultValue) -> Any","insertText":"DefaultValue(${1:inputArray_}, ${2:index_}, ${3:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n如果数组中的索引不存在，或指定索引处的值为 `null` 或空文本值，则返回指定默认值。\n\n**参数**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 要检查的输入数组。\n- **index**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要检查的索引。\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 如果索引不存在，或指定索引处的值为 `null` 或空文本值，则返回该值。\n\n**返回值**: [Any](https://developers.arcgis.com/arcade/guide/types/#any)  \n如果已定义，则返回指定索引处的值。 否则，返回 `defaultValue` 中指定的值。"}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"defaultvalue","bundle":"core","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#defaultvalue2","description":"检查多维数组中嵌套多个层级的索引是否有值，并在存在时返回该值。 否则，如果至少一个嵌套键或索引不存在，或指定键或索引处的值为 `null` 或空文本值，则返回指定默认值。 这允许您一步深入到嵌套结构中，而不是检查每个数组内的值。","examples":"\n**示例**\n\n嵌套索引处有值的数组\n\n```arcade\nvar a = [23,4,[0,0,1,1,0],36,901]\nDefaultValue(a, [2, 3], \"No data\");\n// returns 1\n```\n\n嵌套索引处无值的数组\n\n```arcade\nvar a = [23,4,[0,0,1,1,0],36,901]\nDefaultValue(a, [2, 10], \"No data\");\n// returns \"No data\"\n```\n\n父索引处无值的数组\n\n```arcade\nvar a = [23,4,[0,0,1,1,0],36,901]\nDefaultValue(a, [10, 3], \"No data\");\n// returns \"No data\"\n```\n\n带有嵌套值的字典数组\n\n```arcade\nvar data = {\n  time: Date(2024, 0, 24, 12),\n  interval: 1,\n  intervalUnit: \"days\",\n  weather: {\n    precipitation: {\n      type: \"rain\",\n      values: [0.4, 0, 0, null, 0.1, 0.8, 1],\n      unit: \"inches\"\n    },\n    temperature: {\n      values: [50, 50, 51, 52, 55, 49, 51],\n      unit: \"f\"\n    },\n  }\n}\n\nvar a = [ data, data2, data3 ]\nDefaultValue(a, [0, \"weather\",\"precipitation\",\"values\", 6], \"No data\");\n// returns 1\n```\n\n","completion":{"label":"DefaultValue","detail":"DefaultValue(inputArray, keys, defaultValue) -> Any","insertText":"DefaultValue(${1:inputArray_}, ${2:keys_}, ${3:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n检查多维数组中嵌套多个层级的索引是否有值，并在存在时返回该值。 否则，如果至少一个嵌套键或索引不存在，或指定键或索引处的值为 `null` 或空文本值，则返回指定默认值。 这允许您一步深入到嵌套结构中，而不是检查每个数组内的值。\n\n**参数**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 要检查的输入数组。\n- **keys**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)&gt; - 要在容器结构的每个层级中检查的键或索引数组。\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 如果至少一个键或索引不存在，或指定键处的值为 `null` 或空文本值，则返回该值。\n\n**返回值**: [Any](https://developers.arcgis.com/arcade/guide/types/#any)  \n如果已定义，则返回指定键或索引处的值。 否则，返回 `defaultValue` 中指定的值。"}},"parametersInfo":{"min":3,"max":3}}],[{"type":"function","name":"distinct","bundle":"core","sinceVersion":"1.1","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#distinct1","description":"针对值数组返回一组相异值或唯一值。","examples":"\n**示例**\n\n\n\n```arcade\nDistinct([1,1,2,1,1,2,2,3,4,5])\n// Returns [1,2,3,4,5]\n```\n\n","completion":{"label":"Distinct","detail":"Distinct(values) -> Array<Any>","insertText":"Distinct(${1:values_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.1](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n针对值数组返回一组相异值或唯一值。\n\n**参数**\n\n- **values**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 要对其进行操作的值数组。\n\n**返回值**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt;"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"distinct","bundle":"core","sinceVersion":"1.1","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#distinct2","description":"针对值列表返回一组相异值或唯一值。","examples":"\n**示例**\n\n\n\n```arcade\nDistinct('high','medium','low',0,'high','high','low')\n// Returns ['high','medium','low',0]\n```\n\n","completion":{"label":"Distinct","detail":"Distinct([value1, ..., valueN]?) -> Array<Any>","insertText":"Distinct($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.1](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n针对值列表返回一组相异值或唯一值。\n\n**参数**\n\n- **[value1, ..., valueN]** (_Optional_): [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 要对其进行操作的值列表。\n\n**返回值**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt;"}},"parametersInfo":{"min":0,"max":-1}}],{"type":"function","name":"erase","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#erase","description":"从给定索引的数组中移除一个值。 位于给定索引中或其上方的现有元素将向下移动一个索引值。 数组大小将降低一级。","examples":"\n**示例**\n\n\n\n```arcade\nvar colors = ['orange', 'purple', 'gray']\nErase(colors, 1)\n// colors = ['orange','gray']\n```\n\n\n\n```arcade\nvar colors = ['orange', 'purple', 'gray']\nErase(colors, -1)\n// colors = ['orange','purple']\n```\n\n","completion":{"label":"Erase","detail":"Erase(inputArray, index) -> Null","insertText":"Erase(${1:inputArray_}, ${2:index_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n从给定索引的数组中移除一个值。 位于给定索引中或其上方的现有元素将向下移动一个索引值。 数组大小将降低一级。\n\n**参数**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 从中移除值的数组。\n- **index**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要从数组中移除的值的索引。 如果提供负索引，则其将用作数组末端的偏移。\n\n**返回值**: Null"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"filter","bundle":"core","sinceVersion":"1.16","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#filter","description":"使用通过提供的函数测试的从输入数组中过滤出的元素创建一个新数组。","examples":"\n**示例**\n\n返回一个由通过 `isEven` 过滤器的元素组成的新数组。\n\n```arcade\nfunction isEven(i) { return i % 2 == 0 } \nFilter([1,2,3,4,5], isEven) // Returns [2,4]\n// Since 2 and 4 are even, they are the only values\n// included in the output array.\n```\n\n使用 `filterFunction` 中的现有 `isEmpty` Arcade 函数。 返回一个新的非空字段数组。\n\n```arcade\nvar myArray = [ $feature.field1, $feature.field2, $feature.field3, $feature.field4];\n\nfunction isNotEmpty(value){\n  return !isEmpty(value);\n}\nFilter(myArray, isNotEmpty)\n// Returns only values that are defined,\n// excluding empty values from the result\n```\n\n","completion":{"label":"Filter","detail":"Filter(inputArray, filterFunction) -> Array<Any>","insertText":"Filter(${1:inputArray_}, ${2:filterFunction_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.16](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n使用通过提供的函数测试的从输入数组中过滤出的元素创建一个新数组。\n\n**参数**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 要过滤的输入数组。\n- **filterFunction**: [Function](https://developers.arcgis.com/arcade/guide/logic/#user-defined-functions) - 用于过滤数组 `filterFunction(value: Any) -> Boolean` 中元素的函数。 如果元素通过测试，该函数必须返回一个真值。 此函数可以为用户定义函数，也可以为使用以下参数定义的核心 Arcade 函数：\n\n  - **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 表示数组中某个元素的值。\n\n**返回值**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt;  \n返回一个数组，其中包含通过测试函数的元素。"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"first","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#first","description":"返回数组中的第一个元素。 返回数组为空，则将返回 `null`。","examples":"\n**示例**\n\n输出 'orange'\n\n```arcade\nFirst(['orange', 'purple', 'gray'])\n```\n\n","completion":{"label":"First","detail":"First(inputArray) -> Any","insertText":"First(${1:inputArray_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回数组中的第一个元素。 返回数组为空，则将返回 `null`。\n\n**参数**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 要从中返回第一项的数组。\n\n**返回值**: [Any](https://developers.arcgis.com/arcade/guide/types/#any)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"front","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#front","description":"返回数组中的第一个元素。 如果输入数组为空，则表达式求值将失败。","examples":"\n**示例**\n\n返回`'orange'`。\n\n```arcade\nvar colors = ['orange', 'purple', 'gray']\nFront(colors)\n```\n\n","completion":{"label":"Front","detail":"Front(inputArray) -> Any","insertText":"Front(${1:inputArray_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回数组中的第一个元素。 如果输入数组为空，则表达式求值将失败。\n\n**参数**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 从中获取第一个值的数组。\n\n**返回值**: [Any](https://developers.arcgis.com/arcade/guide/types/#any)"}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"hasvalue","bundle":"core","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#hasvalue1","description":"指示给定索引处的数组是否有值。","examples":"\n**示例**\n\n给定索引处有值的数组\n\n```arcade\nvar a = [23,4,null,36,901]\nHasValue(a, 4);\n// returns true\n```\n\n给定索引处无值的数组\n\n```arcade\nvar a = [23,4,null,36,901]\nHasValue(a, 5);\n// returns false\n```\n\n给定索引处值为 null 的数组\n\n```arcade\nvar a = [23,4,null,36,901]\nHasValue(a, 2);\n// returns false\n```\n\n","completion":{"label":"HasValue","detail":"HasValue(inputArray, index) -> Boolean","insertText":"HasValue(${1:inputArray_}, ${2:index_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n指示给定索引处的数组是否有值。\n\n**参数**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 要检查的数组。\n- **index**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要检查的索引。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"hasvalue","bundle":"core","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#hasvalue2","description":"检查多维数组中嵌套多个层级的索引是否有值。 这允许您一步深入到嵌套结构中，而不是检查每个数组内的值。 如果结构的每个层级中均存在索引且包含非空值，则返回 `true`。","examples":"\n**示例**\n\n嵌套索引处有值的数组\n\n```arcade\nvar a = [23,4,[0,0,1,1,0],36,901]\nHasValue(a, [2, 4]);\n// returns true\n```\n\n嵌套索引处无值的数组\n\n```arcade\nvar a = [23,4,[0,0,1,1,0],36,901]\nHasValue(a, [2, 10]);\n// returns false\n```\n\n父索引处无值的数组\n\n```arcade\nvar a = [23,4,[0,0,1,1,0],36,901]\nHasValue(a, [10, 5]);\n// returns false\n```\n\n带有嵌套值的字典数组\n\n```arcade\nvar data = {\n  time: Date(2024, 0, 24, 12),\n  interval: 1,\n  intervalUnit: \"days\",\n  weather: {\n    precipitation: {\n      type: \"rain\",\n      values: [0.4, 0, 0, null, 0.1, 0.8, 1],\n      unit: \"inches\"\n    },\n    temperature: {\n      values: [50, 50, 51, 52, 55, 49, 51],\n      unit: \"f\"\n    },\n  }\n}\n\nvar a = [ data, data2, data3 ]\nif(HasValue(a, [0, \"weather\",\"precipitation\",\"values\", 6])){\n  // This check succeeds so the value will be returned\n  return a[0].weather.precipitation.values[6];\n  // returns 1\n}\n```\n\n","completion":{"label":"HasValue","detail":"HasValue(inputArray, indexes) -> Boolean","insertText":"HasValue(${1:inputArray_}, ${2:indexes_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n检查多维数组中嵌套多个层级的索引是否有值。 这允许您一步深入到嵌套结构中，而不是检查每个数组内的值。 如果结构的每个层级中均存在索引且包含非空值，则返回 `true`。\n\n**参数**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 要检查的数组。\n- **indexes**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)&gt; - 要在结构的每个层级中检查的键或索引数组。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}}],{"type":"function","name":"includes","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#includes","description":"确定数组是否包含给定值。 如果数组中包含该值，则返回 `true`。","examples":"\n**示例**\n\n返回 `true`。\n\n```arcade\nIncludes(['orange', 'purple', 'gray'], 'purple')\n```\n\n返回 `false`。\n\n```arcade\nIncludes(['orange', 'purple', 'gray'], 'red')\n```\n\n","completion":{"label":"Includes","detail":"Includes(inputArray, value) -> Boolean","insertText":"Includes(${1:inputArray_}, ${2:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n确定数组是否包含给定值。 如果数组中包含该值，则返回 `true`。\n\n**参数**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 输入数组。\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 要在给定数组中查找的值。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"indexof","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#indexof","description":"以数组形式返回输入项中基于零的索引位置。 如果 `item` 不存在，则将返回 `-1`。","examples":"\n**示例**\n\n输出 2\n\n```arcade\nvar num = [1,2,3,4];\nreturn indexof(num, 3);\n```\n\n","completion":{"label":"IndexOf","detail":"IndexOf(inputArray, item) -> Number","insertText":"IndexOf(${1:inputArray_}, ${2:item_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n以数组形式返回输入项中基于零的索引位置。 如果 `item` 不存在，则将返回 `-1`。\n\n**参数**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 待搜索的数组。\n- **item**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 要在数组中定位的项目。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"insert","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#insert","description":"在给定索引的数组中插入新值。 位于给定索引中或其上方的现有元素将向上移动一个索引值。 数组大小将上升一级。","examples":"\n**示例**\n\n\n\n```arcade\nvar colors = ['orange', 'purple', 'gray']\nInsert(colors, 1, 'yellow')\n// colors = ['orange','yellow','purple','gray']\n```\n\n\n\n```arcade\nvar colors = ['orange', 'purple', 'gray']\nInsert(colors, -1, 'yellow')\n// colors = ['orange','purple','yellow','gray']\n```\n\n","completion":{"label":"Insert","detail":"Insert(inputArray, index, value) -> Null","insertText":"Insert(${1:inputArray_}, ${2:index_}, ${3:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n在给定索引的数组中插入新值。 位于给定索引中或其上方的现有元素将向上移动一个索引值。 数组大小将上升一级。\n\n**参数**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 要向其中插入新值的数组。\n- **index**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要插入新值的数组的索引。 如果索引为 0，则将在数组开头插入值。 如果索引与数组大小相等，则将在数组末端插入值。 如果索引大于数组大小，则将导致错误。  如果提供负索引，则其将用作数组末端的偏移。\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 要插入数组的值。\n\n**返回值**: Null"}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"map","bundle":"core","sinceVersion":"1.16","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#map","description":"根据对输入数组中的每个元素调用提供的函数的结果创建一个新数组。","examples":"\n**示例**\n\n将数组中的所有元素从华氏温度转换为摄氏温度，并在新数组中将其返回。\n\n```arcade\n// This function will take in values from the input array and convert them to Celsius\nfunction toCelsius(f) {\n  return Round((f - 32) * 5/9, 2)\n}\n// The toCelsius function executes for each each item\n// in the input array.\n// Map returns the resulting array of converted values.\nMap([82, 67, 96, 55, 34], toCelsius)\n// returns [27.78, 19.44, 35.56, 12.78, 1.11]\n```\n\n将日期对象转换为格式化文本\n\n```arcade\nvar dates = [ Date(1996, 11, 10), Date(1995, 1, 6), Date(1992, 2, 27), Date(1990, 10, 2)];\nfunction formatDates(dateVal) { return Text(dateVal, 'MMM D, Y') }\nMap(dates, formatDates);\n// returns ['Dec 10, 1996', 'Feb 6, 1995', 'Mar 27, 1992', 'Nov 2, 1990']\n```\n\n","completion":{"label":"Map","detail":"Map(inputArray, mappingFunction) -> Array<Any>","insertText":"Map(${1:inputArray_}, ${2:mappingFunction_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.16](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n根据对输入数组中的每个元素调用提供的函数的结果创建一个新数组。\n\n**参数**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 要映射的输入数组。\n- **mappingFunction**: [Function](https://developers.arcgis.com/arcade/guide/logic/#user-defined-functions) - 调用数组 `mappingFunction(value: Any) -> Any` 中每个元素的函数。 该函数必须返回一个新项目，该项目将成为返回数组的一部分。 该函数可以为用户定义函数，也可以为使用以下参数定义的核心 Arcade 函数：\n\n  - **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 表示数组中某个元素的值。\n\n**返回值**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt;  \n映射函数返回的项目。"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"none","bundle":"core","sinceVersion":"1.16","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#none","description":"测试给定数组中是否没有元素通过所提供函数的测试。 如果 `testFunction` 为输入数组中的所有项目返回 `false`，则返回 `true`。","examples":"\n**示例**\n\n返回 `false`，因为输入数组中的某些元素通过了 `isEven` 测试\n\n```arcade\n// isEven is used to test if each element in the array is even\n// it returns true if the element is divisible by two, false if is not\nfunction isEven(value) { return value % 2 == 0 } \n// The isEven function will execute for each element in the array,\n// returning the following values: false, true, false, true, false\n// Since at least one value in the array passed the test\n// (return true), the return value will be false\nNone([1,2,3,4,5], isEven)\n```\n\n使用现有的 `isEmpty` Arcade 函数作为 `testFunction`。 这是有效的，因为 `isEmpty` 接受单个参数并返回一个布尔值。 如果没有字段为空，则此表达式返回 `true`。\n\n```arcade\nvar myArray = [ $feature.field1, $feature.field2, $feature.field3, $feature.field4];\nNone(myArray, isEmpty)\n```\n\n","completion":{"label":"None","detail":"None(inputArray, testFunction) -> Boolean","insertText":"None(${1:inputArray_}, ${2:testFunction_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.16](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n测试给定数组中是否没有元素通过所提供函数的测试。 如果 `testFunction` 为输入数组中的所有项目返回 `false`，则返回 `true`。\n\n**参数**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 要测试的输入数组。\n- **testFunction**: [Function](https://developers.arcgis.com/arcade/guide/logic/#user-defined-functions) - 用于测试数组 `testFunction(value: Any) -> Boolean` 中每个元素的函数。 如果元素未通过测试，该函数必须返回一个假值。 该函数可以为用户定义函数，也可以为使用以下参数定义的核心 Arcade 函数：\n\n  - **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 表示数组中某个元素的值。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)  \n`true` 如果数组中的所有元素都没有通过测试函数。"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"pop","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#pop","description":"移除并返回数组末端的元素。 如果数组为空，则将抛出错误。","examples":"\n**示例**\n\n返回 'gray'。 输入数组现在将等于 `['orange', 'purple']`。\n\n```arcade\nPop(['orange', 'purple', 'gray'])\n```\n\n","completion":{"label":"Pop","detail":"Pop(inputArray) -> Any","insertText":"Pop(${1:inputArray_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n移除并返回数组末端的元素。 如果数组为空，则将抛出错误。\n\n**参数**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 将移除并返回最后一个元素的输入数组。\n\n**返回值**: [Any](https://developers.arcgis.com/arcade/guide/types/#any)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"push","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#push","description":"将元素添加到数组的末尾并返回数组的新长度。","examples":"\n**示例**\n\n返回 4。 输入数组现在将等于 `['orange', 'purple', 'gray', 'red']`。\n\n```arcade\nPush(['orange', 'purple', 'gray'], 'red')\n```\n\n","completion":{"label":"Push","detail":"Push(inputArray, value) -> Number","insertText":"Push(${1:inputArray_}, ${2:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n将元素添加到数组的末尾并返回数组的新长度。\n\n**参数**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 要向其推送元素的数组。\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 将作为最后一个元素添加到输入数组的值。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"reduce","bundle":"core","sinceVersion":"1.16","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#reduce","description":"对数组中的每个元素执行提供的“reducer”函数，传入前一个元素计算的返回值。","examples":"\n**示例**\n\n如果没有 `initialValue` 参数，`cities` 数组的前两个元素将作为参数传递给 add 函数。\n\n```arcade\nvar cities = [{\n   name: 'Columbus',\n   pop: 913921\n}, {\n   name: 'Cincinnati',\n   pop: 307266\n}, {\n   name: 'Dayton',\n   pop: 140343\n}, {\n   name: 'Cleveland',\n   pop: 376599\n}];\n// the first time this function is called it will take the first two elements of the array as x and y\n// The subsequent times the function is executed, it will take the return value\n// from the previous function call as x and the next array value as y\nfunction mostPopulated(city1, city2) {\n   IIf (city1.pop > city2.pop, city1, city2)\n}\nvar largestCity = Reduce(cities, mostPopulated)\nConsole(largestCity.name + ' is the biggest city in the list with a population of ' + largestCity.pop)\n// Columbus is the biggest city in the list with a population of 913921\n```\n\n由于已设置 `initialValue` 参数，该值将为函数的第一个参数 (`city1`)， 而 `cities` 的第一个元素将为函数的第二个参数 (`city2`)。\n\n```arcade\nvar los_angeles = { name: 'Los Angeles', pop: 3898747 }\n// since an initialValue is provided, it will be passed into the maxPop function as x\n// and the first value of the array will be passed in as y for the initial function call\n// The subsequent times the function is executed, it will take the return value\n// from the previous function call as x and the next array value as y\nvar largestCity = Reduce(cities, mostPopulated, los_angeles)\nConsole(largestCity.name + ' is the biggest city in the list with a population of ' + largestCity.pop)\n// Los Angeles is the biggest city in the list with a population of 3898747\n```\n\n","completion":{"label":"Reduce","detail":"Reduce(inputArray, reducerFunction, initialValue?) -> Any","insertText":"Reduce(${1:inputArray_}, ${2:reducerFunction_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.16](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n对数组中的每个元素执行提供的“reducer”函数，传入前一个元素计算的返回值。\n\n**参数**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 要减少的输入数组。\n- **reducerFunction**: [Function](https://developers.arcgis.com/arcade/guide/logic/#user-defined-functions) - 将聚合数组值 `reducerFunction(previousValue: Any, arrayValue: Any) -> Any` 的 reducer 函数。\n\n  - **previousValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 函数第一次执行时，这将为输入数组(或 `initialValue`，如果提供)中的第一个元素。\n  - **arrayValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 表示输入数组中某个元素的当前值。\n- **initialValue** (_Optional_): [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 此项目将传递给 reducer 函数的第一个参数。\n\n**返回值**: [Any](https://developers.arcgis.com/arcade/guide/types/#any)  \n由 reducer 函数为数组中的每个元素组装的值。"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"resize","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#resize","description":"将数组中的元素数更改为指定的大小。 其可用于扩展或提前截断数组。 调整大小后，尝试索引超出新的最后一个元素将导致错误， 但索引下一个元素的情况除外，后者将继续将数组扩展一个元素。","examples":"\n**示例**\n\n返回 `['orange', 'purple', 'gray', null, null]`\n\n```arcade\nvar colors = ['orange', 'purple', 'gray']\nResize(colors, 5)\nreturn colors\n```\n\n返回 `['orange', 'purple', 'gray', 'red', 'red']`\n\n```arcade\nvar colors = ['orange', 'purple', 'gray']\nResize(colors, 5, 'red')\nreturn colors\n```\n\n返回 `['orange']`\n\n```arcade\nvar colors = ['orange', 'purple', 'gray']\nResize(colors, 1)\nreturn colors\n```\n\n","completion":{"label":"Resize","detail":"Resize(inputArray, newSize, value?) -> Null","insertText":"Resize(${1:inputArray_}, ${2:newSize_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n将数组中的元素数更改为指定的大小。 其可用于扩展或提前截断数组。 调整大小后，尝试索引超出新的最后一个元素将导致错误， 但索引下一个元素的情况除外，后者将继续将数组扩展一个元素。\n\n**参数**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 将调整数组大小。\n- **newSize**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 调整大小后的数组所需的元素数。\n- **value** (_Optional_): [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 可选值，将用于添加到数组中的任何新元素。 如果未指定任何值，则新添加的元素将具有 `null` 值。\n\n**返回值**: Null"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"reverse","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#reverse","description":"反转数组内容。","examples":"\n**示例**\n\n返回 `['gray', 'purple', 'orange']`\n\n```arcade\nReverse(['orange', 'purple', 'gray'])\n```\n\n","completion":{"label":"Reverse","detail":"Reverse(inputArray) -> Array<Any>","insertText":"Reverse(${1:inputArray_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n反转数组内容。\n\n**参数**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 待反转的数组。\n\n**返回值**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt;"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"slice","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#slice","description":"将两个索引之间的数组部分返回为新数组。","examples":"\n**示例**\n\n返回 `['purple', 'gray']`\n\n```arcade\nSlice(['orange', 'purple', 'gray', 'red', 'blue'], 1, 3)\n```\n\n返回 `['red', 'blue']`\n\n```arcade\nSlice(['orange', 'purple', 'gray', 'red', 'blue'], 3)\n```\n\n返回 `['orange', 'purple', 'gray', 'red', 'blue']`\n\n```arcade\nSlice(['orange', 'purple', 'gray', 'red', 'blue'])\n```\n\n返回 `['blue']`\n\n```arcade\nSlice(['orange', 'purple', 'gray', 'red', 'blue'], -1)\n```\n\n","completion":{"label":"Slice","detail":"Slice(inputArray, startIndex?, endIndex?) -> Array<Any>","insertText":"Slice(${1:inputArray_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n将两个索引之间的数组部分返回为新数组。\n\n**参数**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 将对数组进行剖切。\n- **startIndex** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 从其开始剖切的索引。 默认值为 `0`。 如果提供负索引，则其将用作数组末端的偏移。\n- **endIndex** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 至其结束剖切的索引。 此索引处的值将不包含在返回的数组中。 默认为数组大小。\n\n**返回值**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt;"}},"parametersInfo":{"min":1,"max":3}},{"type":"function","name":"sort","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#sort","description":"按 ASCII 值对数组进行排序。 如果数组中所有项目的类型都相同，则将使用适当的排序函数。 如果类型不同，则这些项目将转换为文本。 如果数组中包含字典，且未提供用户定义的函数，则不会进行排序。 如果数组包含 `null` 值，它们将不会被转换为文本，并将在排序数组的末段返回。","examples":"\n**示例**\n\n返回 `['$', 1, 'A', 'a']`\n\n```arcade\nSort([1, 'a', '$', 'A'])\n```\n\n使用用户定义的函数进行排序\n\n```arcade\nvar peopleArray = [{ 'NAME': 'Sam', 'AGE': 25 }, {'NAME': 'Bob', 'AGE': 27 },{ 'NAME': 'Emma', 'AGE': 24 }];\nfunction compareAge(a,b){\n  if (a['AGE']<b['AGE'])\n    return -1;\n  if (a['AGE']>b['AGE'])\n    return 1;\n  return 0;\n}\nreturn Sort(peopleArray, compareAge);\n// returns '[{ 'AGE': 24, 'NAME': 'Emma' }, { 'AGE': 25, 'NAME': 'Sam' }, { 'AGE': 27, 'NAME': 'Bob' } ]'\n```\n\n","completion":{"label":"Sort","detail":"Sort(inputArray, comparatorFunction?) -> Array<Any>","insertText":"Sort(${1:inputArray_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n按 ASCII 值对数组进行排序。 如果数组中所有项目的类型都相同，则将使用适当的排序函数。 如果类型不同，则这些项目将转换为文本。 如果数组中包含字典，且未提供用户定义的函数，则不会进行排序。 如果数组包含 `null` 值，它们将不会被转换为文本，并将在排序数组的末段返回。\n\n**参数**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 待排序的数组。\n- **comparatorFunction** (_Optional_): [Function](https://developers.arcgis.com/arcade/guide/logic/#user-defined-functions) - 将用于排序的用户定义函数 `orderingFunction(a: Any, b: Any) -> Number`。 该函数接收两个元素，并应返回一个 指示两个元素排序顺序的数字：  \n`> 0`：则 `b` 排在 `a` 之前  \n`= 0`：则保持 `a` 和 `b` 的原始顺序  \n`< 0`：则 `a` 排在 `b` 之前\n\n  - **a**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 比较的第一个元素。\n  - **b**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 比较的第二个元素。\n\n**返回值**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt;"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"splice","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#splice","description":"在新数组中将所有参数连接在一起。","examples":"\n**示例**\n\n返回 `['orange', 'purple', 1, 2, 'red']`\n\n```arcade\nSplice(['orange', 'purple'], 1, 2, 'red')\n```\n\n返回 `[1, 2, 3, 4]`\n\n```arcade\nSplice([1,2], [3,4])\n```\n\n","completion":{"label":"Splice","detail":"Splice([value1, ..., valueN]?) -> Array<Any>","insertText":"Splice($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n在新数组中将所有参数连接在一起。\n\n**参数**\n\n- **[value1, ..., valueN]** (_Optional_): [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 将拼合到新数组中的正在处理的值列表。\n\n**返回值**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt;"}},"parametersInfo":{"min":0,"max":-1}},{"type":"function","name":"top","bundle":"core","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/array_functions/#top","description":"截断输入数组并返回第一个给定元素数。","examples":"\n**示例**\n\n返回 `[ 43,32,19 ]`\n\n```arcade\nTop([ 43,32,19,0,3,55 ], 3)\n```\n\n","completion":{"label":"Top","detail":"Top(inputArray, numItems) -> Array<Any>","insertText":"Top(${1:inputArray_}, ${2:numItems_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n截断输入数组并返回第一个给定元素数。\n\n**参数**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 待截断的数组。\n- **numItems**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要从数组开始处返回的项目数。\n\n**返回值**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt;"}},"parametersInfo":{"min":2,"max":2}}]},{"id":"text_functions","title":"文本函数","items":[{"type":"function","name":"concatenate","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#concatenate","description":"将值连接在一起，然后返回文本值。","examples":"\n**示例**\n\n输出 'red/blue/green'\n\n```arcade\nConcatenate(['red', 'blue', 'green'], '/')\n```\n\n","completion":{"label":"Concatenate","detail":"Concatenate(values?, separator?, format?) -> Text","insertText":"Concatenate($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n将值连接在一起，然后返回文本值。\n\n**参数**\n\n- **values** (_Optional_): [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Text](https://developers.arcgis.com/arcade/guide/types/#text)&gt; - 要串连的文本值的数组。\n- **separator** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 如果 `values` 参数为数组，则为用于连接的分隔符。 如果为第一个参数提供单个值，则为要连接的文本。 如果未提供，则为空。\n- **format** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 日期或数字的特殊格式字符。 此参数适用于 Arcade 1.3 或更高版本。  \n可能的值：  \n  - `0`：位数  \n  - `#`：位数，省略前导/尾随零  \n  - `D`：月中日期，不填充 (1 - 31)  \n  - `DD`：月中日期，填充 (01 - 31)  \n  - `DDD`：一年中的第几天 (1 - 365)  \n  - `d`：一周的天数 (1-7)  \n  - `ddd`：一周中的某天缩写(例如，Mon)  \n  - `dddd`：一周中的某天全称(例如，Monday)  \n  - `M`：月份 (1 - 12)  \n  - `MM`：月份，已填充 (01 - 12)  \n  - `MMM`：缩写的月份名称(例如，Jan)  \n  - `MMMM`：月份全称(例如，January)  \n  -“Y”：全年  \n  -“YY”：两位数年份  \n  - `h`：民用小时，未填充 (1 - 12)  \n  - `hh`: 民用小时，已填充 (01 - 12)  \n  - `H`: 军用小时，未填充 (0 - 23)  \n  - `HH`: 军用小时，已填充 (00 - 23)  \n  -“m”：分钟，未填充(0 - 59)  \n  -“mm”：分钟，已填充(00 - 59)  \n  - `s`: 秒，未填充 (0 - 59)  \n  -“ss”：秒，已填充(00 - 59)  \n  -“SSS”：毫秒，已填充(000 - 999)  \n  -“A”：AM/PM  \n  -“Z”：简写小时格式的时区偏移，+/- UTC (例如“-7”或“+11”)  \n  -“ZZ”：小时格式的时区偏移，+/- UTC (例如“-07:00”或“+11:00”)  \n  -“ZZZ”：紧凑小时格式的时区偏移，+/- UTC (例如“-0700”或“+1100”)  \n  -“ZZZZ”：缩写命名时区(例如“EST”)  \n  -“ZZZZZ”：命名时区(例如“Eastern Standard Time”)  \n\n\n**返回值**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":0,"max":3}},{"type":"function","name":"count","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#count","description":"返回文本值中的字符数。","examples":"\n**示例**\n\n返回 13\n\n```arcade\nCount('Graham County')\n```\n\n","completion":{"label":"Count","detail":"Count(value) -> Number","insertText":"Count(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回文本值中的字符数。\n\n**参数**\n\n- **value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 要对其执行运算的文本值。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"find","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#find","description":"在文本值内查找字符序列。 不支持通配符。 返回值 -1 表示未找到结果。","examples":"\n**示例**\n\n输出 6\n\n```arcade\nFind('380', 'Esri, 380 New York Street', 0)\n```\n\n","completion":{"label":"Find","detail":"Find(searchText, targetText, startPosition?) -> Number","insertText":"Find(${1:searchText_}, ${2:targetText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n在文本值内查找字符序列。 不支持通配符。 返回值 -1 表示未找到结果。\n\n**参数**\n\n- **searchText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 待搜索的文本。\n- **targetText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 要搜索的文本。\n- **startPosition** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要在其中进行搜索的文本中基于零的字符索引。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"fromcharcode","bundle":"core","sinceVersion":"1.16","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#fromcharcode","description":"返回根据 UTF-16 字符代码序列创建的文本值。","examples":"\n**示例**\n\n以下示例返回 'XYZ'\n\n```arcade\nFromCharCode(88,89,90)\n// returns 'XYZ'\n```\n\n以下示例返回 '🌉'\n\n```arcade\nFromCharCode(55356, 57097)\n// returns '🌉'\n```\n\n","completion":{"label":"FromCharCode","detail":"FromCharCode(charCode1, [charCode2, ..., charCodeN]?) -> Text","insertText":"FromCharCode(${1:charCode1_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.16](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回根据 UTF-16 字符代码序列创建的文本值。\n\n**参数**\n\n- **charCode1**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 表示 UTF-16 代码单元的数字。 每个单位范围为 0-65535。\n- **[charCode2, ..., charCodeN]** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 表示 UTF-16 代码单元的数字序列。 每个单位范围为 0-65535。\n\n**返回值**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":-1}},{"type":"function","name":"fromcodepoint","bundle":"core","sinceVersion":"1.16","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#fromcodepoint","description":"返回根据 UTF-32 代码点序列创建的文本值。","examples":"\n**示例**\n\n以下示例返回 'XYZ'\n\n```arcade\nFromCodePoint(88,89,90)\n// returns 'XYZ'\n```\n\n以下示例返回 '🌉'\n\n```arcade\nFromCodePoint(127753)\n// returns '🌉'\n```\n\n","completion":{"label":"FromCodePoint","detail":"FromCodePoint(codePoint1, [codePoint2, ..., codePoint1N]?) -> Text","insertText":"FromCodePoint(${1:codePoint1_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.16](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回根据 UTF-32 代码点序列创建的文本值。\n\n**参数**\n\n- **codePoint1**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 代码点。\n- **[codePoint2, ..., codePoint1N]** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 代码点列表\n\n**返回值**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":-1}},{"type":"function","name":"guid","bundle":"core","sinceVersion":"1.3","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#guid","description":"以文本值形式返回随机 GUID。","examples":"\n**示例**\n\n返回类似于 `{db894515-ed21-4df1-af67-36232256f59a}` 的值\n\n```arcade\nGuid()\n```\n\n返回类似于 `d00cf4dffb184caeb8ed105b2228c247` 的值\n\n```arcade\nGuid('digits')\n```\n\n","completion":{"label":"Guid","detail":"Guid(guidFormat?) -> Text","insertText":"Guid($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.3](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n以文本值形式返回随机 GUID。\n\n**参数**\n\n- **guidFormat** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - GUID 的命名格式。 默认值为 `digits-hyphen-braces`。  \n可能的值：`digits` \\| `digits-hyphen` \\| `digits-hyphen-braces` \\| `digits-hyphen-parentheses`\n\n**返回值**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":0,"max":1}},{"type":"function","name":"left","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#left","description":"返回文本值开头处指定数量的字符。","examples":"\n**示例**\n\n输出 'the'\n\n```arcade\nLeft('the quick brown fox', 3)\n```\n\n","completion":{"label":"Left","detail":"Left(value, charCount) -> Text","insertText":"Left(${1:value_}, ${2:charCount_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回文本值开头处指定数量的字符。\n\n**参数**\n\n- **value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 从其中获取字符的值。\n- **charCount**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要从文本开始处获取的字符数。\n\n**返回值**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"lower","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#lower","description":"使文本值均为小写字母。","examples":"\n**示例**\n\n输出 'hello'\n\n```arcade\nLower('HELLO')\n```\n\n","completion":{"label":"Lower","detail":"Lower(inputText) -> Text","insertText":"Lower(${1:inputText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n使文本值均为小写字母。\n\n**参数**\n\n- **inputText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 要变为小写字母的文本。\n\n**返回值**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"mid","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#mid","description":"从文本值中间处获取一些字符。","examples":"\n**示例**\n\n输出 'quick'\n\n```arcade\nMid('the quick brown fox', 4, 5)\n```\n\n","completion":{"label":"Mid","detail":"Mid(value, startPosition, charCount?) -> Text","insertText":"Mid(${1:value_}, ${2:startPosition_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n从文本值中间处获取一些字符。\n\n**参数**\n\n- **value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 从其中获取字符的值。 如果值不是文本类型，则首先将值转换为文本。\n- **startPosition**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 从中获取文本的开始位置。 0 是第一个位置。\n- **charCount** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要提取的字符数。 如果将其忽略，则系统会将字符提取到文本的末尾\n\n**返回值**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"proper","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#proper","description":"将文本值转换为首字母大写。 默认情况下，每个单词的开头均为大写形式。 选项 `firstword` 将仅使第一个单词为大写形式。","examples":"\n**示例**\n\n输出 'The Quick Brown Fox'\n\n```arcade\nProper('the quick brown fox', 'everyword')\n```\n\n","completion":{"label":"Proper","detail":"Proper(inputText, applyToText?) -> Text","insertText":"Proper(${1:inputText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n将文本值转换为首字母大写。 默认情况下，每个单词的开头均为大写形式。 选项 `firstword` 将仅使第一个单词为大写形式。\n\n**参数**\n\n- **inputText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 要转换为首字母大写的文本。\n- **applyToText** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 用于指定要执行的大小写类型的文本值。 默认情况下，每个单词均为大写形式。 此参数接受以下两个值之一：`everyword` 或 `firstword`。\n\n**返回值**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"replace","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#replace","description":"替换文本值中的字符。 默认为替换所有出现。","examples":"\n**示例**\n\n输出 'the quick red fox'\n\n```arcade\nReplace('the quick brown fox', 'brown', 'red')\n```\n\n","completion":{"label":"Replace","detail":"Replace(value, searchText, replacementText, allOccurrences?) -> Text","insertText":"Replace(${1:value_}, ${2:searchText_}, ${3:replacementText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n替换文本值中的字符。 默认为替换所有出现。\n\n**参数**\n\n- **value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 要在其中进行替换的文本。\n- **searchText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 待搜索的文本。\n- **replacementText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 替换文本。\n- **allOccurrences** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 指示是否应替换文本中出现的所有 `searchText`。 默认为 `true`。\n\n**返回值**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":3,"max":4}},{"type":"function","name":"right","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#right","description":"返回文本值末尾处指定数量的字符。","examples":"\n**示例**\n\n输出 'fox'\n\n```arcade\nRight('the quick brown fox', 3)\n```\n\n","completion":{"label":"Right","detail":"Right(value, charCount) -> Text","insertText":"Right(${1:value_}, ${2:charCount_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回文本值末尾处指定数量的字符。\n\n**参数**\n\n- **value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 从中获取字符的文本。\n- **charCount**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要从文本值末尾处获取的字符数。\n\n**返回值**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"split","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#split","description":"对文本值进行分割，从而形成一个数组。","examples":"\n**示例**\n\n返回 '[red,green]'\n\n```arcade\nSplit('red,green,blue,orange', ',', 2)\n```\n\n可以无限次分割各个空间的段落。 返回段落中单词的数组。\n\n```arcade\nSplit(paragraph, ' ', -1, true)\n```\n\n","completion":{"label":"Split","detail":"Split(inputText, separatorText, limit?, removeEmpty?) -> Array<Text>","insertText":"Split(${1:inputText_}, ${2:separatorText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n对文本值进行分割，从而形成一个数组。\n\n**参数**\n\n- **inputText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 要分割的文本值。\n- **separatorText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 用于分割文本的分隔符。\n- **limit** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 指定分割数的整数。 默认值为 -1，用于表示无限数量的分割。\n- **removeEmpty** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 指出是否要移除空值。 默认情况下，此为 `false`。\n\n**返回值**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Text](https://developers.arcgis.com/arcade/guide/types/#text)&gt;"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"standardizefilename","bundle":"core","sinceVersion":"1.29","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#standardizefilename","description":"根据以下字符替换规则返回标准化、格式化的文件名。 字段值字符将按照如下所指定的标准化格式返回。  \n- 正斜线(/) &rarr; 连字符(-)  \n- 反斜线(\\) &rarr; 连字符(-)  \n- 管道符号或竖线(|) &rarr; 连字符(-)  \n- 星号(*) &rarr; 下划线(_)  \n- 小于(<) &rarr; 下划线(_)  \n- 大于(>) &rarr; 下划线(_)  \n- 问号(?) &rarr; 下划线(_)  \n- 冒号(:) &rarr; 后跟空格的逗号(,)","examples":"\n**示例**\n\n\n\n```arcade\nvar rawFilename = \"USGS:Green River, Utah\";\nreturn StandardizeFilename(rawFilename);\n// Returns a value of \"USGS, Green River, Utah\".\n```\n\n","completion":{"label":"StandardizeFilename","detail":"StandardizeFilename(inputFilename) -> Text","insertText":"StandardizeFilename(${1:inputFilename_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.29](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n根据以下字符替换规则返回标准化、格式化的文件名。 字段值字符将按照如下所指定的标准化格式返回。  \n- 正斜线(/) &rarr; 连字符(-)  \n- 反斜线(\\) &rarr; 连字符(-)  \n- 管道符号或竖线(|) &rarr; 连字符(-)  \n- 星号(*) &rarr; 下划线(_)  \n- 小于(<) &rarr; 下划线(_)  \n- 大于(>) &rarr; 下划线(_)  \n- 问号(?) &rarr; 下划线(_)  \n- 冒号(:) &rarr; 后跟空格的逗号(,)\n\n**参数**\n\n- **inputFilename**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 要标准化的输入文件名。\n\n**返回值**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"standardizeguid","bundle":"core","sinceVersion":"1.20","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#standardizeguid","description":"返回一个标准化的、格式化的 GUID 字符串。","examples":"\n**示例**\n\n将 GUID 转换为 `digits` 格式\n\n```arcade\nStandardizeGuid('{4e6f776d-c298-4b4b-86a4-57103b4d0f4a}', 'digits')\n// Returns a value of 4e6f776dc2984b4b86a457103b4d0f4a\n```\n\n将 GUID 转换为 `digits-hyphen` 格式\n\n```arcade\nStandardizeGuid('{4e6f776d-c298-4b4b-86a4-57103b4d0f4a}', 'digits-hyphen')\n// Returns a value of 4e6f776d-c298-4b4b-86a4-57103b4d0f4a\n```\n\n","completion":{"label":"StandardizeGuid","detail":"StandardizeGuid(inputGuid, format) -> Text","insertText":"StandardizeGuid(${1:inputGuid_}, ${2:format_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.20](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回一个标准化的、格式化的 GUID 字符串。\n\n**参数**\n\n- **inputGuid**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 要标准化的任何格式的输入 GUID。\n- **format**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - GUID 的命名格式。  \n可能的值：`digits` \\| `digits-hyphen` \\| `digits-hyphen-braces` \\| `digits-hyphen-parentheses`\n\n**返回值**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"text","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#text","description":"将任何值转换为文本值。 将提供可选“format”参数，用于格式化日期和数值数据输入。 如果无法确定等效文本转换，则返回“null”。","examples":"\n**示例**\n\n填充小数点左侧的数字\n\n```arcade\nText(123, '0000') // '0123'\n```\n\n限制小数点左侧的数字\n\n```arcade\nText(123, '00') // '23'\n```\n\n以千为单位对数字进行分组\n\n```arcade\nText(1234, '#,###') // '1,234'\n```\n\n将数字进行四舍五入至小数点后两位\n\n```arcade\nText(12345678.123, '#,###.00') // '12,345,678.12'\n```\n\n将数字格式化为货币形式\n\n```arcade\nText(1234.55, '$#,###.00') // '$1,234.55'\n```\n\n将数字进行四舍五入至小数点后两位\n\n```arcade\nText(1.236, '#.00') // '1.24'\n```\n\n保持有效位数并以千为单位进行分组\n\n```arcade\nText(1234.5678, '#,##0.00#') // '1,234.568'\n```\n\n格式化数字及其正/负 - 如果存在负子模式，则仅能指定负的前缀和后缀。\n\n```arcade\nText(-2, 'Floor #;Basement #') // 'Basement 2'\n```\n\n\n\n```arcade\nText(2, 'Floor #;Basement #') // 'Floor 2'\n```\n\n乘以 100 然后表示为百分比的形式\n\n```arcade\nText(0.3, '#%') // '30%'\n```\n\n格式化当前日期和时间，例如 'Tuesday, October 25, 2016 @ 08:43:11'\n\n```arcade\nText(Now(), 'dddd, MMMM D, Y @ h:m:s')\n```\n\n使用时区格式化日期和时间\n\n```arcade\nText(startDate, 'ddd, MMM D, Y h:mm:ss A ZZZZ')\n// returns Thu, Sep 14, 2023 10:04:49 AM PDT\n```\n\n","completion":{"label":"Text","detail":"Text(value, format?) -> Text","insertText":"Text(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n将任何值转换为文本值。 将提供可选“format”参数，用于格式化日期和数值数据输入。 如果无法确定等效文本转换，则返回“null”。\n\n**参数**\n\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 要转换为文本的值(即日期、数值或其他数据类型)。 从 1.25 版本开始，在 ArcGIS Pro 和 ArcGIS Maps SDKs for Native Apps 中执行时，面或折线输入可能包含曲线对象的 JSON。\n- **format** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 用于格式化日期或数值的特殊字符。  \n可能的值：  \n  - `0`：位数  \n  - `#`：位数，省略前导/尾随零  \n  - `D`：月中日期，不填充 (1 - 31)  \n  - `DD`：月中日期，填充 (01 - 31)  \n  - `DDD`：一年中的第几天 (1 - 365)  \n  - `d`：一周的天数 (1-7)  \n  - `ddd`：一周中的某天缩写(例如，Mon)  \n  - `dddd`：一周中的某天全称(例如，Monday)  \n  - `M`：月份 (1 - 12)  \n  - `MM`：月份，已填充 (01 - 12)  \n  - `MMM`：缩写的月份名称(例如，Jan)  \n  - `MMMM`：月份全称(例如，January)  \n  - `Y`：全年  \n  - `YY`：两位数年份  \n  - `h`：民用小时，未填充 (1 - 12)  \n  - `hh`: 民用小时，已填充 (01 - 12)  \n  - `H`: 军用小时，未填充 (0 - 23)  \n  - `HH`: 军用小时，已填充 (00 - 23)  \n  - `m`：分，未填充 (0 - 59)  \n  - `mm`：分，已填充 (00 - 59)  \n  - `s`: 秒，未填充 (0 - 59)  \n  - `ss`: 秒，已填充 (00 - 59)  \n  -“SSS”：毫秒，已填充(000 - 999)  \n  -“A”：AM/PM  \n  -“Z”：简写小时格式的时区偏移，+/- UTC (例如“-7”或“+11”)  \n  -“ZZ”：小时格式的时区偏移，+/- UTC (例如“-07:00”或“+11:00”)  \n  -“ZZZ”：紧凑小时格式的时区偏移，+/- UTC (例如“-0700”或“+1100”)  \n  -“ZZZZ”：缩写命名时区(例如“EST”)  \n  -“ZZZZZ”：命名时区(例如“Eastern Standard Time”)  \n\n\n**返回值**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"tocharcode","bundle":"core","sinceVersion":"1.16","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#tocharcode","description":"返回 0 到 65535 之间的数字，表示给定索引处的 UTF-16 代码单元。 将自动移除替代对无效的半部分。","examples":"\n**示例**\n\n以下示例返回 88，即 X 的 Unicode 值。\n\n```arcade\nToCharCode('XYZ')\n// returns 88\n```\n\n以下示例返回 89，即 Y 的 Unicode 值。\n\n```arcade\nToCharCode('XYZ', 1)\n// returns 89\n```\n\n以下示例返回 65535。\n\n```arcade\nToCharCode('\\uFFFF\\uFFFE')\n// returns 65535\n```\n\n以下示例返回 55356。\n\n```arcade\nToCharCode('🌉')\n// returns 55356\n```\n\n以下示例返回 57097。\n\n```arcade\nToCharCode('🌉', 1)\n// returns 57097\n```\n\n","completion":{"label":"ToCharCode","detail":"ToCharCode(inputText, index?) -> Number","insertText":"ToCharCode(${1:inputText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.16](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回 0 到 65535 之间的数字，表示给定索引处的 UTF-16 代码单元。 将自动移除替代对无效的半部分。\n\n**参数**\n\n- **inputText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 从中获取 UTF-16 代码单元值的文本。\n- **index** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 值至少为 0 且不大于 `inputText` 的字符数的整数。 默认情况下，此值为 0。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"tocodepoint","bundle":"core","sinceVersion":"1.16","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#tocodepoint","description":"返回非负数表示输入文本的 UTF-32 代码点值。 如果索引到替代对的前半部分，则返回整个代码点。 如果索引到该对的后半部分，则此函数返回后半部分的值。 如果大代码不是有效字符，则该函数仅返回其索引的半部分的值。","examples":"\n**示例**\n\n以下示例返回 88，即 X 的 Unicode 值。\n\n```arcade\nToCodePoint('XYZ')\n// returns 88\n```\n\n以下示例返回 89，即 Y 的 Unicode 值。\n\n```arcade\nToCodePoint('XYZ', 1)\n// returns 89\n```\n\n以下示例返回 127753。\n\n```arcade\nToCodePoint('🌉')\n// returns 127753\n```\n\n以下示例返回 57097。\n\n```arcade\nToCodePoint('🌉', 1)\n// returns 57097\n```\n\n","completion":{"label":"ToCodePoint","detail":"ToCodePoint(inputText, position?) -> Number","insertText":"ToCodePoint(${1:inputText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.16](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回非负数表示输入文本的 UTF-32 代码点值。 如果索引到替代对的前半部分，则返回整个代码点。 如果索引到该对的后半部分，则此函数返回后半部分的值。 如果大代码不是有效字符，则该函数仅返回其索引的半部分的值。\n\n**参数**\n\n- **inputText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 从中获取 UTF-32 代码点值的文本。\n- **position** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - `inputText` 中字符的位置，将从中返回代码点值。 默认值为 0。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"tohex","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#tohex","description":"将整数转换为十六进制表示形式。","examples":"\n**示例**\n\n返回 `\"64\"`。\n\n```arcade\nToHex(100)\n```\n\n从其 RGB 值返回宝蓝色(`\"#4169E1\"`)的十六进制表示形式\n\n```arcade\nvar r = ToHex(65); // returns \"41\"\nvar g = ToHex(105); // returns \"69\"\nvar b = ToHex(225); // returns \"E1\"\nConcatenate(\"#\",r,g,b)\n// Returns \"#4169E1\"\n```\n\n","completion":{"label":"ToHex","detail":"ToHex(value) -> Text","insertText":"ToHex(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n将整数转换为十六进制表示形式。\n\n**参数**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要转换为十六进制值的值。\n\n**返回值**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"trim","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#trim","description":"移除输入文本值开始或末尾处的空格。","examples":"\n**示例**\n\n输出 'hello world'\n\n```arcade\nTrim('   hello world')\n```\n\n","completion":{"label":"Trim","detail":"Trim(inputText) -> Text","insertText":"Trim(${1:inputText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n移除输入文本值开始或末尾处的空格。\n\n**参数**\n\n- **inputText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 待修剪的文本。\n\n**返回值**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"upper","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#upper","description":"使文本均为大写字母。","examples":"\n**示例**\n\n输出 'HELLO'\n\n```arcade\nUpper('Hello')\n```\n\n","completion":{"label":"Upper","detail":"Upper(inputText) -> Text","insertText":"Upper(${1:inputText_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n使文本均为大写字母。\n\n**参数**\n\n- **inputText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 要变为大写字母的文本值。\n\n**返回值**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"urlencode","bundle":"core","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/text_functions/#urlencode","description":"通过将某些字符的每个实例替换为表示字符的 UTF-8 编码的一个、两个、三个 或四个转移字符来进行 URL 编码。","examples":"\n**示例**\n\n对提供的 URL 进行编码\n\n```arcade\nvar urlsource ='arcgis-survey123://?';\nvar params = {\n  itemID:'36ff9e8c13e042a58cfce4ad87f55d19',\n  center: '43.567,-117.380'\n};\nreturn urlsource  + UrlEncode(params);\n//arcgis-survey123://?center=43.567%2C-117.380&itemID=36ff9e8c13e042a58cfce4ad87f55d19\n```\n\n","completion":{"label":"UrlEncode","detail":"UrlEncode(textOrDictionary) -> Text","insertText":"UrlEncode(${1:textOrDictionary_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n通过将某些字符的每个实例替换为表示字符的 UTF-8 编码的一个、两个、三个 或四个转移字符来进行 URL 编码。\n\n**参数**\n\n- **textOrDictionary**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 要编码的 URL。\n\n**返回值**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":1}}]},{"id":"date_functions","title":"日期函数","items":[{"type":"function","name":"changetimezone","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#changetimezone","description":"更改用于显示给定日期值的时区。 如果输入“dateValue”具有“未知”时区，则输出日期值将显示与输入“dateValue”相同的日期和时间，但将为其分配“newTimeZone”。","examples":"\n**示例**\n\n将给定日期的时区从“America/New_York”更改为“America/Los_Angeles”\n\n```arcade\nvar inputDate = Date(2011,10,11,8,0,0,0, \"America/New_York\")\nChangeTimeZone(inputDate, \"America/Los_Angeles\");\n// returns a Date representing Nov 11, 2011, 5:00:00 AM PST\n```\n\n将时区为“未知”的日期分配给时间偏移“+07:00”\n\n```arcade\nvar inputDate = Date(2011,10,11,8,0,0,0, \"unknown\")\nChangeTimeZone(inputDate, \"+07:00\");\n// returns a Date representing Nov 11, 2011, 8:00:00 AM +07:00\n```\n\n","completion":{"label":"ChangeTimeZone","detail":"ChangeTimeZone(dateValue, newTimeZone) -> Date","insertText":"ChangeTimeZone(${1:dateValue_}, ${2:newTimeZone_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n更改用于显示给定日期值的时区。 如果输入“dateValue”具有“未知”时区，则输出日期值将显示与输入“dateValue”相同的日期和时间，但将为其分配“newTimeZone”。\n\n**参数**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - 包含日期和时间信息的日期值。\n- **newTimeZone**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 将用于显示给定日期值的新时区。 该时区必须为以下之一：\n\n  - 表示 IANA 时区数据库中条目的文本(例如“America/New_York”)\n\n  - 表示应添加至 UTC 的小时和分钟的文本(例如“+07:00”或“-03:00”)\n\n  -“系统”- 时区将设置为设备或系统的本地时区\n\n  -“默认值”- 配置文件执行上下文的时区\n\n  -“UTC”- 协调世界时间\n\n  -“未知”- 移除给定值的时区信息并显示表达式中定义的日期和时间。\n\n**返回值**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)\n\n**其他资源**\n\n* [IANA time zone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)\n* [Arcade execution context](https://developers.arcgis.com/arcade/guide/profiles/#execution-context)\n* [ToLocal()](https://developers.arcgis.com/arcade/function-reference/date_functions/#tolocal)\n* [ToUTC()](https://developers.arcgis.com/arcade/function-reference/date_functions/#toutc)\n"}},"parametersInfo":{"min":2,"max":2}},[{"type":"function","name":"date","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#date1","description":"从一组参数创建一个日期对象。 默认情况下，将在配置文件执行上下文的时区中创建日期。","examples":"\n**示例**\n\n创建一个日期，表示运行 Arcade 的配置文件执行上下文的时区中的给定时间\n\n```arcade\n// Date that represents Jun 02, 1987, 12:00:00 AM PST\nDate(1987,05,02)\n```\n\n创建具有在特定时区中定义的时间的日期\n\n```arcade\nDate(1990, 10, 2, 2, 23, 0, 0, \"America/New_York\");\n // Date represents Nov 2, 1990, 2:23:00 AM EST\n```\n\n","completion":{"label":"Date","detail":"Date(year, month, day, hour?, minute?, second?, millisecond?, timeZone?) -> Date","insertText":"Date(${1:year_}, ${2:month_}, ${3:day_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n从一组参数创建一个日期对象。 默认情况下，将在配置文件执行上下文的时区中创建日期。\n\n**参数**\n\n- **year**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 代表年的数字。\n- **month**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 月份 (0-11)，其中 `0` 是一月，`11` 是十二月。\n- **day**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 日 (1-31)。\n- **hour** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 小时 (0-23)。\n- **minute** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 分钟 (0-59)。\n- **second** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 秒 (0-59)。\n- **millisecond** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 毫秒 (0-999)。\n- **timeZone** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - _自 1.24 起_ 日期的时区。 如果未指定，则将在配置文件执行上下文的默认时区中创建日期。 可能的值：\n\n  - 表示 IANA 时区数据库中条目的文本(例如“America/New_York”)\n\n  - 表示应添加至 UTC 的小时和分钟的文本(例如“+07:00”或“-03:00”)\n\n  -“系统”- 时区将设置为设备或系统的本地时区\n\n  -“默认值”- 配置文件执行上下文的时区\n\n  -“UTC”- 协调世界时间\n\n  -“未知”- 移除给定值的时区信息并显示表达式中定义的日期和时间。\n\n**返回值**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)\n\n**其他资源**\n\n* [IANA time zone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)\n* [Arcade execution context](https://developers.arcgis.com/arcade/guide/profiles/#execution-context)\n"}},"parametersInfo":{"min":3,"max":8}},{"type":"function","name":"date","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#date2","description":"使用给定 Unix 纪元编号创建日期。 默认情况下，日期将显示在配置文件执行上下文的时区中。 如果未提供任何纪元，则将在配置文件的默认时区中以当前日期和时间创建日期。 如果为纪元提供了一个 `null` 值，它将被隐式转换为 `0` 并返回 1970 年 1 月 1 日 UTC。","examples":"\n**示例**\n\n自 1970 年 1 月 1 日 以来的毫秒数\n\n```arcade\nDate(1476987783555) // 'Thu Oct 20 2016 11:23:03 GMT-0700 (PDT)'\n```\n\n创建一个日期，表示运行 Arcade 的配置文件执行上下文的时区中的当前时间\n\n```arcade\n// Date represents Jan 27, 2023, 12:41:20 PM PST\nDate()\n```\n\n","completion":{"label":"Date","detail":"Date(epoch?) -> Date","insertText":"Date($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n使用给定 Unix 纪元编号创建日期。 默认情况下，日期将显示在配置文件执行上下文的时区中。 如果未提供任何纪元，则将在配置文件的默认时区中以当前日期和时间创建日期。 如果为纪元提供了一个 `null` 值，它将被隐式转换为 `0` 并返回 1970 年 1 月 1 日 UTC。\n\n**参数**\n\n- **epoch** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 自 1970 年 1 月 1 日 (UTC) 以来的毫秒数。\n\n**返回值**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)\n\n**其他资源**\n\n* [Arcade execution context](https://developers.arcgis.com/arcade/guide/profiles/#execution-context)\n* [Now()](https://developers.arcgis.com/arcade/function-reference/date_functions/#date)\n* [Timestamp()](https://developers.arcgis.com/arcade/function-reference/date_functions/#timestamp)\n* [Today()](https://developers.arcgis.com/arcade/function-reference/date_functions/#today)\n"}},"parametersInfo":{"min":0,"max":1}},{"type":"function","name":"date","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#date3","description":"根据 ISO 8601 文本值创建日期值。 如果提供 UTC 偏移，则日期仍将显示在配置文件的时区中。 如果未提供任何文本值，则将在配置文件的时区中以当前日期和时间创建日期。","examples":"\n**示例**\n\n根据具有已知时间偏移的 ISO 8601 文本值创建日期\n\n```arcade\nDate('2016-10-20T17:41:37+00:00') // 'Thu Oct 20 2016 10:41:37 GMT-0700 (PDT)'\n```\n\n根据具有未知时间偏移的 ISO 8601 文本值创建日期\n\n```arcade\nDate('2016-10-20T17:41:37') // 'Thu Oct 20 2016 5:41:37 PM PDT'\n```\n\n","completion":{"label":"Date","detail":"Date(timestamp?) -> Date","insertText":"Date($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n根据 ISO 8601 文本值创建日期值。 如果提供 UTC 偏移，则日期仍将显示在配置文件的时区中。 如果未提供任何文本值，则将在配置文件的时区中以当前日期和时间创建日期。\n\n**参数**\n\n- **timestamp** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 要转换为日期的 ISO 8601 文本值。\n\n**返回值**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)"}},"parametersInfo":{"min":0,"max":1}},{"type":"function","name":"date","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#date4","description":"根据 DateOnly 值以及可选的时间和时区值创建日期。","examples":"\n**示例**\n\n根据 DateOnly 和时间类型创建日期\n\n```arcade\nDate(DateOnly(2022,10,11), Time(\"11:20 am\"))\n// returns a Date representing Nov 11, 2022, 11:20:00 AM in an unknown time zone\n```\n\n","completion":{"label":"Date","detail":"Date(dateOnlyValue, timeValue?, timeZone?) -> Date","insertText":"Date(${1:dateOnlyValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n根据 DateOnly 值以及可选的时间和时区值创建日期。\n\n**参数**\n\n- **dateOnlyValue**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - 用于创建日期值的 DateOnly 值。\n- **timeValue** (_Optional_): [Time](https://developers.arcgis.com/arcade/guide/types/#time) - 日期的时间值。 如果未指定，则将使用时间“00:00:00”创建日期。\n- **timeZone** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 日期的时区。 如果未指定，则将在“未知”时区中创建日期。 可能的值：\n\n  - 表示 IANA 时区数据库中条目的文本(例如“America/New_York”)\n\n  - 表示应添加至 UTC 的小时和分钟的文本(例如“+07:00”或“-03:00”)\n\n  -“系统”- 时区将设置为设备或系统的本地时区\n\n  -“默认值”- 配置文件执行上下文的时区\n\n  -“UTC”- 协调世界时间\n\n  -“未知”- 移除给定值的时区信息并显示表达式中定义的日期和时间。\n\n**返回值**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)\n\n**其他资源**\n\n* [IANA time zone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)\n* [Arcade execution context](https://developers.arcgis.com/arcade/guide/profiles/#execution-context)\n"}},"parametersInfo":{"min":1,"max":3}},{"type":"function","name":"date","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#date5","description":"创建给定日期的副本。","examples":"\n**示例**\n\n创建当前日期值的副本\n\n```arcade\nvar copiedDate = Date(Now())\n```\n\n","completion":{"label":"Date","detail":"Date(dateValue) -> Date","insertText":"Date(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n创建给定日期的副本。\n\n**参数**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - 要复制的日期。\n\n**返回值**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)"}},"parametersInfo":{"min":1,"max":1}}],[{"type":"function","name":"dateadd","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#dateadd1","description":"以给定单位向日期添加指定的时间量，并返回新的日期。 如果日期具有 IANA 时区，则将应用夏令时以及其他时区驱动的逻辑。","examples":"\n**示例**\n\n向给定日期添加 7 天\n\n```arcade\nvar startDate = Date(2023, 9, 1, 12, 00);\nvar oneWeekLater = DateAdd(startDate, 7, 'days');\nreturn oneWeekLater;\n// returns a Date representing Oct 8, 2023, 12:00:00 PM PDT\n```\n\n","completion":{"label":"DateAdd","detail":"DateAdd(dateValue, addValue, units?) -> Date","insertText":"DateAdd(${1:dateValue_}, ${2:addValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n以给定单位向日期添加指定的时间量，并返回新的日期。 如果日期具有 IANA 时区，则将应用夏令时以及其他时区驱动的逻辑。\n\n**参数**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - 要添加时间的输入日期。\n- **addValue**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 以给定单位添加到日期的值。\n- **units** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 添加到日期的数值单位。 默认值为“毫秒”。 受支持的单位类型为毫秒、秒、分钟、小时、天、月和年\n\n**返回值**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"dateadd","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#dateadd2","description":"向 DateOnly 值添加给定单位的指定时间量并返回新的 DateOnly 值。","examples":"\n**示例**\n\n向所提供字段中的日期添加 7 天\n\n```arcade\nvar startDate = DateOnly(2023,5,4); // equivalent to 2023-06-04\nvar oneWeekLater = DateAdd(startDate, 7, 'days');\nreturn oneWeekLater;\n// returns 2023-06-11\n```\n\n向所提供字段中的日期添加 12 小时\n\n```arcade\nvar startDate = DateOnly(2023,5,4); // equivalent to 2023-06-04\nvar hoursLater = DateAdd(startDate, 12, 'hours');\nreturn hoursLater;\n// returns the original start date, 2023-06-04\n// since 12 hours < 1 day, the DateOnly input is not changed\n```\n\n","completion":{"label":"DateAdd","detail":"DateAdd(dateOnlyValue, addValue, units?) -> DateOnly","insertText":"DateAdd(${1:dateOnlyValue_}, ${2:addValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n向 DateOnly 值添加给定单位的指定时间量并返回新的 DateOnly 值。\n\n**参数**\n\n- **dateOnlyValue**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - 要添加时间的输入 DateOnly 值。\n- **addValue**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 以给定单位添加到日期的值。 对于 DateOnly 输入，将基于 24 小时间隔将此值向下舍入到最近的一天。 如果要添加的值小于 24 小时，则不会向 DateOnly 输入添加任何值。\n- **units** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 添加到日期的数值单位。 默认值为“毫秒”。 受支持的单位类型为毫秒、秒、分钟、小时、天、月和年\n\n**返回值**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly)"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"dateadd","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#dateadd3","description":"向时间值添加给定单位的指定时间量并返回新的时间值。","examples":"\n**示例**\n\n向给定日期添加 7 小时\n\n```arcade\nvar startTime = Time(11,30); // equivalent to 11:30:00\nvar hoursLater = DateAdd(startTime, 7, 'hours');\nreturn hoursLater;\n// returns 18:30:00\n```\n\n向给定时间添加 90 秒\n\n```arcade\nvar startTime = Time(11,30); // equivalent to 11:30:00\nvar secondsLater = DateAdd(startTime, 90, \"seconds\");\nreturn secondsLater;\n// returns 11:31:30\n```\n\n向给定日期添加 25 小时\n\n```arcade\nvar startTime = Time(11,30); // equivalent to 11:30:00\nvar hoursLater = DateAdd(startTime, 25, 'hours');\nreturn hoursLater;\n// returns 12:30:00\n```\n\n","completion":{"label":"DateAdd","detail":"DateAdd(timeValue, addValue, units?) -> Time","insertText":"DateAdd(${1:timeValue_}, ${2:addValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n向时间值添加给定单位的指定时间量并返回新的时间值。\n\n**参数**\n\n- **timeValue**: [Time](https://developers.arcgis.com/arcade/guide/types/#time) - 要添加时间的输入时间值。\n- **addValue**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 以给定单位添加到时间的值。\n- **units** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 添加到日期的数值单位。 默认值为“毫秒”。 受支持的单位类型为毫秒、秒、分钟、小时\n\n**返回值**: [Time](https://developers.arcgis.com/arcade/guide/types/#time)"}},"parametersInfo":{"min":2,"max":3}}],[{"type":"function","name":"datediff","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#datediff1","description":"将两个日期相减，并以指定的单位返回差值。","examples":"\n**示例**\n\n将两个日期相减，并返回时间段\n\n```arcade\nvar startDate = Date($feature.startDateField);\nvar endDate = Date($feature.endDateField);\nvar age = DateDiff(endDate, startDate, 'years');\nreturn age;\n```\n\n将两个日期相减，并返回差值。\n\n```arcade\nvar startDate = Date(2022,2,23,2,23,22,0, \"America/New_York\"); // Mar 23, 2022, 2:23:22 AM EDT\nvar endDate = Date(2022,2,23,5,23,22,0, \"unknown\"); // Mar 23, 2022, 5:23:22 AM\n\nDateDiff(endDate, startDate, 'hours')\n// returns 3, since the Date with an unknown time zone is assumed to be New York time before the difference is calculated\n\nDateDiff(endDate, startDate, 'hours', \"America/Los_Angeles\");\n// returns 6, since the Date with an unknown time zone is now considered to be Los Angeles time before the difference is calculated\n```\n\n","completion":{"label":"DateDiff","detail":"DateDiff(date1, date2, units?, timeZone?) -> Number","insertText":"DateDiff(${1:date1_}, ${2:date2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n将两个日期相减，并以指定的单位返回差值。\n\n**参数**\n\n- **date1**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - 要从中减去第二个日期的日期值。\n- **date2**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - 要从第一个给定日期中减去的日期值。\n- **units** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 返回两个给定日期差值的单位。 受支持的单位类型为毫秒、秒、分钟、小时、天、月和年。 默认值为毫秒。\n- **timeZone** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - _自 1.24 版本起_ 要分配给时区未知的输入日期的时区。 如果未指定，则会发生以下情况： (1) 如果一个输入具有已定义的时区，而另一个未知，则具有未知时区的值将采用与另一个输入相匹配的时区。 (2) 如果两个输入均为未知时区，则将基于两个日期计算 DateDiff，就好像它们是在同一时区中定义的一样。 可能的值：\n\n  - 表示 IANA 时区数据库中条目的文本(例如“America/New_York”)\n\n  - 表示应添加至 UTC 的小时和分钟的文本(例如“+07:00”或“-03:00”)\n\n  -“系统”- 时区将设置为设备或系统的本地时区\n\n  -“默认值”- 配置文件执行上下文的时区\n\n  -“UTC”- 协调世界时间\n\n  -“未知”- 移除给定值的时区信息并显示表达式中定义的日期和时间。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**其他资源**\n\n* [IANA time zone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)\n* [Arcade execution context](https://developers.arcgis.com/arcade/guide/profiles/#execution-context)\n"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"datediff","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#datediff2","description":"将两个 DateOnly 值相减，并以指定单位返回差值。","examples":"\n**示例**\n\n将两个 DateOnly 值相减，并以年为单位返回差值\n\n```arcade\nvar startDate = DateOnly(1996,11,10);\nvar endDate = DateOnly(); // today's date\nvar age = DateDiff(endDate, startDate, 'years');\nFloor(age); // round down\n// returns 26\n```\n\n","completion":{"label":"DateDiff","detail":"DateDiff(dateOnly1, dateOnly2, units?) -> Number","insertText":"DateDiff(${1:dateOnly1_}, ${2:dateOnly2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n将两个 DateOnly 值相减，并以指定单位返回差值。\n\n**参数**\n\n- **dateOnly1**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - 要从中减去第二个 DateOnly 值的 DateOnly 值。\n- **dateOnly2**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - 要从第一个给定 DateOnly 值中减去的 DateOnly 值。\n- **units** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 返回两个给定 DateOnly 值之差的单位。 受支持的单位类型为毫秒、秒、分钟、小时、天、月和年。 默认值为毫秒。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":3}},{"type":"function","name":"datediff","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#datediff3","description":"将两个时间值相减，并以指定单位返回差值。","examples":"\n**示例**\n\n将两个时间值相减，并以小时为单位返回差值\n\n```arcade\nDateDiff(Time(23,0), Time(9,0), 'hours')\n// returns 14\n```\n\n","completion":{"label":"DateDiff","detail":"DateDiff(time1, time2, units?) -> Number","insertText":"DateDiff(${1:time1_}, ${2:time2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n将两个时间值相减，并以指定单位返回差值。\n\n**参数**\n\n- **time1**: [Time](https://developers.arcgis.com/arcade/guide/types/#time) - 要从中减去第二个时间值的时间值。\n- **time2**: [Time](https://developers.arcgis.com/arcade/guide/types/#time) - 要从第一个给定时间值中减去的时间值。\n- **units** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 返回两个时间值之差的单位。 受支持的单位类型为毫秒、秒、分钟、小时。 默认值为毫秒。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":2,"max":3}}],[{"type":"function","name":"dateonly","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#dateonly1","description":"根据配置文件执行上下文的时区中的当前日期创建 DateOnly 值。","examples":"\n**示例**\n\n返回当前 DateOnly (无时间)\n\n```arcade\nDateOnly()\n// returns the current date, i.e. 2023-09-12\n```\n\n","completion":{"label":"DateOnly","detail":"DateOnly() -> DateOnly","insertText":"DateOnly($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n根据配置文件执行上下文的时区中的当前日期创建 DateOnly 值。\n\n**返回值**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly)\n\n**其他资源**\n\n* [Arcade execution context](https://developers.arcgis.com/arcade/guide/profiles/#execution-context)\n"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"dateonly","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#dateonly2","description":"根据表示年、月和日的输入创建 DateOnly 值。","examples":"\n**示例**\n\n根据表示年、月和日的输入创建 DateOnly 值\n\n```arcade\nDateOnly(1996, 11, 10)\n// returns 1996-12-10\n```\n\n","completion":{"label":"DateOnly","detail":"DateOnly(year, month, day) -> DateOnly","insertText":"DateOnly(${1:year_}, ${2:month_}, ${3:day_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n根据表示年、月和日的输入创建 DateOnly 值。\n\n**参数**\n\n- **year**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 表示年份的数字。\n- **month**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 月份 (0-11)，其中 `0` 是一月，`11` 是十二月。 如果此值超出正常范围(0-11)，则函数将返回“null”。\n- **day**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 日 (1-31)。 如果此值超出正常范围(1-31)，则函数将返回“null”。\n\n**返回值**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly)"}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"dateonly","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#dateonly3","description":"使用给定 Unix 纪元编号创建 DateOnly 日期。","examples":"\n**示例**\n\n返回 DateOnly 自 1970 年 1 月 1 日以来的毫秒数\n\n```arcade\nDateOnly(1476987783555);\n// returns 2016-10-20\n```\n\n","completion":{"label":"DateOnly","detail":"DateOnly(epoch) -> DateOnly","insertText":"DateOnly(${1:epoch_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n使用给定 Unix 纪元编号创建 DateOnly 日期。\n\n**参数**\n\n- **epoch**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 自 1970 年 1 月 1 日 (UTC) 以来的毫秒数。\n\n**返回值**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"dateonly","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#dateonly4","description":"根据表示 ISO 格式化日期或者其他格式化文本模式的文本输入创建 DateOnly 值。","examples":"\n**示例**\n\n根据表示日期的文本值创建 DateOnly 值\n\n```arcade\nDateOnly(\"2023-05-11T13:43:18.990+01:00\");\n// returns 2023-05-11\n```\n\n根据表示给定格式的日期的文本值创建 DateOnly 值\n\n```arcade\nDateOnly(\"10 Jan 2022\",\"D MMM Y\")\n// returns 2022-01-10\n```\n\n","completion":{"label":"DateOnly","detail":"DateOnly(textValue, format?) -> DateOnly","insertText":"DateOnly(${1:textValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n根据表示 ISO 格式化日期或者其他格式化文本模式的文本输入创建 DateOnly 值。\n\n**参数**\n\n- **textValue**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 表示日期的文本值。 应该为 ISO 格式化日期或者表示日期的其他格式化文本。 如果此值不遵循 ISO 格式，则必须定义“format”参数来指示日期的格式。\n- **format** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 指示“dateValue”输入格式的文本值。  \n可能的值：  \n  -“D”：月中日期，不填充 (1 - 31)  \n  -“DD”：月中日期，填充 (01 - 31)  \n  -“DDD”：一年中的第几天 (1 - 365)  \n  -“d”：一周的天数 (1-7)  \n  -“ddd”：一周中的某天缩写(例如，Mon)  \n  -“dddd”：一周中的某天全称(例如，Monday)  \n  -“M”：月份 (1 - 12)  \n  -“MM”：月份，已填充 (01 - 12)  \n  -“MMM”：缩写的月份名称(例如，Jan)  \n  -“MMMM”：月份全称(例如，January)  \n  -“Y”：全年  \n  -“YY”：两位数年份  \n\n\n**返回值**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"dateonly","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#dateonly5","description":"根据给定日期创建 DateOnly 值。","examples":"\n**示例**\n\n根据给定日期返回 DateOnly\n\n```arcade\nDateOnly(Date(2008,10,11,10,30));\n// returns 2008-11-11\n```\n\n","completion":{"label":"DateOnly","detail":"DateOnly(dateValue) -> DateOnly","insertText":"DateOnly(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n根据给定日期创建 DateOnly 值。\n\n**参数**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - 用于创建 DateOnly 值的日期。\n\n**返回值**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"dateonly","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#dateonly6","description":"创建 DateOnly 值的副本。","examples":"\n**示例**\n\n创建 DateOnly 值的副本\n\n```arcade\nvar originalDateOnly = DateOnly(1996,11,10)\nvar copiedDateOnly = DateOnly(originalDateOnly)\nreturn copiedDateOnly;\n```\n\n","completion":{"label":"DateOnly","detail":"DateOnly(dateOnlyValue) -> DateOnly","insertText":"DateOnly(${1:dateOnlyValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n创建 DateOnly 值的副本。\n\n**参数**\n\n- **dateOnlyValue**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - 要复制的 DateOnly 值。\n\n**返回值**: [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly)"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"day","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#day","description":"返回给定日期月份中的某天。","examples":"\n**示例**\n\n获取当前日期月份中的某天\n\n```arcade\nDay(Now())\n```\n\n根据 DateOnly 值返回月份中的天\n\n```arcade\nDay(DateOnly(1996, 11, 10))\n// returns 10\n```\n\n","completion":{"label":"Day","detail":"Day(dateValue) -> Number","insertText":"Day(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回给定日期月份中的某天。\n\n**参数**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - 从中获取月份的某天的日期值。 自 1.24 版本起，支持 DateOnly 值。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"hour","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#hour1","description":"返回给定日期或时间值中时间的某小时 (0-23)。","examples":"\n**示例**\n\n返回当前时间的小时\n\n```arcade\nHour(Now())\n```\n\n返回时间的小时\n\n```arcade\nHour(Date(2023, 1, 1, 12, 59, 23))\n// returns 12\n```\n\n返回时间的小时\n\n```arcade\nHour(Time(2, 59, 23))\n// returns 2\n```\n\n","completion":{"label":"Hour","detail":"Hour(dateTimeValue) -> Number","insertText":"Hour(${1:dateTimeValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回给定日期或时间值中时间的某小时 (0-23)。\n\n**参数**\n\n- **dateTimeValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [Time](https://developers.arcgis.com/arcade/guide/types/#time) - 从中获取时间的某小时的日期或时间值。 自 1.24 版本起，支持时间值。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"isomonth","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#isomonth","description":"基于 ISO 8601 标准返回给定日期的月份。 值的范围从 1 到 12，其中一月为 `1`，十二月为 `12`。","examples":"\n**示例**\n\n基于 ISO 8601 标准获取给定日期的月份。 对于十二月返回 `12`。\n\n```arcade\nISOMonth(Date(1980, 11, 31))\n```\n\n基于 ISO 8601 标准，获取给定 DateOnly 值的月份。\n\n```arcade\nISOMonth(DateOnly(1996, 0, 10))\n// returns 1, for January\n```\n\n","completion":{"label":"ISOMonth","detail":"ISOMonth(dateValue) -> Number","insertText":"ISOMonth(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n基于 ISO 8601 标准返回给定日期的月份。 值的范围从 1 到 12，其中一月为 `1`，十二月为 `12`。\n\n**参数**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - 从中获取月份的日期值。 自 1.24 版本起，支持 DateOnly 值。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"isoweek","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#isoweek","description":"基于 ISO 8601 周日历返回给定日期的在一年中的周。 值的范围从 1 到 53，其中基于当年情况，一年中的第一周为 `1`，最后一周为 `52` 或 `53`。","examples":"\n**示例**\n\n基于 ISO 8601 标准获取给定日期的周。 由于日期包含在下一年的第一周中，因此返回 `1`。\n\n```arcade\nISOWeek(Date(1980, 11, 31))\n```\n\n基于 ISO 8601 标准，获取给定 DateOnly 值的周。\n\n```arcade\nISOWeek(DateOnly(1996, 11, 10))\n// returns 50\n```\n\n","completion":{"label":"ISOWeek","detail":"ISOWeek(dateValue) -> Number","insertText":"ISOWeek(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n基于 ISO 8601 周日历返回给定日期的在一年中的周。 值的范围从 1 到 53，其中基于当年情况，一年中的第一周为 `1`，最后一周为 `52` 或 `53`。\n\n**参数**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - 从中获取周的日期值。 自 1.24 版本起，支持 DateOnly 值。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"isoweekday","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#isoweekday","description":"基于 ISO 8601 标准返回给定日期的星期。 值的范围从 1 到 7，星期一为 `1`，星期日为 `7`。","examples":"\n**示例**\n\n基于 ISO 8601 标准返回给定日期的星期。 对于星期三，返回 `3`。\n\n```arcade\nISOWeekday(Date(1980, 11, 31))\n```\n\n基于 ISO 8601 标准，返回给定 DateOnly 值的星期。\n\n```arcade\nISOWeekday(DateOnly(1996, 11, 10))\n// returns 2, for Tuesday\n```\n\n","completion":{"label":"ISOWeekday","detail":"ISOWeekday(dateValue) -> Number","insertText":"ISOWeekday(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n基于 ISO 8601 标准返回给定日期的星期。 值的范围从 1 到 7，星期一为 `1`，星期日为 `7`。\n\n**参数**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - 从中返回星期的日期值。 自 1.24 版本起，支持 DateOnly 值。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"isoyear","bundle":"core","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#isoyear","description":"基于 ISO 8601 周日历返回给定日期的年份。","examples":"\n**示例**\n\n基于 ISO 8601 周日历获取给定日期的年份。 由于日期包含在下一年的第一周中，因此返回 `1981`。\n\n```arcade\nISOYear(Date(1980, 11, 31))\n```\n\n基于 ISO 8601 周日历，获取给定 DateOnly 值的年份。\n\n```arcade\nISOYear(DateOnly(1996, 11, 10))\n// returns 1996\n```\n\n","completion":{"label":"ISOYear","detail":"ISOYear(dateValue) -> Number","insertText":"ISOYear(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n基于 ISO 8601 周日历返回给定日期的年份。\n\n**参数**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - 从中获取年份的日期值。 自 1.24 版本起，支持 DateOnly 值。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},[{"type":"function","name":"millisecond","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#millisecond1","description":"返回给定时间或日期值中时间的某毫秒。","examples":"\n**示例**\n\n获取当前时间的某毫秒\n\n```arcade\nMillisecond(Now())\n```\n\n返回时间的某毫秒\n\n```arcade\nMillisecond(Date(2023, 1, 1, 12, 59, 23, 999))\n// returns 999\n```\n\n返回时间的某毫秒\n\n```arcade\nMillisecond(Time(2, 59, 23, 450))\n// returns 450\n```\n\n","completion":{"label":"Millisecond","detail":"Millisecond(dateTimeValue) -> Number","insertText":"Millisecond(${1:dateTimeValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回给定时间或日期值中时间的某毫秒。\n\n**参数**\n\n- **dateTimeValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [Time](https://developers.arcgis.com/arcade/guide/types/#time) - 从中获取时间的某毫秒的日期或时间值。 自 1.24 版本起，支持时间值。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}}],[{"type":"function","name":"minute","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#minute1","description":"返回给定时间或日期值中时间的某分钟。","examples":"\n**示例**\n\n返回当前时间的某分钟\n\n```arcade\nMinute(Now())\n```\n\n返回时间的某分钟\n\n```arcade\nMinute(Date(2013, 1, 1, 2, 15, 23))\n// returns 15\n```\n\n返回时间的某分钟\n\n```arcade\nMinute(Time(2, 59, 23))\n// returns 59\n```\n\n","completion":{"label":"Minute","detail":"Minute(dateTimeValue) -> Number","insertText":"Minute(${1:dateTimeValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回给定时间或日期值中时间的某分钟。\n\n**参数**\n\n- **dateTimeValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [Time](https://developers.arcgis.com/arcade/guide/types/#time) - 从中获取时间的某分钟的日期或时间值。 自 1.24 版本起，支持时间值。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"month","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#month","description":"返回给定日期的月份。 值的范围为 0-11，其中一月是 `0`，十二月是 `11`。","examples":"\n**示例**\n\n获取给定日期中的月份。 值可以在 0-11 之间，其中“0”表示一月，“11”表示十二月。\n\n```arcade\nMonth(Date(1980, 11, 31))\n// returns 11\n```\n\n取得指定 DateOnly 值的月份\n\n```arcade\nMonth(DateOnly(1996, 0, 31))\n// returns 0, for the month of January\n```\n\n","completion":{"label":"Month","detail":"Month(dateValue) -> Number","insertText":"Month(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回给定日期的月份。 值的范围为 0-11，其中一月是 `0`，十二月是 `11`。\n\n**参数**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - 从中获取月份的日期值。 自 1.24 版本起，支持 DateOnly 值。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)\n\n**其他资源**\n\n* [ISOMonth()](https://developers.arcgis.com/arcade/function-reference/date_functions/#isomonth)\n"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"now","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#now","description":"创建一个日期值，表示运行 Arcade 的配置文件执行上下文的时区中的当前日期和时间。","examples":"\n**示例**\n\n返回配置文件默认时区中的当前日期和时间\n\n```arcade\n// Date represents Jan 27, 2023, 12:41:20 PM PST\nNow()\n```\n\n","completion":{"label":"Now","detail":"Now() -> Date","insertText":"Now($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n创建一个日期值，表示运行 Arcade 的配置文件执行上下文的时区中的当前日期和时间。\n\n**返回值**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)\n\n**其他资源**\n\n* [Arcade execution context](https://developers.arcgis.com/arcade/guide/profiles/#execution-context)\n* [Date()](https://developers.arcgis.com/arcade/function-reference/date_functions/#date)\n* [Timestamp()](https://developers.arcgis.com/arcade/function-reference/date_functions/#timestamp)\n* [Today()](https://developers.arcgis.com/arcade/function-reference/date_functions/#today)\n"}},"parametersInfo":{"min":0,"max":0}},[{"type":"function","name":"second","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#second1","description":"返回给定日期或时间值中时间的某秒。","examples":"\n**示例**\n\n获取当前时间的某秒\n\n```arcade\nSecond(Now())\n```\n\n获取时间的某秒\n\n```arcade\nSecond(Date(2023, 1, 1, 2, 59, 01))\n// returns 1\n```\n\n获取时间的某秒\n\n```arcade\nSecond(Time(2, 59, 23))\n// returns 23\n```\n\n","completion":{"label":"Second","detail":"Second(dateTimeValue) -> Number","insertText":"Second(${1:dateTimeValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回给定日期或时间值中时间的某秒。\n\n**参数**\n\n- **dateTimeValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [Time](https://developers.arcgis.com/arcade/guide/types/#time) - 从中获取时间的某秒的日期或时间值。 自 1.24 版本起，支持时间值。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}}],[{"type":"function","name":"time","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#time1","description":"创建一个时间值，表示运行 Arcade 的配置文件执行上下文的时区中的当前时间。","examples":"\n**示例**\n\n返回使用配置文件的默认时区显示的当前时间\n\n```arcade\n// Time represents 12:41:20 PM\nTime()\n```\n\n","completion":{"label":"Time","detail":"Time() -> Time","insertText":"Time($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n创建一个时间值，表示运行 Arcade 的配置文件执行上下文的时区中的当前时间。\n\n**返回值**: [Time](https://developers.arcgis.com/arcade/guide/types/#time)\n\n**其他资源**\n\n* [Arcade execution context](https://developers.arcgis.com/arcade/guide/profiles/#execution-context)\n"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"time","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#time2","description":"根据表示小时、分钟、秒和毫秒的输入创建时间值。","examples":"\n**示例**\n\n根据表示小时、分钟、秒和毫秒的输入创建时间值\n\n```arcade\nTime(13, 20);\n// returns a Time value of 13:20:00\n \nTime(2, 59, 23)\n// returns a Time value of 02:59:23\n \nTime(15, 47, 0, 474)\n// returns a Time value of 15:47:00.474\n```\n\n","completion":{"label":"Time","detail":"Time(hours, minutes, seconds?, milliseconds?) -> Time","insertText":"Time(${1:hours_}, ${2:minutes_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n根据表示小时、分钟、秒和毫秒的输入创建时间值。\n\n**参数**\n\n- **hours**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 表示时间值的小时的数字 (0-23)。 如果此值超出正常范围(0-23)，则函数将返回“null”。\n- **minutes**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 表示时间值的分钟的数字 (0-59)。 如果此值超出正常范围(0-59)，则函数将返回“null”。\n- **seconds** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 表示时间值的秒的数字 (0-59)。 如果此值超出正常范围(0-59)，则函数将返回“null”。\n- **milliseconds** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 表示时间值的毫秒的数字 (0-999)。 如果此值超出正常范围(0-999)，则函数将返回“null”。\n\n**返回值**: [Time](https://developers.arcgis.com/arcade/guide/types/#time)"}},"parametersInfo":{"min":2,"max":4}},{"type":"function","name":"time","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#time3","description":"根据表示自午夜以来的毫秒数的给定数字创建时间值。","examples":"\n**示例**\n\n返回自午夜以来的毫秒数的时间\n\n```arcade\nTime(8119800);\n// returns a Time value of 02:15:19.800\n```\n\n返回自午夜以来的毫秒数的时间\n\n```arcade\nTime(86400001);\n// returns null - the input value exceeds the number of milliseconds in a day\n```\n\n","completion":{"label":"Time","detail":"Time(numValue) -> Time","insertText":"Time(${1:numValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n根据表示自午夜以来的毫秒数的给定数字创建时间值。\n\n**参数**\n\n- **numValue**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 自午夜以来的毫秒数。 如果此值大于 86,400,000（一天中的最大毫秒数）或小于 0，则函数将返回“null”。\n\n**返回值**: [Time](https://developers.arcgis.com/arcade/guide/types/#time)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"time","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#time4","description":"根据表示时间的文本输入以及指示文本格式的可选输入创建时间值。","examples":"\n**示例**\n\n根据表示时间的文本值创建时间值\n\n```arcade\nTime(\"1:20 PM\");\n// returns a Time value of 13:20:00\n```\n\n根据表示时间和格式的文本值创建时间值\n\n```arcade\nTime(\"12 05 04\", \"HH MM ss\")\n// returns a Time value of 12:05:04\n```\n\n","completion":{"label":"Time","detail":"Time(textValue, format?) -> Time","insertText":"Time(${1:textValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n根据表示时间的文本输入以及指示文本格式的可选输入创建时间值。\n\n**参数**\n\n- **textValue**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 表示时间的文本值。\n- **format** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 指示“timeValue”输入格式的文本值。  \n可能的值：  \n  - `h`：民用小时，未填充 (1 - 12)  \n  - `hh`: 民用小时，已填充 (01 - 12)  \n  - `H`: 军用小时，未填充 (0 - 23)  \n  - `HH`: 军用小时，已填充 (00 - 23)  \n  -“m”：分钟，未填充(0 - 59)  \n  -“mm”：分钟，已填充(00 - 59)  \n  -“s”：秒，未填充(0 - 59)  \n  -“ss”：秒，已填充(00 - 59)  \n  -“A”：AM/PM  \n\n\n**返回值**: [Time](https://developers.arcgis.com/arcade/guide/types/#time)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"time","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#time5","description":"根据给定日期创建时间值。","examples":"\n**示例**\n\n根据给定日期返回时间\n\n```arcade\nTime(Date(2008,10,11,10,30));\n// returns a Time value of 10:30:00 AM\n```\n\n","completion":{"label":"Time","detail":"Time(dateValue) -> Time","insertText":"Time(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n根据给定日期创建时间值。\n\n**参数**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - 从中获取时间的日期。\n\n**返回值**: [Time](https://developers.arcgis.com/arcade/guide/types/#time)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"time","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#time6","description":"创建时间值的副本。","examples":"\n**示例**\n\n创建时间值的副本\n\n```arcade\nvar originalTime = Time(23,32,00)\nvar copiedTime = Time(originalTime)\nreturn copiedTime;\n```\n\n","completion":{"label":"Time","detail":"Time(timeValue) -> Time","insertText":"Time(${1:timeValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n创建时间值的副本。\n\n**参数**\n\n- **timeValue**: [Time](https://developers.arcgis.com/arcade/guide/types/#time) - 要复制的时间值。\n\n**返回值**: [Time](https://developers.arcgis.com/arcade/guide/types/#time)"}},"parametersInfo":{"min":1,"max":1}}],{"type":"function","name":"timestamp","bundle":"core","sinceVersion":"1.1","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#timestamp","description":"以 UTC 时间创建表示当前日期和时间的日期值。","examples":"\n**示例**\n\n以 UTC 时间创建日期\n\n```arcade\n// Date that represents Jan 27, 2023, 8:41:20 PM UTC\nTimestamp()\n```\n\n","completion":{"label":"Timestamp","detail":"Timestamp() -> Date","insertText":"Timestamp($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.1](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n以 UTC 时间创建表示当前日期和时间的日期值。\n\n**返回值**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)\n\n**其他资源**\n\n* [Date()](https://developers.arcgis.com/arcade/function-reference/date_functions/#date)\n* [Now()](https://developers.arcgis.com/arcade/function-reference/date_functions/#now)\n* [Today()](https://developers.arcgis.com/arcade/function-reference/date_functions/#today)\n"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"timezone","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#timezone","description":"返回给定日期的时区。 该时区将为以下之一：\n\n- 表示 IANA 时区数据库中条目的文本(例如“America/New_York”)\n\n- 表示应添加至 UTC 的小时和分钟的文本(例如“+07:00”或“-03:00”)\n\n-“系统”- 时区将基于客户端或系统的本地时区\n\n-“UTC”- 协调世界时间\n\n-“未知”- 时区信息未定义。","examples":"\n**示例**\n\n返回日期的时区\n\n```arcade\nvar natlPizzaDay = Date(2024, 1, 9, 0, 0, 0, 0, \"America/Los_Angeles\");\nTimeZone(natlPizzaDay);\n// Returns 'America/Los_Angeles'\n```\n\n","completion":{"label":"TimeZone","detail":"TimeZone(dateValue) -> Text","insertText":"TimeZone(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回给定日期的时区。 该时区将为以下之一：\n\n- 表示 IANA 时区数据库中条目的文本(例如“America/New_York”)\n\n- 表示应添加至 UTC 的小时和分钟的文本(例如“+07:00”或“-03:00”)\n\n-“系统”- 时区将基于客户端或系统的本地时区\n\n-“UTC”- 协调世界时间\n\n-“未知”- 时区信息未定义。\n\n**参数**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - 从中获取时区的日期值。\n\n**返回值**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)\n\n**其他资源**\n\n* [IANA time zone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)\n"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"timezoneoffset","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#timezoneoffset","description":"返回给定日期相对于 UTC 的时区偏移(以毫秒为单位)。","examples":"\n**示例**\n\n返回与 UTC 的时区偏移(以毫秒为单位)\n\n```arcade\nvar inputDate = Date(2011, 10, 11, 8, 0, 0, 0, \"America/New_York\")\nTimeZoneOffset(inputDate);\n// returns -18000000\n```\n\n","completion":{"label":"TimeZoneOffset","detail":"TimeZoneOffset(dateValue) -> Number","insertText":"TimeZoneOffset(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回给定日期相对于 UTC 的时区偏移(以毫秒为单位)。\n\n**参数**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - 从中获取时区偏移的日期值。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"today","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#today","description":"返回配置文件执行上下文时区中午夜的当前日期。","examples":"\n**示例**\n\n返回午夜的当前日期，例如 Mon Oct 24 2016 00:00:00 GMT-0700 (PDT)\n\n```arcade\nToday()\n```\n\n","completion":{"label":"Today","detail":"Today() -> Date","insertText":"Today($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回配置文件执行上下文时区中午夜的当前日期。\n\n**返回值**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)\n\n**其他资源**\n\n* [Arcade execution context](https://developers.arcgis.com/arcade/guide/profiles/#execution-context)\n* [DateOnly()](https://developers.arcgis.com/arcade/function-reference/date_functions/#dateonly)\n* [Date()](https://developers.arcgis.com/arcade/function-reference/date_functions/#date)\n* [Timestamp()](https://developers.arcgis.com/arcade/function-reference/date_functions/#timestamp)\n* [Now()](https://developers.arcgis.com/arcade/function-reference/date_functions/#now)\n"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"tolocal","bundle":"core","sinceVersion":"1.1","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#tolocal","description":"创建与输入日期的纪元匹配的新日期值，并将时区设置为客户端的本地或系统时区。","examples":"\n**示例**\n\n创建与输入日期同一纪元的当地时间日期\n\n```arcade\n// Date represents Jan 27, 2023, 8:41:20 PM UTC\nTimestamp()\n// Date represents Jan 27, 2023, 12:41:20 PM PST\nToLocal(Timestamp())\n```\n\n","completion":{"label":"ToLocal","detail":"ToLocal(inputDate) -> Date","insertText":"ToLocal(${1:inputDate_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.1](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n创建与输入日期的纪元匹配的新日期值，并将时区设置为客户端的本地或系统时区。\n\n**参数**\n\n- **inputDate**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - 要以客户端当地时间表示的日期值。\n\n**返回值**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)\n\n**其他资源**\n\n* [ChangeTimeZone()](https://developers.arcgis.com/arcade/function-reference/date_functions/#changetimezone)\n"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"toutc","bundle":"core","sinceVersion":"1.1","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#toutc","description":"创建与输入日期的纪元匹配的新日期值，并将时区设置为 UTC (协调世界时间)。","examples":"\n**示例**\n\n创建与输入日期同一纪元的 UTC 时间日期。\n\n```arcade\n// Date represents Jan 27, 2023, 12:41:20 PM PST\nNow()\n// Date represents Jan 27, 2023, 8:41:20 PM UTC\nToUTC(Now())\n```\n\n","completion":{"label":"ToUTC","detail":"ToUTC(inputDate) -> Date","insertText":"ToUTC(${1:inputDate_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.1](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n创建与输入日期的纪元匹配的新日期值，并将时区设置为 UTC (协调世界时间)。\n\n**参数**\n\n- **inputDate**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) - 要以 UTC 时间表示的日期值。\n\n**返回值**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)\n\n**其他资源**\n\n* [ChangeTimeZone()](https://developers.arcgis.com/arcade/function-reference/date_functions/#changetimezone)\n"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"week","bundle":"core","sinceVersion":"1.14","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#week","description":"返回给定日期年份中的周数。 值的范围从 0 到 53，其中基于当年情况，一年中的第一周为 `0`，最后一周为 `51`、 `52` 或 `53`。 第一周和最后一周的长度可能不是整 7 天。","examples":"\n**示例**\n\n使用一周开始日期的默认值(星期日)\n\n```arcade\nWeek( Date(1974,0,3) )\n// Returns 0\n```\n\n将一周开始日期设置为星期四\n\n```arcade\nWeek( Date(1974,0,3), 4 )\n// Returns 1\n```\n\n将一周开始日期设置为星期五\n\n```arcade\nWeek( Date(1974,0,3), 5 )\n// Returns 0\n```\n\n\n\n```arcade\nWeek( Date(1945,8,23) )\n// Returns 38\n```\n\n\n\n```arcade\nWeek( Date(2022,7,20) )\n// Returns 33\n```\n\n根据 DateOnly 值返回周\n\n```arcade\nWeek(DateOnly(1996, 11, 10))\n// returns 49\n```\n\n","completion":{"label":"Week","detail":"Week(dateValue, startDay?) -> Number","insertText":"Week(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.14](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回给定日期年份中的周数。 值的范围从 0 到 53，其中基于当年情况，一年中的第一周为 `0`，最后一周为 `51`、 `52` 或 `53`。 第一周和最后一周的长度可能不是整 7 天。\n\n**参数**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - 从中获取周的日期或 DateOnly 值。 自 1.24 版本起，支持 DateOnly 值。\n- **startDay** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 代表一周开始日期的数值。 星期日 = 0；星期一 = 1；星期二 = 2； 星期三 = 3；星期四 = 4；星期五 = 5；星期六 = 6。 默认值为 `0` (星期日)。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":2}},{"type":"function","name":"weekday","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#weekday","description":"返回给定日期的星期。 值的范围为 0-6，其中星期日为“0”，星期六为“6”。","examples":"\n**示例**\n\n返回给定日期的星期。 对于星期三，返回 `3`。\n\n```arcade\nWeekday(Date(1980, 11, 31))\n```\n\n返回给定 DateOnly 值的星期。\n\n```arcade\nWeekday(DateOnly(1996, 11, 10))\n// returns 2, for Tuesday\n```\n\n","completion":{"label":"Weekday","detail":"Weekday(dateValue) -> Number","insertText":"Weekday(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回给定日期的星期。 值的范围为 0-6，其中星期日为“0”，星期六为“6”。\n\n**参数**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - 从中返回星期的日期或 DateOnly 值。 自 1.24 版本起，支持 DateOnly 值。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"year","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/date_functions/#year","description":"返回给定日期的年份。","examples":"\n**示例**\n\n获取当前日期的年份\n\n```arcade\nYear(Now())\n```\n\n取得指定 DateOnly 值的年份\n\n```arcade\nYear(DateOnly(1996, 11, 10))\n// returns 1996\n```\n\n","completion":{"label":"Year","detail":"Year(dateValue) -> Number","insertText":"Year(${1:dateValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回给定日期的年份。\n\n**参数**\n\n- **dateValue**: [Date](https://developers.arcgis.com/arcade/guide/types/#date) \\| [DateOnly](https://developers.arcgis.com/arcade/guide/types/#dateonly) - 从中获取年份的日期或 DateOnly 值。 自 1.24 版本起，支持 DateOnly 值。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}}]},{"id":"knowledge-graph_functions","title":"知识图谱功能","items":[{"type":"function","name":"knowledgegraphbyportalitem","bundle":"knowledge-graph","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/knowledge-graph_functions/#knowledgegraphbyportalitem","description":"从门户项目返回一个知识图谱。","examples":"\n**示例**\n\n返回门户项目中的知识图谱。\n\n```arcade\nvar knowledgeGraph = KnowledgeGraphByPortalItem(\n  Portal('https://www.example.com/arcgis'), // enterprise portal\n  '7b1fb95ab77f40bf8aa09c8b59045449',\n);\n```\n\n","completion":{"label":"KnowledgeGraphByPortalItem","detail":"KnowledgeGraphByPortalItem(portalObject, itemId) -> KnowledgeGraph","insertText":"KnowledgeGraphByPortalItem(${1:portalObject_}, ${2:itemId_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n从门户项目返回一个知识图谱。\n\n**参数**\n\n- **portalObject**: [Portal](https://developers.arcgis.com/arcade/guide/types/#portal) - 从中查询要素的门户。\n- **itemId**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 引用知识图谱服务的门户项目的 GUID。 _该值必须是文字文本。_\n\n**返回值**: [KnowledgeGraph](https://developers.arcgis.com/arcade/guide/types/#knowledgegraph)\n\n**其他资源**\n\n* [Get started with ArcGIS Knowledge Server](https://enterprise.arcgis.com/en/knowledge/latest/introduction/get-started-with-arcgis-knowledge.htm)\n* [Get started with ArcGIS Knowledge (ArcGIS Pro)](https://pro.arcgis.com/en/pro-app/latest/help/data/knowledge/get-started-with-arcgis-knowledge.htm)\n* [Introduction to knowledge graph service in the ArcGIS Maps SDK for JavaScript](https://developers.arcgis.com/javascript/latest/knowledge-graph/knowledge-graph-intro/)\n"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"querygraph","bundle":"knowledge-graph","sinceVersion":"1.26","link":"https://developers.arcgis.com/arcade/function-reference/knowledge-graph_functions/#querygraph","description":"使用 openCypher 查询知识图谱，并返回图谱中的实体和关系集合及其属性。","examples":"\n**示例**\n\n查询知识图谱中包含的 `Student` 实体的信息。\n\n```arcade\nvar results = QueryGraph(\n  knowledgeGraph,\n  'MATCH (p:Student)-[e:EnrolledAt]->(s:School)\n   WHERE s.name = \"Eastside Elementary\"\n   RETURN p,e,s.principal,s.numStaff\n   LIMIT 1');\n\nreturn Text(results);\n```\n\n使用绑定参数查询知识图谱。\n\n```arcade\n// searches for entities with a `name` property that matches the given string in the query parameters\n// OR falls within the given geom bounding box\n// query returns both the supplier and the part that it buys\nvar query = `MATCH (s:Supplier)-[:buys_part]-(p:Part)\n  WHERE s.name=$name OR esri.graph.ST_Intersects($geom, s.geometry)\n  RETURN s,p`;\n \n var results = QueryGraph(\n   $graph,\n   query,\n   {\n     \"name\": \"Supplier 1\",\n     \"geom\": Polygon({\n        rings: [[\n          [38,-78],\n          [39,-79],\n          [39,-76],\n          [-38,-76],\n          [-38,-78]\n        ]]\n      })\n   }\n );\n```\n\n","completion":{"label":"QueryGraph","detail":"QueryGraph(graph, openCypherQuery, queryParameters?, includeProvenance?) -> Array","insertText":"QueryGraph(${1:graph_}, ${2:openCypherQuery_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n使用 openCypher 查询知识图谱，并返回图谱中的实体和关系集合及其属性。\n\n**参数**\n\n- **graph**: [KnowledgeGraph](https://developers.arcgis.com/arcade/guide/types/#knowledgegraph) - 要查询的知识图谱。\n- **openCypherQuery**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 针对知识图谱执行的 openCypher 查询。\n- **queryParameters** (_Optional_): [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - openCypher 查询的命名查询参数字典。 字典中的参数名称或键区分大小写。 参数取决于外部图谱存储，可能类型如下：`Array`、`Date`、`Dictionary`、`Geometry`、`Number`、`Text`\n- **includeProvenance** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 试__Since 1.31_ Indicates whether to include provenance entities (metadata) in the query results. Default is `false`__________________________________________________________验.\n\n**返回值**: Array\n\n**其他资源**\n\n* [Get started with ArcGIS Knowledge Server](https://enterprise.arcgis.com/en/knowledge/latest/introduction/get-started-with-arcgis-knowledge.htm)\n* [Get started with ArcGIS Knowledge (ArcGIS Pro)](https://pro.arcgis.com/en/pro-app/latest/help/data/knowledge/get-started-with-arcgis-knowledge.htm)\n* [Introduction to knowledge graph service in the ArcGIS Maps SDK for JavaScript](https://developers.arcgis.com/javascript/latest/knowledge-graph/knowledge-graph-intro/)\n"}},"parametersInfo":{"min":2,"max":4}}]},{"id":"ai_functions","title":"试_AI functions_____________验","items":[{"type":"function","name":"translatetext","bundle":"ai","sinceVersion":"1.32","link":"https://developers.arcgis.com/arcade/function-reference/ai_functions/#translatetext","description":"试__This function is currently in beta. While in beta, AI functions do not consume credits. The use of AI services may not be allowed in your organization. You can view and change this in the AI Assistants section of the Organization settings page._____________________________________________________________________________________________________________________________验\n\n试_Translates input text from a source language into one or more target languages. Language codes (e.g. \"en\" for English, \"es\" for Spanish) specify the languages involved. The underlying machine translation service uses AI to generate the translated output________________________________________________________________________________________________________________________________验.","examples":"\n**示例**\n\n试_Translates the text 'Hello world' to the locale of the client or system_____________________________________验.\n\n```arcade\nvar locale = GetEnvironment().locale;\nvar result = TranslateText('Hello world', locale);\n// result will be a dictionary with the translated text\nif (result.success){\n  if(HasValue(result, [\"results\", 0, \"translation\"])){\n    // returns \"Hola mundo\" if the device locale is 'es'\n    result.results[0].translation[locale];\n  }\n  if (HasValue(result, [\"results\", 0, \"text\"])){\n    // returns \"Hello world\" if translation could not be performed\n    result.results[0].text;\n  }\n}\nreturn \"Translation not successful\";\n```\n\n","completion":{"label":"TranslateText","detail":"TranslateText(inputText, toLanguages, fromLanguage?) -> Dictionary","insertText":"TranslateText(${1:inputText_}, ${2:toLanguages_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.32](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n试__This function is currently in beta. While in beta, AI functions do not consume credits. The use of AI services may not be allowed in your organization. You can view and change this in the AI Assistants section of the Organization settings page._____________________________________________________________________________________________________________________________验\n\n试_Translates input text from a source language into one or more target languages. Language codes (e.g. \"en\" for English, \"es\" for Spanish) specify the languages involved. The underlying machine translation service uses AI to generate the translated output________________________________________________________________________________________________________________________________验.\n\n**参数**\n\n- **inputText**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Text](https://developers.arcgis.com/arcade/guide/types/#text)&gt; - 试_The text to translate. This can be a single text value or an array of text values__________________________________________验.\n- **toLanguages**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Text](https://developers.arcgis.com/arcade/guide/types/#text)&gt; - 试_The target language(s) to translate to. This can be a single language code or an array of language codes______________________________________________________验.\n- **fromLanguage** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 试_The source language of the input text. If not specified, the service will attempt to auto-detect the source language____________________________________________________________验.\n\n**返回值**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)  \n试_A dictionary containing the translated text_______________________验.\n\n- **success**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 试_Indicates whether the translation was successful. This value will be `false` if the use of AI services is not allowed in your organization. You can view and change this in the AI Assistants section of the Organization settings page_____________________________________________________________________________________________________________________验.\n- **results**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)&gt; - 试_An array of dictionaries containing the translation results for each `inputText` value_____________________________________________验.\n\n  - **key**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 试_The index of the input text or language in the original array________________________________验.\n  - **text**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 试_The input text that was translated___________________验.\n  - **detectedLanguage**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 试_The detected language of the input text, if applicable_____________________________验.\n\n    - **language**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 试_The language code of the detected language_______________________验.\n    - **score**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 试_The confidence score of the detected language. Values range from 0 to 1, where 1 indicates high confidence. A value of `-1` indicates that the language was not detected______________________________________________________________________________________验.\n  - **translation**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 试_A dictionary of translated values where the key is the language code and the value is the translation____________________________________________________验.\n\n**其他资源**\n\n* [Supported language codes](https://developers.arcgis.com/javascript/latest/localization/#locale-support)\n"}},"parametersInfo":{"min":2,"max":3}}]},{"id":"debugging_functions","title":"调试函数","items":[{"type":"function","name":"console","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/debugging_functions/#console","description":"将消息记录到控制台以进行调试。 此函数对于调试表达式特别有用。 与大多数函数不同，`Console()` 不返回值；相反， 它将消息记录在单独的窗口中，仅用于数据检查目的。 此函数的成功使用对表达式的评估没有计算影响。 控制台的位置取决于编写表达式的配置文件或上下文。 如果在 ArcGIS Online 中创作表达式，则可以在 Arcade 编辑器结果窗口的“控制台”选项卡中访问记录的消息。 在 Web 客户端中执行的表达式会将控制台消息记录到浏览器控制台。","examples":"\n**示例**\n\n记录函数内循环每次迭代的 `max` 值\n\n```arcade\n// The console window will log the following:\n// 'current item is: 10, but max = 10'\n// 'current item is: 0, but max = 10'\n// 'current item is: 84, but max = 84'\n// 'current item is: 30, but max = 84'\n\n// The expression evaluates to 84\nfunction findMax(yourArray) {\n  var maxValue = -Infinity;\n  for (var i in yourArray) {\n    maxValue = IIf(yourArray[i] > maxValue, yourArray[i], maxValue);\n    Console('current item is: ' + i + ', but maxValue = ' + maxValue);\n  }\n  return maxValue;\n}\nvar myArray = [ 10, 0, 84, 30 ];\nfindMax(myArray);\n```\n\n","completion":{"label":"Console","detail":"Console([value1, ..., valueN]?) -> Null","insertText":"Console($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n将消息记录到控制台以进行调试。 此函数对于调试表达式特别有用。 与大多数函数不同，`Console()` 不返回值；相反， 它将消息记录在单独的窗口中，仅用于数据检查目的。 此函数的成功使用对表达式的评估没有计算影响。 控制台的位置取决于编写表达式的配置文件或上下文。 如果在 ArcGIS Online 中创作表达式，则可以在 Arcade 编辑器结果窗口的“控制台”选项卡中访问记录的消息。 在 Web 客户端中执行的表达式会将控制台消息记录到浏览器控制台。\n\n**参数**\n\n- **[value1, ..., valueN]** (_Optional_): [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 要在消息窗口中输出的变量、文本、数字或字典的列表。\n\n**返回值**: Null"}},"parametersInfo":{"min":0,"max":-1}},{"type":"function","name":"getenvironment","bundle":"core","sinceVersion":"1.23","link":"https://developers.arcgis.com/arcade/function-reference/debugging_functions/#getenvironment","description":"提供有关执行 Arcade 表达式的上下文和环境的信息。","examples":"\n**示例**\n\n获取客户端或系统的环境\n\n```arcade\nvar env = GetEnvironment()\n// equals the following when executed in a JavaScript Maps SDK application\n// {\n//  \"version\":\"1.30\",\n//  \"engine\":\"web\",\n//  \"engineVersion\":\"4.32\",\n//  \"application\":\"\",\n//  \"locale\":\"en\",\n//  \"spatialReference\": { \"wkid\": 102100 }\n//  \"timeZone\":\"America/Los_Angeles\",\n//  \"userTimeZone\":\"America/Los_Angeles\"\n// }\nvar locale = IIF(HasValue(env, \"locale\"), env.locale, \"\");\n// returns the locale if it exists, otherwise returns an empty text value\nreturn locale;\n```\n\n","completion":{"label":"GetEnvironment","detail":"GetEnvironment() -> Dictionary","insertText":"GetEnvironment($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.23](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n提供有关执行 Arcade 表达式的上下文和环境的信息。\n\n**返回值**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)  \n返回包含以下属性的字典。 返回的属性可能因运行 Arcade 表达式的位置而异，因此建议使用“HasValue”函数以确保所需环境属性存在。\n\n- **version**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - Arcade 版本。 有关版本的详细信息，请参阅 Arcade 版本矩阵。\n- **engine**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 执行 Arcade 表达式的引擎。 可能的值为：`web`、`native`、`jvm`\n- **engineVersion**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 执行 Arcade 表达式的引擎的版本。 有关版本的详细信息，请参阅 Arcade 版本矩阵。\n- **application**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 在其中运行 Arcade 表达式的应用程序。 由应用程序开发人员设置此值。 因此，此属性可能为空，具体取决于在其中执行表达式的应用程序。\n- **locale**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 客户端或系统的区域设置。\n- **spatialReference**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - Arcade 上下文的空间参考。\n\n  - **wkid**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 空间参考的熟知 ID。\n- **timeZone**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - _自 1.24 起_ 表达式执行上下文的时区。 如果未另外指定时区，则在构造和显示日期值时，将使用此值。\n- **userTimeZone**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - _自 1.30 起_ 执行 Arcade 表达式的设备或浏览器的时区。\n\n**其他资源**\n\n* [Arcade profiles and execution context](https://developers.arcgis.com/arcade/guide/profiles/)\n* [Arcade version matrix](https://developers.arcgis.com/arcade/guide/version-matrix/)\n* [HasValue()](https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#hasvalue)\n"}},"parametersInfo":{"min":0,"max":0}}]},{"id":"track_functions","title":"轨迹函数","items":[{"type":"function","name":"trackaccelerationat","bundle":"track","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackaccelerationat","description":"相对于当前观测点的观测点加速度。","examples":"\n**示例**\n\n您的轨迹具有六个要素，如前所述。 该表达式将为每个要素返回表示加速度的数字(以米/平方秒为单位)。 在本示例中，我们将检查 `value` 为 1 的要素 1 (p1)的结果。 结果等于要素 2 (p2)的加速度。\n\n```arcade\nvar accelerationAt = TrackAccelerationAt(1)\naccelerationAt;\n// returns 0.0167\n```\n\n您的轨迹具有六个要素，如前所述。 该表达式将为每个要素返回表示加速度的数字(以米/平方秒为单位)。 在本示例中，我们将检查 `value` 为 3 的要素 1 (p1)的结果。 结果等于要素 4 (p4)的加速度。\n\n```arcade\nvar accelerationAt = TrackAccelerationAt(3)\naccelerationAt;\n// returns -0.0014\n```\n\n","completion":{"label":"TrackAccelerationAt","detail":"TrackAccelerationAt(value) -> Number","insertText":"TrackAccelerationAt(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n相对于当前观测点的观测点加速度。\n\n**参数**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 当前观测点前后要素数。  \n当前要素位于索引 0 处。 正值表示发生在未来(在当前值之后)的要素。 例如，位置 1 是数组中的下一个值。 负数表示当前要素之前、在过去发生的要素。 例如，-1 是数组中的上一个值。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"trackaccelerationwindow","bundle":"track","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackaccelerationwindow","description":"在当前观测点(0)周围窗口中的第一个值(包含)到最后一个值(不含)之间加速度值。","examples":"\n**示例**\n\n您的轨迹具有六个要素，如前所述。 表达式返回包含指定窗口中各要素加速度值的数组。 以米/平方秒为单位计算加速度。 在本示例中，我们在使用 `startIndex` 为 `-1` 和 `endIndex` 为 `2` 进行评估时，检查了要素 3 (p3)的结果。\n\n```arcade\nvar accelerationWindow = TrackAccelerationWindow(-1, 2)\naccelerationWindow;\n// returns [0.0167, 0.0056, -0.0014]\n```\n\n您的轨迹具有六个要素，如前所述。 表达式返回包含指定窗口中各要素加速度值的数组。 以米/平方秒为单位计算加速度。 在本示例中，我们在使用 `startIndex` 为 `-1` 和 `endIndex` 为 `3` 进行评估时，检查了要素 3 (p3)的结果。\n\n```arcade\nvar accelerationWindow = TrackAccelerationWindow(1, 3)\naccelerationWindow;\n// returns [-0.0014, 0.0014, -0.0028]\n```\n\n","completion":{"label":"TrackAccelerationWindow","detail":"TrackAccelerationWindow(startIndex, endIndex) -> Array<Number>","insertText":"TrackAccelerationWindow(${1:startIndex_}, ${2:endIndex_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n在当前观测点(0)周围窗口中的第一个值(包含)到最后一个值(不含)之间加速度值。\n\n**参数**\n\n- **startIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 开始要素的索引。 当前要素位于索引 0 处。 正值表示发生在未来(在当前值之后)的要素。 例如，位置 1 是数组中的下一个值。 负数表示当前要素之前、在过去发生的要素。 例如，-1 是数组中的上一个值。\n- **endIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要素的索引位于窗口结束处。 当前要素位于索引 0 处。 正值表示发生在未来(在当前值之后)的要素。 例如，位置 1 是数组中的下一个值。 负数表示当前要素之前、在过去发生的要素。 例如，-1 是数组中的上一个值。\n\n**返回值**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Number](https://developers.arcgis.com/arcade/guide/types/#number)&gt;"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"trackcurrentacceleration","bundle":"track","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackcurrentacceleration","description":"在前一观测点和当前观测点之间测量所得的当前观测点的加速度。","examples":"\n**示例**\n\n您的轨迹具有六个要素，如前所述。 该表达式将为每个要素返回表示加速度的数字(以米/平方秒为单位)。 在第一个示例中，我们将检查要素 2 (p2)的结果。\n\n```arcade\nvar currentAcceleration = TrackCurrentAcceleration()\ncurrentAcceleration;\n// returns 0.0167\n```\n\n您的轨迹具有六个要素，如前所述。 该表达式将为每个要素返回表示加速度的数字(以米/平方秒为单位)。 在下一个示例中，我们将检查要素 4 (p4)的结果。\n\n```arcade\nvar currentAcceleration = TrackCurrentAcceleration()\ncurrentAcceleration;\n// returns -0.0014\n```\n\n","completion":{"label":"TrackCurrentAcceleration","detail":"TrackCurrentAcceleration() -> Number","insertText":"TrackCurrentAcceleration($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n在前一观测点和当前观测点之间测量所得的当前观测点的加速度。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"trackcurrentdistance","bundle":"track","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackcurrentdistance","description":"从第一个观测点到当前观测点的观测点之间的距离的总和。","examples":"\n**示例**\n\n您的轨迹具有六个要素，如前所述。 表达式返回轨迹中当前要素的值。 在第一个示例中，我们将检查要素 3 (p3)的结果。 计算为 `80 + 60 = 140`。\n\n```arcade\nvar currentDistance = TrackCurrentDistance()\ncurrentDistance;\n// returns 140\n```\n\n您的轨迹具有六个要素，如前所述。 表达式返回轨迹中当前要素的值。 您的轨迹具有六个要素，如前所述。 表达式返回轨迹中各要素的值。 在下一个示例中，我们将检查要素 6 (p6)的结果。 计算为 `25 + 35 + 30 + 80 + 60 = 230`。\n\n```arcade\nvar currentDistance = TrackCurrentDistance()\ncurrentDistance;\n// returns 230\n```\n\n","completion":{"label":"TrackCurrentDistance","detail":"TrackCurrentDistance() -> Number","insertText":"TrackCurrentDistance($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n从第一个观测点到当前观测点的观测点之间的距离的总和。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"trackcurrentspeed","bundle":"track","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackcurrentspeed","description":"前一观测点和当前观测点之间的速度。","examples":"\n**示例**\n\n您的轨迹具有六个要素，如前所述。 该表达式将为每个要素返回表示速度的数字(以米/秒为单位)。 在第一个示例中，我们将检查要素 2 (p2)的结果。 计算为 `60/60`。\n\n```arcade\nvar currentSpeed = TrackCurrentSpeed()\ncurrentSpeed;\n// returns 1\n```\n\n您的轨迹具有六个要素，如前所述。 该表达式将为每个要素返回表示速度的数字(以米/秒为单位)。 在下一个示例中，我们将检查要素 6 (p6)的结果。 计算为 `25/60`。\n\n```arcade\nvar currentSpeed = TrackCurrentSpeed()\ncurrentSpeed;\n// returns 0.4167\n```\n\n","completion":{"label":"TrackCurrentSpeed","detail":"TrackCurrentSpeed() -> Number","insertText":"TrackCurrentSpeed($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n前一观测点和当前观测点之间的速度。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"trackcurrenttime","bundle":"track","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackcurrenttime","description":"根据轨迹中的当前要素计算时间。","examples":"\n**示例**\n\n返回正在进行评估的当前要素的时间。 例如，如果给定轨迹在 2012 年 1 月 1 日、2012 年 12 月 9 日和 2013 年 5 月 3 日 具有三个要素，则将针对每个要素评估当前时间。 在本示例中，将对 2012 年 12 月 9 日的中间要素进行评估。\n\n```arcade\nTrackCurrentTime();\n// returns December 9, 2012\n```\n\n","completion":{"label":"TrackCurrentTime","detail":"TrackCurrentTime() -> Date","insertText":"TrackCurrentTime($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n根据轨迹中的当前要素计算时间。\n\n**返回值**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"trackdistanceat","bundle":"track","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackdistanceat","description":"从第一个观测点到当前观测点的观测点之间的距离的总和加上给定值。","examples":"\n**示例**\n\n您的轨迹具有六个要素，如前所述。 表达式返回轨迹中各要素的值。 在第一个示例中，我们在索引值为 2 的要素 2 (p2)处进行评估时检查了结果。 计算为 `30 + 80 + 60 = 170`。\n\n```arcade\nTrackDistanceAt(2)\n// returns 170\n```\n\n您的轨迹具有六个要素，如前所述。 表达式返回轨迹中各要素的值。 在第一个示例中，我们将在索引值为 4 的要素 4 (p4)处进行评估时检查结果。 计算为 `25 + 35 + 30 + 80 + 60 = 230`。\n\n```arcade\nTrackDistanceAt(4)\n// returns 230\n```\n\n","completion":{"label":"TrackDistanceAt","detail":"TrackDistanceAt(index) -> Number","insertText":"TrackDistanceAt(${1:index_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n从第一个观测点到当前观测点的观测点之间的距离的总和加上给定值。\n\n**参数**\n\n- **index**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要对其计算距离的轨迹要素的索引。 例如，值 `2` 将计算从轨迹中第一个要素(索引 `0`) 到轨迹中第三个要素(索引 `2`)的距离。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"trackdistancewindow","bundle":"track","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackdistancewindow","description":"在当前观测点(0)周围窗口中的第一个值(包含)到最后一个值(不含)之间的距离。","examples":"\n**示例**\n\n您的轨迹具有六个要素，如前所述。 表达式返回包含窗口中各要素距离值的数组。 在第一个示例中，我们将在使用 `startIndex` 为 `-1` 和 `endIndex` 为 `2` 进行评估时，检查要素 3 (p3)的结果。\n\n```arcade\nvar distanceWindow = TrackDistanceWindow(-1, 2)\ndistanceWindow;\n// returns [60, 140, 170]\n```\n\n您的轨迹具有六个要素，如前所述。 表达式返回包含窗口中各要素距离值的数组。 在下一个示例中，我们将在使用 `startIndex` 为 `-1` 和 `endIndex` 为 `2` 进行评估时，检查要素 5 (p5)的结果。\n\n```arcade\nvar distanceWindow = TrackDistanceWindow(-1, 2)\ndistanceWindow;\n// returns [170, 205, 230]\n```\n\n","completion":{"label":"TrackDistanceWindow","detail":"TrackDistanceWindow(startIndex, endIndex) -> Array<Number>","insertText":"TrackDistanceWindow(${1:startIndex_}, ${2:endIndex_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n在当前观测点(0)周围窗口中的第一个值(包含)到最后一个值(不含)之间的距离。\n\n**参数**\n\n- **startIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 开始要素的索引。 当前要素位于索引 0 处。 正值表示发生在未来(在当前值之后)的要素。 例如，位置 1 是数组中的下一个值。 负数表示当前要素之前、在过去发生的要素。 例如，-1 是数组中的上一个值。\n- **endIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要素的索引位于窗口结束处。 当前要素位于索引 0 处。 正值表示发生在未来(在当前值之后)的要素。 例如，位置 1 是数组中的下一个值。 负数表示当前要素之前、在过去发生的要素。 例如，-1 是数组中的上一个值。\n\n**返回值**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Number](https://developers.arcgis.com/arcade/guide/types/#number)&gt;"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"trackduration","bundle":"track","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackduration","description":"计算从起始要素到当前要素的轨迹持续时间(以毫秒为单位)。","examples":"\n**示例**\n\n返回从 2012 年 1 月 1 日开始到 2013 年 5 月 3 日当前要素的轨迹持续时间。\n\n```arcade\nTrackDuration();\n// returns 42163200000\n```\n\n","completion":{"label":"TrackDuration","detail":"TrackDuration() -> Number","insertText":"TrackDuration($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n计算从起始要素到当前要素的轨迹持续时间(以毫秒为单位)。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"trackfieldwindow","bundle":"track","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackfieldwindow","description":"从指定时间段的指定字段中返回属性值数组。 window 函数可用于使时间前进和后退。","examples":"\n**示例**\n\n轨迹中包含一个字段，其按顺序排列的值为 `[10, 20, 30, 40, 50]`。 要素的几何形状是 `[{x: 1, y: 1},{x: 2, y: 2} ,{x: null, y: null},{x: 4, y: 4}, {x: 5, y: 5}]`。 将在轨迹中的每个要素处评估该表达式。 返回的结果包括起点要素，但不包括终点要素。 将在第二个要素 (20) 处评估此示例，然后返回前一个值 (-1, inclusive) 的数组。\n\n```arcade\nvar window = TrackFieldWindow('MyField', -1,0)\nwindow;\n// returns [10]\n```\n\n轨迹中包含一个名为 `Speed` 的字段，其按顺序排列的值为 `[10, 20, 30, 40, 50]`。 要素的几何形状是 `[{x: 1, y: 1},{x: 2, y: 2} ,{x: null, y: null},{x: 4, y: 4}, {x: 5, y: 5}]`。 将在轨迹中的每个要素处评估该表达式。 对于本示例，将会在第三个要素 (30) 处进行评估时检查结果。 返回的结果包括起点要素，但不包括终点要素。 \n\n```arcade\nvar window = TrackFieldWindow('Speed', -2,2)\nwindow;\n// returns [10,20,30,40]\n```\n\n","completion":{"label":"TrackFieldWindow","detail":"TrackFieldWindow(fieldName, startIndex, endIndex) -> Array<Number>","insertText":"TrackFieldWindow(${1:fieldName_}, ${2:startIndex_}, ${3:endIndex_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n从指定时间段的指定字段中返回属性值数组。 window 函数可用于使时间前进和后退。\n\n**参数**\n\n- **fieldName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 要从其返回值的字段名称。\n- **startIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 开始要素的索引。 当前要素位于索引 `0`。 正值表示发生在未来(在当前值之后)的要素。 例如，位置 `1` 是数组中的下一个值。 负数表示当前要素之前、在过去发生的要素。 例如，`-1` 是数组中的上一个值。\n- **endIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要素的索引位于窗口结束处。 当前要素位于索引 `0`。 正值表示发生在未来(在当前值之后)的要素。 例如，位置 `1` 是数组中的下一个值。 负数表示当前要素之前、在过去发生的要素。 例如，`-1` 是数组中的上一个值。\n\n**返回值**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Number](https://developers.arcgis.com/arcade/guide/types/#number)&gt;"}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"trackgeometrywindow","bundle":"track","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackgeometrywindow","description":"返回指定时间索引的几何数组。 window 函数可用于使时间前进和后退。","examples":"\n**示例**\n\n轨迹中包含一个字段，其按顺序排列的值为 `[10, 20, 30, 40, 50]`。 要素的几何形状是 `[{x: 1, y: 1},{x: 2, y: 2} ,{x: null, y: null},{x: 4, y: 4}, {x: 5, y: 5}]`。 将在轨迹中的每个要素处评估该表达式。 对于本示例，将会在第三个要素 (30) 处进行评估时检查结果。 返回的结果包括起点要素，但不包括终点要素。\n\n```arcade\nvar window = TrackGeometryWindow(-2,2)\nwindow;\n// returns [{x: 1, y: 1},{x: 2, y: 2} ,{x: null, y: null},{x: 4, y: 4}]\n```\n\n","completion":{"label":"TrackGeometryWindow","detail":"TrackGeometryWindow(startIndex, endIndex) -> Array<Geometry>","insertText":"TrackGeometryWindow(${1:startIndex_}, ${2:endIndex_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回指定时间索引的几何数组。 window 函数可用于使时间前进和后退。\n\n**参数**\n\n- **startIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 开始要素的索引。 当前要素位于索引 `0`。 正值表示发生在未来(在当前值之后)的要素。 例如，位置 `1` 是数组中的下一个值。 负数表示当前要素之前、在过去发生的要素。 例如，`-1` 是数组中的上一个值。\n- **endIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要素的索引位于窗口结束处。 当前要素位于索引 `0`。 正值表示发生在未来(在当前值之后)的要素。 例如，位置 `1` 是数组中的下一个值。 负数表示当前要素之前、在过去发生的要素。 例如，`-1` 是数组中的上一个值。\n\n**返回值**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry)&gt;"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"trackindex","bundle":"track","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackindex","description":"返回正在计算的要素的索引。 要素按轨迹内的时间顺序建立索引。","examples":"\n**示例**\n\n返回轨迹中第一个要素的索引。\n\n```arcade\nTrackIndex() // returns 0\n```\n\n","completion":{"label":"TrackIndex","detail":"TrackIndex() -> Number","insertText":"TrackIndex($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回正在计算的要素的索引。 要素按轨迹内的时间顺序建立索引。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"trackspeedat","bundle":"track","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackspeedat","description":"相对于当前观测点的观测点速度。 例如，如果值为 2，则表示其为当前观测点后两个观测点处的观测点速度。","examples":"\n**示例**\n\n您的轨迹具有六个要素，如前所述。 该表达式将为每个要素返回表示速度的数字(以米/秒为单位)。 在第一个示例中，我们将检查 `value` 为 2 的要素 1 (p1)的结果。 计算为 `80/60`。\n\n```arcade\nvar speedAt = TrackSpeedAt(2)\nspeedAt;\n// returns 1.33\n```\n\n您的轨迹具有六个要素，如前所述。 该表达式将为每个要素返回表示速度的数字(以米/秒为单位)。 在以下示例中，我们将检查 `value` 为 -1 的要素 3 (p3)的结果。 计算为 `60/60`。\n\n```arcade\nvar speedAt = TrackSpeedAt(2)\nspeedAt;\n// returns 1\n```\n\n","completion":{"label":"TrackSpeedAt","detail":"TrackSpeedAt(value) -> Number","insertText":"TrackSpeedAt(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n相对于当前观测点的观测点速度。 例如，如果值为 2，则表示其为当前观测点后两个观测点处的观测点速度。\n\n**参数**\n\n- **value**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 当前观测点前后要素数。 当前要素位于索引 0 处。 正值表示发生在未来(在当前值之后)的要素。 例如，位置 1 是数组中的下一个值。 负数表示当前要素之前、在过去发生的要素。 例如，-1 是数组中的上一个值。\n\n**返回值**: [Number](https://developers.arcgis.com/arcade/guide/types/#number)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"trackspeedwindow","bundle":"track","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackspeedwindow","description":"在当前观测点(0)周围窗口中的第一个值(包含) 到最后一个值(不含)之间的速度值。","examples":"\n**示例**\n\n您的轨迹具有六个要素，如前所述。 表达式返回包含指定窗口中各要素速度值的数组。 以米/秒为单位计算速度。 在本示例中，我们在使用 `startIndex` 为 `-1` 和 `endIndex` 为 `2` 进行评估时，检查了要素 3 (p3)的结果。\n\n```arcade\nvar speedWindow = TrackSpeedWindow(-1, 2)\nspeedWindow // returns [1, 1.3, 0.5]\n```\n\n您的轨迹具有六个要素，如前所述。 表达式返回包含指定窗口中各要素速度值的数组。 以米/秒为单位计算速度。 在本示例中，我们在使用 `startIndex` 为 `-1` 和 `endIndex` 为 `3` 进行评估时，检查了要素 3 (p3)的结果。\n\n```arcade\nvar speedWindow = TrackSpeedWindow(1,3)\nspeedWindow // returns [0.5, 0.583, 0.4167]\n```\n\n","completion":{"label":"TrackSpeedWindow","detail":"TrackSpeedWindow(startIndex, endIndex) -> Array<Number>","insertText":"TrackSpeedWindow(${1:startIndex_}, ${2:endIndex_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n在当前观测点(0)周围窗口中的第一个值(包含) 到最后一个值(不含)之间的速度值。\n\n**参数**\n\n- **startIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 开始要素的索引。 当前要素位于索引 0 处。 正值表示发生在未来(在当前值之后)的要素。 例如，位置 1 是数组中的下一个值。 负数表示当前要素之前、在过去发生的要素。 例如，-1 是数组中的上一个值。\n- **endIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要素的索引位于窗口结束处。 当前要素位于索引 0 处。 正值表示发生在未来(在当前值之后)的要素。 例如，位置 1 是数组中的下一个值。 负数表示当前要素之前、在过去发生的要素。 例如，-1 是数组中的上一个值。\n\n**返回值**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Number](https://developers.arcgis.com/arcade/guide/types/#number)&gt;"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"trackstarttime","bundle":"track","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackstarttime","description":"计算轨迹的起始时间。","examples":"\n**示例**\n\n返回从 2012 年 1 月 1 日到 2013 年 5 月 3 日的轨迹的开始时间。\n\n```arcade\nTrackStartTime() // returns January 1, 2012\n```\n\n","completion":{"label":"TrackStartTime","detail":"TrackStartTime() -> Date","insertText":"TrackStartTime($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n计算轨迹的起始时间。\n\n**返回值**: [Date](https://developers.arcgis.com/arcade/guide/types/#date)"}},"parametersInfo":{"min":0,"max":0}},{"type":"function","name":"trackwindow","bundle":"track","sinceVersion":"1.7","link":"https://developers.arcgis.com/arcade/function-reference/track_functions/#trackwindow","description":"返回指定时间索引的要素数组。 此函数可用于使时间前进和后退。","examples":"\n**示例**\n\n轨迹中包含一个字段，其按顺序排列的值为 `[10, 20, 30, 40, 50]`。 要素的几何形状是 `[{x: 1, y: 1},{x: 2, y: 2} ,{x: null, y: null},{x: 4, y: 4}, {x: 5, y: 5}]`。 将在轨迹中的每个要素处评估该表达式。 返回的结果包括起点要素，但不包括终点要素。 将在第二个要素(20)处评估此示例，然后返回单个值(前一个要素)的数组。\n\n```arcade\nvar window = TrackWindow(-1,0)\nwindow;\n// returns [{'geometry': {x: 1, y: 1}}, {'attributes': {'MyField' : 10, 'trackName':'ExampleTrack1'}}]\n```\n\n轨迹中包含一个字段，其按顺序排列的值为 `[10, 20, 30, 40, 50]`。 要素的几何形状是 `[{x: 1, y: 1},{x: 2, y: 2} ,{x: null, y: null},{x: 4, y: 4}, {x: 5, y: 5}]`。 将在轨迹中的每个要素处评估该表达式。 对于本示例，将会在第三个要素 (30) 处进行评估时检查结果。 返回的结果包括起点要素，但不包括终点要素。\n\n```arcade\nvar window = TrackWindow(-2,2)\nwindow;\n/* returns\n[{\n  geometry: [{\n    x: 1,\n    y: 1\n  }, {\n    x: 2,\n    y: 2\n  }, {\n    x: null,\n     y: null\n  }, {\n    x: 4,\n    y: 4\n  }]\n}, {\n  attributes: [{\n    MyField: 10,\n    trackName: 'ExampleTrack1'\n  }, {\n    MyField: 20,\n    trackName: 'ExampleTrack1'\n  }, {\n    MyField: 30,\n    trackName: 'ExampleTrack1'\n  }, {\n    MyField: 40,\n    trackName: 'ExampleTrack1'\n  }]\n}]\n```\n\n","completion":{"label":"TrackWindow","detail":"TrackWindow(startIndex, endIndex) -> Array<Feature>","insertText":"TrackWindow(${1:startIndex_}, ${2:endIndex_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.7](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回指定时间索引的要素数组。 此函数可用于使时间前进和后退。\n\n**参数**\n\n- **startIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 开始要素的索引。 当前要素位于索引 `0`。 正值表示发生在未来(在当前值之后)的要素。 例如，位置 `1` 是数组中的下一个值。 负数表示当前要素之前、在过去发生的要素。 例如，`-1` 是数组中的上一个值。\n- **endIndex**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要素的索引位于窗口结束处。 当前要素位于索引 `0`。 正值表示发生在未来(在当前值之后)的要素。 例如，位置 `1` 是数组中的下一个值。 负数表示当前要素之前、在过去发生的要素。 例如，`-1` 是数组中的上一个值。\n\n**返回值**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Feature](https://developers.arcgis.com/arcade/guide/types/#feature)&gt;"}},"parametersInfo":{"min":2,"max":2}}]},{"id":"logical_functions","title":"逻辑函数","items":[{"type":"function","name":"boolean","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/logical_functions/#boolean","description":"尝试将给定的非布尔值转换为布尔值。 例如，文本值 'true' 将变为 `true`。","examples":"\n**示例**\n\n\n\n```arcade\n// returns `true`\nBoolean('true')\n```\n\n\n\n```arcade\n// returns `false`. A value of 1 would return `true`\nBoolean(0)\n```\n\n\n\n```arcade\n// returns `false`\nBoolean('hello')\n```\n\n","completion":{"label":"Boolean","detail":"Boolean(value) -> Boolean","insertText":"Boolean(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n尝试将给定的非布尔值转换为布尔值。 例如，文本值 'true' 将变为 `true`。\n\n**参数**\n\n- **value**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) \\| [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要转换为布尔型的文本或数值。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"decode","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/logical_functions/#decode","description":"将表达式计算为一个值，并将结果值与后续参数的值进行比较。 如果表达式计算结果为匹配值，则返回后续参数值。 如果未找到匹配值，则返回 `default` 值。 这类似于 switch/case 语句。","examples":"\n**示例**\n\n\n\n```arcade\n// returns a meaningful value when a field contains coded values\nvar code = $feature.codedValue;\nvar decodedValue = Decode(code, 1, 'Residential', 2, 'Commercial', 3, 'Mixed', 'Other');\n```\n\n","completion":{"label":"Decode","detail":"Decode(expression, [compare1, return1, ..., compareN, returnN], default) -> Any","insertText":"Decode(${1:expression_}, ${2:[compare1, return1, ..., compareN, returnN]_}, ${3:default_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n将表达式计算为一个值，并将结果值与后续参数的值进行比较。 如果表达式计算结果为匹配值，则返回后续参数值。 如果未找到匹配值，则返回 `default` 值。 这类似于 switch/case 语句。\n\n**参数**\n\n- **expression**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 必须评估得出可与提供的 case 值相比较的值的 Arcade 表达式。\n- **[compare1, return1, ..., compareN, returnN]**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 一组比较值和返回值对。\n- **default**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 比较值均不匹配的情况下要返回的默认值。 可能是任意类型的值。\n\n**返回值**: [Any](https://developers.arcgis.com/arcade/guide/types/#any)  \n返回匹配的返回值。 如果未找到匹配值，则返回 `default` 值。"}},"parametersInfo":{"min":3,"max":-1}},{"type":"function","name":"defaultvalue","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/logical_functions/#defaultvalue","description":"如果检测到空值，则返回指定默认值。","examples":"\n**示例**\n\n\n\n```arcade\n// If a feature has no value in the POP_2000 field\n// then 'no data' is returned\nDefaultValue($feature.POP_2000, 'no data')\n```\n\n","completion":{"label":"DefaultValue","detail":"DefaultValue(value, defaultValue) -> Any","insertText":"DefaultValue(${1:value_}, ${2:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n如果检测到空值，则返回指定默认值。\n\n**参数**\n\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 要与 `null` 或 `''` 进行比较的输入值。 可能是任意类型的值。 可能为任何类型的值。但是，如果该值为空数组，则将返回空数组。\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 如果提供的 `value` 为空，则返回此值。 `defaultValue` 数据类型必须与 `value` 数据类型相匹配。\n\n**返回值**: [Any](https://developers.arcgis.com/arcade/guide/types/#any)  \n如果 `value` 为空，则返回 `defaultValue`。 否则，将返回 `value` 的值。"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"equals","bundle":"core","sinceVersion":"1.24","link":"https://developers.arcgis.com/arcade/function-reference/logical_functions/#equals","description":"指示两个值是否相等。 仅当为同一对象时，对象类型(例如 Arrays、Features、Dictionaries、Geometry)才会返回 true。","examples":"\n**示例**\n\n比较两个值是否相等\n\n```arcade\nEquals(1, \"1\") // returns false\n\nvar testVal = \"test\";\nEquals(testVal, \"test\") // returns true\n\nvar array1 = Array(5);\nvar array2 = Array(5);\nEquals(array1, array2); // returns false\nEquals(array1, array1); // returns true\n```\n\n","completion":{"label":"Equals","detail":"Equals(value1, value2) -> Boolean","insertText":"Equals(${1:value1_}, ${2:value2_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.24](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n指示两个值是否相等。 仅当为同一对象时，对象类型(例如 Arrays、Features、Dictionaries、Geometry)才会返回 true。\n\n**参数**\n\n- **value1**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 第一个输入值。\n- **value2**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 第二个输入值。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":2,"max":2}},{"type":"function","name":"iif","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/logical_functions/#iif","description":"如果条件表达式评估为 `true`，则返回给定的值，如果条件表达式评估为 `false`，则返回替代值。","examples":"\n**示例**\n\n\n\n```arcade\n// returns 'below' if the value is less than 1,000,000.\n// if the value is more than 1,000,000, then returns 'above'\nvar population = $feature.POP_2007;\nIIf(population < 1000000, 'below', 'above');\n```\n\n","completion":{"label":"IIf","detail":"IIf(condition, trueValue, falseValue) -> Any","insertText":"IIf(${1:condition_}, ${2:trueValue_}, ${3:falseValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n如果条件表达式评估为 `true`，则返回给定的值，如果条件表达式评估为 `false`，则返回替代值。\n\n**参数**\n\n- **condition**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 必须评估为 `true` 或 `false` 的逻辑表达式。\n- **trueValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - `condition` 评估为 `true` 的条件下返回的值。 可能是任意类型的值。\n- **falseValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - `condition` 评估为 `false` 的条件下返回的值。 可能是任意类型的值。\n\n**返回值**: [Any](https://developers.arcgis.com/arcade/guide/types/#any)  \n如果 `condition` 为 `true`，则返回 `trueValue`。 否则，将返回 `falseValue` 的值。"}},"parametersInfo":{"min":3,"max":3}},{"type":"function","name":"isempty","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/logical_functions/#isempty","description":"如果提供的值为 `null` 或空文本(例如 `''`)，则返回 `true`。 将为其他所有情况返回 `false`，包括空数组和字典。","examples":"\n**示例**\n\n\n\n```arcade\n// Returns true\nIsEmpty(null)\n```\n\n\n\n```arcade\n// Returns false\nIsEmpty('hello world')\n```\n\n","completion":{"label":"IsEmpty","detail":"IsEmpty(value) -> Boolean","insertText":"IsEmpty(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n如果提供的值为 `null` 或空文本(例如 `''`)，则返回 `true`。 将为其他所有情况返回 `false`，包括空数组和字典。\n\n**参数**\n\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 要与 `null` 或 `''` 进行比较的值。 可能是任意类型的值。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"isnan","bundle":"core","sinceVersion":"1.5","link":"https://developers.arcgis.com/arcade/function-reference/logical_functions/#isnan","description":"指示输入值是否不为数字 (NaN)。 在下列情况中，数字会被视为 NaN： - `0/0` - `Infinity / Infinity` - `Infinity * 0` - 在使用 NaN 作为操作数的任何运算中 - 将非数字文本或 `undefined` 转换为数字","examples":"\n**示例**\n\n\n\n```arcade\n// Returns true\nIsNan(Infinity / Infinity)\n```\n\n\n\n```arcade\n// Returns false\nIsNan('4')\n```\n\n","completion":{"label":"IsNan","detail":"IsNan(value) -> Boolean","insertText":"IsNan(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.5](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n指示输入值是否不为数字 (NaN)。 在下列情况中，数字会被视为 NaN： - `0/0` - `Infinity / Infinity` - `Infinity * 0` - 在使用 NaN 作为操作数的任何运算中 - 将非数字文本或 `undefined` 转换为数字\n\n**参数**\n\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 要检查其是否为 NaN 的值。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"typeof","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/logical_functions/#typeof","description":"返回输入值的类型。 将返回以下类型之一：数组、日期、文本、 布尔型、数值、字典、要素、FeatureSet、点、面、折线、多点、范围、函数以及无法识别的类型。","examples":"\n**示例**\n\n输出 'Boolean'\n\n```arcade\nTypeOf(true)\n```\n\n输出 'Date'\n\n```arcade\nTypeOf(Now())\n```\n\n","completion":{"label":"TypeOf","detail":"TypeOf(value) -> Text","insertText":"TypeOf(${1:value_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回输入值的类型。 将返回以下类型之一：数组、日期、文本、 布尔型、数值、字典、要素、FeatureSet、点、面、折线、多点、范围、函数以及无法识别的类型。\n\n**参数**\n\n- **value**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 输入值、变量或要素属性。\n\n**返回值**: [Text](https://developers.arcgis.com/arcade/guide/types/#text)"}},"parametersInfo":{"min":1,"max":1}},{"type":"function","name":"when","bundle":"core","sinceVersion":"1.0","link":"https://developers.arcgis.com/arcade/function-reference/logical_functions/#when","description":"评估一系列条件表达式的值，直至一个表达式评估为 `true`。","examples":"\n**示例**\n\n对数值字段值进行重新分类，使其以通用排列的顺序进行排列(文本)。  \n如果表达式为 `false`，则返回 'n/a'。\n\n```arcade\nvar density = $feature.densityField;\nvar ranking = When(density < 50, 'low', density >=50 && density < 100, 'medium', density >= 100, 'high', 'n/a');\n```\n\n","completion":{"label":"When","detail":"When(expression1, result1, [expression2, result2, ..., expressionN, resultN]?, defaultValue) -> Any","insertText":"When(${1:expression1_}, ${2:result1_}, ${3:defaultValue_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.0](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n评估一系列条件表达式的值，直至一个表达式评估为 `true`。\n\n**参数**\n\n- **expression1**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 一个条件表达式，如果它的计算结果为 `true`，则 `result1` 将被返回。\n- **result1**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 如果 `expression1` 的计算结果为 `true`，则返回结果。 可能是任意类型的值。\n- **[expression2, result2, ..., expressionN, resultN]** (_Optional_): [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 给定的表达式评估为 `true` 的情况下的一系列条件表达式和返回值。 可能是任意类型的值。\n- **defaultValue**: [Any](https://developers.arcgis.com/arcade/guide/types/#any) - 如果所有表达式皆评估为 `false`，则将返回此值。 可能是任意类型的值。\n\n**返回值**: [Any](https://developers.arcgis.com/arcade/guide/types/#any)"}},"parametersInfo":{"min":3,"max":-1}}]},{"id":"portal_functions","title":"门户函数","items":[{"type":"function","name":"featuresetbyportalitem","bundle":"portal-access","sinceVersion":"1.8","link":"https://developers.arcgis.com/arcade/function-reference/portal_functions/#featuresetbyportalitem","description":"从给定门户的门户项目中的要素图层创建 FeatureSet。 限制 FeatureSet 中的字段数并排除几何可以提高脚本的性能。","examples":"\n**示例**\n\n从与地图中的要素不同的门户返回图层中的要素数量。\n\n```arcade\nvar features = FeatureSetByPortalItem(\n  Portal('https://www.arcgis.com'),\n  '7b1fb95ab77f40bf8aa09c8b59045449',\n  0,\n  ['Name', 'Count'],\n  false\n);\nCount(features);\n```\n\n","completion":{"label":"FeatureSetByPortalItem","detail":"FeatureSetByPortalItem(portalObject, itemId, layerId?, fields?, includeGeometry?) -> FeatureSet","insertText":"FeatureSetByPortalItem(${1:portalObject_}, ${2:itemId_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.8](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n从给定门户的门户项目中的要素图层创建 FeatureSet。 限制 FeatureSet 中的字段数并排除几何可以提高脚本的性能。\n\n**参数**\n\n- **portalObject**: [Portal](https://developers.arcgis.com/arcade/guide/types/#portal) - 根据给定门户项目 ID 从中查询要素的门户。\n- **itemId**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 引用要素图层或要素服务的门户项目的 GUID。 _请注意这个值必须是文字文本。_\n- **layerId** (_Optional_): [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要素服务中图层的 ID。 该图层必须从要素服务创建；不支持要素集合。\n- **fields** (_Optional_): [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Text](https://developers.arcgis.com/arcade/guide/types/#text)&gt; - 要包括在 FeatureSet 中的字段。 默认情况下，包含所有字段。 要请求图层中的所有字段，请将此值设置为 `['*']`。 限制字段数可以提高脚本性能。\n- **includeGeometry** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 指示是否在要素中包括几何。 由于性能原因，您应该仅在必要时请求几何，例如用于几何函数。\n\n**返回值**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"}},"parametersInfo":{"min":2,"max":5}},[{"type":"function","name":"getuser","bundle":"data-access","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/portal_functions/#getuser1","description":"返回当前工作空间中的用户。 对于来自服务的数据，将返回门户用户或服务器用户。 对于来自数据库连接的数据，将返回数据库用户。 如果没有用户关联到工作空间 (例如文件地理数据库)，则将返回一个 `null` 值。","examples":"\n**示例**\n\n返回活动门户当前登录用户的用户名。 如果没有用户与门户关联，这将返回 `null`。\n\n```arcade\nvar userInfo = GetUser();\nif(HasValue(userInfo, \"username\")){\n  return userInfo.username;\n}\n```\n\n基于给定门户的工作空间连接返回当前登录用户的字典。\n\n```arcade\nGetUser(Portal('https://www.arcgis.com'))\n```\n\n","completion":{"label":"GetUser","detail":"GetUser(portalObject?, username?) -> Dictionary","insertText":"GetUser($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回当前工作空间中的用户。 对于来自服务的数据，将返回门户用户或服务器用户。 对于来自数据库连接的数据，将返回数据库用户。 如果没有用户关联到工作空间 (例如文件地理数据库)，则将返回一个 `null` 值。\n\n**参数**\n\n- **portalObject** (_Optional_): [Portal](https://developers.arcgis.com/arcade/guide/types/#portal) - 要从中返回当前用户的门户。 如果未指定门户，则返回活动门户的用户信息。\n- **username** (_Optional_): [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 要返回的用户的用户名。 发出请求时，将基于您的权限仅返回有限的信息。\n\n**返回值**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)  \n返回以下属性描述的字典。 在离线工作流程中，只会返回用户名。\n\n- **email**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 与用户帐户相关联的电子邮件地址。\n- **fullName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 用户姓名。\n- **groups**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Text](https://developers.arcgis.com/arcade/guide/types/#text)&gt; - 用户所属的组的数组。\n- **id**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 返回用户的用户 ID。\n- **privileges**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Text](https://developers.arcgis.com/arcade/guide/types/#text)&gt; - 用户在其组织内拥有权限的数组(例如，编辑、查看等)。\n- **role**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 用户在其组织中的角色(例如 Administrator、Publisher、User、Viewer 或 Custom)。\n- **username**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 返回用户的用户名。"}},"parametersInfo":{"min":0,"max":2}},{"type":"function","name":"getuser","bundle":"data-access","sinceVersion":"1.12","link":"https://developers.arcgis.com/arcade/function-reference/portal_functions/#getuser2","description":"返回当前工作空间中的用户。 对于来自服务的数据，将返回门户用户或服务器用户。 对于来自数据库连接的数据，将返回数据库用户。 如果没有用户关联到工作空间 (例如文件地理数据库)，则将返回一个 `null` 值。","examples":"\n**示例**\n\n返回活动门户的用户信息。 如果没有用户与门户关联，这将返回 `null`。\n\n```arcade\nGetUser()\n```\n\n基于具有用户扩展的门户返回有关当前登录用户的信息。\n\n```arcade\nGetUser(Portal('https://www.arcgis.com'), true)\n```\n\n","completion":{"label":"GetUser","detail":"GetUser(portalObject?, extensions?) -> Dictionary","insertText":"GetUser($0)","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.12](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n返回当前工作空间中的用户。 对于来自服务的数据，将返回门户用户或服务器用户。 对于来自数据库连接的数据，将返回数据库用户。 如果没有用户关联到工作空间 (例如文件地理数据库)，则将返回一个 `null` 值。\n\n**参数**\n\n- **portalObject** (_Optional_): [Portal](https://developers.arcgis.com/arcade/guide/types/#portal) - 要从中返回当前用户的门户。 如果未指定门户，则返回活动门户的用户信息。\n- **extensions** (_Optional_): [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean) - 确定是否在字典中返回 `userLicenseTypeExtensions`。\n\n**返回值**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary)  \n返回以下属性描述的字典。 在离线工作流程中，只会返回用户名。\n\n- **id**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 返回用户的用户 ID。\n- **username**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 返回用户的用户名。\n- **fullName**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 用户姓名。\n- **email**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 与用户帐户相关联的电子邮件地址。\n- **groups**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Text](https://developers.arcgis.com/arcade/guide/types/#text)&gt; - 用户所属的组的数组。\n- **role**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 用户在其组织中的角色(例如 Administrator、Publisher、User、Viewer 或 Custom)。\n- **privileges**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Text](https://developers.arcgis.com/arcade/guide/types/#text)&gt; - 用户在其组织内拥有权限的数组(例如，编辑、查看等)。\n- **userLicenseTypeExtensions**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Text](https://developers.arcgis.com/arcade/guide/types/#text)&gt; - 与用户帐户关联的许可类型扩展模块的数组(例如 \"Utility Network\"、\"Parcel Fabric\" 等)。 `extensions` 参数必须设置为 `true` 以使其返回。"}},"parametersInfo":{"min":0,"max":2}}],{"type":"function","name":"portal","bundle":"data-access","sinceVersion":"1.8","link":"https://developers.arcgis.com/arcade/function-reference/portal_functions/#portal","description":"创建对 ArcGIS 门户的引用。","examples":"\n**示例**\n\n在 ArcGIS Online 的门户项目中查询要素\n\n```arcade\nvar arcgisPortal = Portal('https://www.arcgis.com');\nvar features = FeatureSetByPortalItem(arcgisPortal, '7b1fb95ab77f40bf8aa09c8b59045449', 0, ['Name', 'Count'], false);\n```\n\n企业门户\n\n```arcade\nPortal('https://www.example.com/arcgis')\n```\n\n","completion":{"label":"Portal","detail":"Portal(url) -> Portal","insertText":"Portal(${1:url_})$0","insertTextMode":2,"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"**[起始版本 1.8](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n创建对 ArcGIS 门户的引用。\n\n**参数**\n\n- **url**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 门户的 URL。\n\n**返回值**: [Portal](https://developers.arcgis.com/arcade/guide/types/#portal)"}},"parametersInfo":{"min":1,"max":1}}]}]