[{"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` 的 'contains’ 關係測試的幾何。 請將此幾何想像成 `insideFeatures` 的可能 'container'。\n- **insideFeatures**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 針對 `containerGeometry` 的 'within' 關係所測試的 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使用可能包含「低」、「高」或「無」值的「密度」欄傳回 FeatureSet\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 的字典中建立新 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 的字典中建立新 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) - 指定的「地圖」中圖層的 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傳回指定地圖中具有「自行車車道」標題的圖層中圖徵數量。\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) - 指定的「地圖」中的圖層標題。 必須從圖徵服務建立此圖層；不支援圖徵集合。 _請注意，此值必須是文字常值。_\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":"建立新圖徵集，其中包含與給定子類型代碼相符的所有圖徵。","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建立新圖徵集，其中包含與給定子類型代碼相符的所有圖徵。\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) - 用於篩選圖徵集或圖層中圖徵的子類型代碼。\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) - 從中傳回第一個圖徵的 FeatureSe。\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) - 要從中傳回目前地理資料庫版本的 FeatureSe。\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 更小的圖徵集。  \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":"從工作空間傳回目前使用者。 若是服務的資料，則會傳回 Portal 使用者或 Server 使用者。 若是資料庫連線的資料，則會傳回資料庫使用者。 當工作空間沒有關聯的使用者時， 例如檔案地理資料庫，將傳回 `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從工作空間傳回目前使用者。 若是服務的資料，則會傳回 Portal 使用者或 Server 使用者。 若是資料庫連線的資料，則會傳回資料庫使用者。 當工作空間沒有關聯的使用者時， 例如檔案地理資料庫，將傳回 `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) - 使用者在其組織內扮演的角色 (例如管理員、發佈者、使用者、檢視者或自訂)。\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":"從工作空間傳回目前使用者。 若是服務的資料，則會傳回 Portal 使用者或 Server 使用者。 若是資料庫連線的資料，則會傳回資料庫使用者。 當工作空間沒有關聯的使用者時， 例如檔案地理資料庫，將傳回 `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從工作空間傳回目前使用者。 若是服務的資料，則會傳回 Portal 使用者或 Server 使用者。 若是資料庫連線的資料，則會傳回資料庫使用者。 當工作空間沒有關聯的使用者時， 例如檔案地理資料庫，將傳回 `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) - 使用者在其組織內扮演的角色 (例如管理員、發佈者、使用者、檢視者或自訂)。\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 單位的值，則將以公尺為單位傳回結果。 請注意，即使資料包含 Z 資訊， 並非所有用戶端 (例如 ArcGIS API for JavaScript 的 3.x 系列) 都支援請求 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 單位的值，則將以公尺為單位傳回結果。 請注意，即使資料包含 Z 資訊， 並非所有用戶端 (例如 ArcGIS API for JavaScript 的 3.x 系列) 都支援請求 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` 的 'overlaps’ 關係測試的圖徵。\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 針對與 `overlappingFeatures` 的 'overlaps’ 關係測試的比較幾何。\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":"傳回子類型編碼值 Dictionary。 未在圖層上啟用子類型時傳回 `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傳回子類型編碼值 Dictionary。 未在圖層上啟用子類型時傳回 `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` 的 'touches’ 關係的圖徵。\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 要測試與 `touchingFeatures` 的 'touches’ 關係的幾何。\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` 的 'within’ 關係測試的基本幾何。\n- **outerFeatures**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 針對 `innerGeometry` 的 'contains’ 關係測試的比較圖徵。\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":"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":"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":"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":"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":"從工作空間傳回目前使用者。 若是服務的資料，則會傳回 Portal 使用者或 Server 使用者。 若是資料庫連線的資料，則會傳回資料庫使用者。 當工作空間沒有關聯的使用者時， 例如檔案地理資料庫，將傳回 `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從工作空間傳回目前使用者。 若是服務的資料，則會傳回 Portal 使用者或 Server 使用者。 若是資料庫連線的資料，則會傳回資料庫使用者。 當工作空間沒有關聯的使用者時， 例如檔案地理資料庫，將傳回 `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) - 使用者在其組織內扮演的角色 (例如管理員、發佈者、使用者、檢視者或自訂)。\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":"從工作空間傳回目前使用者。 若是服務的資料，則會傳回 Portal 使用者或 Server 使用者。 若是資料庫連線的資料，則會傳回資料庫使用者。 當工作空間沒有關聯的使用者時， 例如檔案地理資料庫，將傳回 `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從工作空間傳回目前使用者。 若是服務的資料，則會傳回 Portal 使用者或 Server 使用者。 若是資料庫連線的資料，則會傳回資料庫使用者。 當工作空間沒有關聯的使用者時， 例如檔案地理資料庫，將傳回 `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) - 使用者在其組織內扮演的角色 (例如管理員、發佈者、使用者、檢視者或自訂)。\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 Portal 的參考。","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 Portal 的參考。\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}}]},{"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` 是字典，那麼將使用 `Geometry` 函數建構新幾何。 如果字典中的 `geometry` 為 null 或缺失，則將使用 `null` 幾何建立圖徵。\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) - 要傳回的結構描述所屬的圖徵。\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; - 傳回用來說明圖徵中欄位的字典陣列。 每個字典皆說明欄位 `name`、`alias`、`type`、`subtype`、`domain`、`length`，及其是否為 `editable` 和 `nullable`。\n- **geometryType**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 圖徵中圖徵的幾何類型。 針對不含幾何的表格傳回 `esriGeometryNull`。  \n可能值: `esriGeometryPoint`、`esriGeometryLine`、`esriGeometryPolygon`、`esriGeometryNull`\n- **globalIdField**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 圖徵的全域 ID 欄位。 若未啟用 globalId 則傳回 `\"\"`。\n- **objectIdField**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 圖徵的 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":"傳回子類型編碼值 Dictionary。 未在圖層上啟用子類型時傳回 `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傳回子類型編碼值 Dictionary。 未在圖層上啟用子類型時傳回 `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使用存在的索引鍵檢查字典內陣列中的 null 值\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\nprints 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將文字轉換成 null\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\nprints `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":"檢查字典中巢狀多層的屬性是否有值。 這允許您進一步鑽取巢狀結構，而不是檢查每個級別上的值。 如果結構的每個級別的索引鍵和索引都存在並且包含非 null 值，則傳回 `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檢查字典中巢狀多層的屬性是否有值。 這允許您進一步鑽取巢狀結構，而不是檢查每個級別上的值。 如果結構的每個級別的索引鍵和索引都存在並且包含非 null 值，則傳回 `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":"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) 為單位，傳回三點之間線的算術角度。 從 `pointA` 到 `pointC` 以逆時針方向測量 `pointB` 的角度。\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) 為單位，傳回三點之間線的算術角度。 從 `pointA` 到 `pointC` 以逆時針方向測量 `pointB` 的角度。\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; - 用於計算平面面積的多邊形或圖徵。\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; - 用於計算大地面積的多邊形或圖徵。\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) 為單位，傳回三點之間線的地理角度。 從 `pointA` 到 `pointC` 以順時針方向測量 `pointB` 的方位。\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) 為單位，傳回三點之間線的地理角度。 從 `pointA` 到 `pointC` 以順時針方向測量 `pointB` 的方位。\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` 的 'contains’ 關係測試的幾何。 請將此幾何想像成 `insideGeometry` 的可能 'container'。\n- **insideGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 針對 `containerGeometry` 的 'within' 關係所測試的幾何。\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` 屬性。  \n`format` 控制輸出文字中的順序、間距、填充和分隔符號。  \n小數點前的格式規範字元字串表示最小填充 (例如 `DDD -> 000`)。  \n小數點後的格式字元字串表示精確度 (例如 `DDD -> 000`)。\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` 屬性。  \n`format` 控制輸出文字中的順序、間距、填充和分隔符號。  \n小數點前的格式規範字元字串表示最小填充 (例如 `DDD -> 000`)。  \n小數點後的格式字元字串表示精確度 (例如 `DDD -> 000`)。\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` 的 'disjoint’ 關係測試的基本幾何。\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 針對 `geometry1` 的 'disjoint’ 關係測試的比較幾何。\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":"從字典建構範圍物件。","examples":"\n**範例**\n\n建立範圍物件\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從字典建構範圍物件。\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) - 地理或投影座標系統的已知 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 文字建構範圍物件。 JSON 結構描述必須遵循包絡矩形物件的 ArcGIS REST API JSON 規格。","examples":"\n**範例**\n\n從 JSON 建立範圍物件\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 文字建構範圍物件。 JSON 結構描述必須遵循包絡矩形物件的 ArcGIS REST API JSON 規格。\n\n**參數**\n\n- **jsonDefinition**: [Text](https://developers.arcgis.com/arcade/guide/types/#text) - 從中建構範圍物件的 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 結構描述必須遵循幾何物件的 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 結構描述必須遵循幾何物件的 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":"檢查幾何中巢狀多層的屬性或索引是否有值。 這允許您進一步鑽取巢狀結構，而不是檢查每個級別上的值。 如果結構的每個級別的索引鍵和索引都存在並且包含非 null 值，則傳回 `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檢查幾何中巢狀多層的屬性或索引是否有值。 這允許您進一步鑽取巢狀結構，而不是檢查每個級別上的值。 如果結構的每個級別的索引鍵和索引都存在並且包含非 null 值，則傳回 `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 單位的值，則將以公尺為單位傳回結果。 請注意，即使資料包含 Z 資訊， 並非所有用戶端 (例如 ArcGIS API for JavaScript 的 3.x 系列) 都支援請求 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 單位的值，則將以公尺為單位傳回結果。 請注意，即使資料包含 Z 資訊， 並非所有用戶端 (例如 ArcGIS API for JavaScript 的 3.x 系列) 都支援請求 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 空間中用於計算平面長度的幾何或圖徵。\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) - 從中尋找座標的線條或路徑。 輸入線必須具有等於 `true` 的 `hasM`。 若 `hasM` 為 `false`，則將傳回 `null`。 將圖徵作為輸入時，圖徵的幾何必須是折線。\n- **inputMeasure**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 測量或 m 值，從中找出從線條的開頭沿著 `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- **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":"僅使用一個值陣列作為座標，從字典建構多點物件。","examples":"\n**範例**\n\n建立僅含 x, y 座標的多點\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 值的多點\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 值的多點\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 值的多點\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僅使用一個值陣列作為座標，從字典建構多點物件。\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` 為 true 且 `hasZ` 為 false，則第三個元素表示 m 座標。 否則，第三個元素表示 z 座標。 如果 `hasZ` 和 `hasM` 皆為 true，則第三個元素表示 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) - 地理或投影座標系統的已知 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":"使用點物件的陣列，從字典建構多點物件。","examples":"\n**範例**\n\n建立僅含 x, y 座標的多點\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使用點物件的陣列，從字典建構多點物件。\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) - 地理或投影座標系統的已知 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 結構描述必須遵循多點物件的 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 結構描述必須遵循多點物件的 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` 的 'overlaps’ 關係測試的基本幾何。\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 針對與 `geometry1` 的 'overlaps’ 關係測試的比較幾何。\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":"從字典建構點物件。","examples":"\n**範例**\n\n建立僅含 x, y 座標的點\n\n```arcade\nPoint({\n  x: -97.06138,\n  y: 32.837,\n  spatialReference: { wkid: 3857 }\n});\n```\n\n建立含 m 值的點\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 值的點\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 值的點\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從字典建構點物件。\n\n**參數**\n\n- **geometryDefinition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 從中建構點幾何物件的屬性。\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) - 地理或投影座標系統的已知 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 文字建構點物件。 JSON 結構描述必須遵循點物件的 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 文字建構點物件。 JSON 結構描述必須遵循點物件的 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":"僅使用值陣列作為座標，從字典建構多邊形物件。","examples":"\n**範例**\n\n建立僅含 x, y 座標的多邊形\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 值的多邊形\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 值的多邊形\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 值的多邊形\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僅使用值陣列作為座標，從字典建構多邊形物件。\n\n**參數**\n\n- **geometryDefinition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 從中建構多邊形幾何物件的屬性。\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` 為 true 且 `hasZ` 為 false，則第三個元素表示 m 座標。 否則，第三個元素表示 z 座標。 如果 `hasZ` 和 `hasM` 皆為 true，則第三個元素表示 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` 為 true 且 `hasZ` 為 false，則第三個元素表示 m 座標。 否則，第三個元素表示 z 座標。 如果 `hasZ` 和 `hasM` 皆為 true，則第三個元素表示 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; - 定義橢圓或圓弧。 圓弧在陣列中有四個元素；橢圓弧必須有 7 個元素。\n        - **b**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 表示三次 Bézier 曲線。 這是由一個陣列所定義的，該陣列由代表一個端點和兩個控制點的三個陣列所組成。\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) - 地理或投影座標系統的已知 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":"將點陣列作為座標，從字典建構多邊形物件。","examples":"\n**範例**\n\n建立僅含 x, y 座標的多邊形\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將點陣列作為座標，從字典建構多邊形物件。\n\n**參數**\n\n- **geometryDefinition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 從中建構多邊形幾何物件的屬性。\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; - 定義橢圓或圓弧。 圓弧在陣列中有四個元素；橢圓弧必須有 7 個元素。\n        - **b**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 表示三次 Bézier 曲線。 這是由一個陣列所定義的，該陣列由代表一個端點和兩個控制點的三個陣列所組成。\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) - 地理或投影座標系統的已知 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 文字建構多邊形物件。 JSON 結構描述必須遵循多邊形物件的 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 文字建構多邊形物件。 JSON 結構描述必須遵循多邊形物件的 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":"僅使用值陣列作為座標，從字典建構折線物件。","examples":"\n**範例**\n\n建立僅含 x, y 座標的折線\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 值的折線\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 值的折線\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 值的折線\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僅使用值陣列作為座標，從字典建構折線物件。\n\n**參數**\n\n- **geometryDefinition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 從中建構折線幾何物件的屬性。\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` 為 true 且 `hasZ` 為 false，則第三個元素表示 m 座標。 否則，第三個元素表示 z 座標。 如果 `hasZ` 和 `hasM` 皆為 true，則第三個元素表示 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` 為 true 且 `hasZ` 為 false，則第三個元素表示 m 座標。 否則，第三個元素表示 z 座標。 如果 `hasZ` 和 `hasM` 皆為 true，則第三個元素表示 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; - 定義橢圓或圓弧。 圓弧在陣列中有四個元素；橢圓弧必須有 7 個元素。\n        - **b**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 表示三次 Bézier 曲線。 這是由一個陣列所定義的，該陣列由代表一個端點和兩個控制點的三個陣列所組成。\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) - 地理或投影座標系統的已知 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":"將點陣列作為座標，從字典建構折線物件。","examples":"\n**範例**\n\n建立僅含 x, y 座標的折線\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將點陣列作為座標，從字典建構折線物件。\n\n**參數**\n\n- **geometryDefinition**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) - 從中建構折線幾何物件的屬性。\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; - 定義橢圓或圓弧。 圓弧在陣列中有四個元素；橢圓弧必須有 7 個元素。\n        - **b**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)&lt;[Any](https://developers.arcgis.com/arcade/guide/types/#any)&gt; - 表示三次 Bézier 曲線。 這是由一個陣列所定義的，該陣列由代表一個端點和兩個控制點的三個陣列所組成。\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) - 地理或投影座標系統的已知 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 文字建構折線物件。 JSON 結構描述必須遵循折線物件的 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 文字建構折線物件。 JSON 結構描述必須遵循折線物件的 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) - 維度擴展 9 交集模型 (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) - 要在 XOR 運算中與 `rightGeometry` 比較的幾何執行個體。\n- **rightGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 要在 XOR 運算中與 `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` 的 'touches’ 關係的幾何。\n- **geometry2**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 要測試與 `geometry1` 的 'touches’ 關係的幾何。\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` 的 'within’ 關係測試的基本幾何。\n- **outerGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 針對 `innerGeometry` 的 'contains’ 關係測試的比較幾何。\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":"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":"傳回 number 的絕對值。 若輸入是 `null`，則它會傳回 0。","examples":"\n**範例**\n\nprints 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傳回 number 的絕對值。 若輸入是 `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\nprints 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\nprints 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\nprints 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 至零，或零至 PI，視引數的正負號而定。","examples":"\n**範例**\n\nprints -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 至零，或零至 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\nprints 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\nprints 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\nprints 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\nreturns 5\n\n```arcade\nConstrain(5, 0, 10)\n```\n\nreturns 0\n\n```arcade\nConstrain(-3, 0, 10)\n```\n\nreturns 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) - 限制為指定的「最小值」和「最大值」界限的值。\n- **lowerBound**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 用來限制輸入「值」的下限。 如果指定值少於「最小值」，則傳回「最小值」。\n- **upperBound**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 用來限制輸入「值」的上限。 如果指定值大於「最大值」，則傳回「最大值」。\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\nprints 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":"傳回 x 冪數的 e 值，其中 e 是自然對數的基數，即 `2.718281828`。","examples":"\n**範例**\n\nprints 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傳回 x 冪數的 e 值，其中 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\nprints 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\nprints 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\nprints 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\nprints 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\nprints 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\nprints 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)，及最大數字 (傳遞 0 作為 4)。\n\n```arcade\nNumber('10.456','00.00##') // returns 10.456\n```\n\n指定最小數字 (傳遞 0 作為 2)，及最大數字 (傳遞 0 作為 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\nprints 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\nprints 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\nprints 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\nprints 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\nprints 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\nprints 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\nprints 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\nprints 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\nprints 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\nprints 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\nprints 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":"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\nprints '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\nprints 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\nprints '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\nprints '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\nprints '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\nprints '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\nprints '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\nprints '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\nreturns '[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從寶藍色 `\"#4169E1\"` 的 RGB 值傳回十六進位表示法\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\nprints '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\nprints '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` 具有 `unknown` 時區，則輸出日期值將顯示與輸入 `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將時區為 `unknown` 的日期指派給時間偏移 `+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` 具有 `unknown` 時區，則輸出日期值將顯示與輸入 `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  - `system` - 時區將設定為裝置或系統的本地時區\n\n  - `default` - 設定檔的執行內容的時區\n\n  - `UTC` - 座標通用時間\n\n  - `unknown` - 移除指定值的時區資訊，並顯示表達式中定義的日期和時間。\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  - `system` - 時區將設定為裝置或系統的本地時區\n\n  - `default` - 設定檔的執行內容的時區\n\n  - `UTC` - 座標通用時間\n\n  - `unknown` - 移除指定值的時區資訊，並顯示表達式中定義的日期和時間。\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`，並傳回 UTC 時間 1970 年 1 月 1 日的日期。","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`，並傳回 UTC 時間 1970 年 1 月 1 日的日期。\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) - 日期的時區。 若未指定，將在 `unknown` 時區中建立日期。 可能值:\n\n  - 代表 IANA 時區資料庫中項目的文字 (例如 `America/New_York`)\n\n  - 表示應新增到 UTC 的小時和分鐘的文字 (例如 `+07:00` 或 `-03:00`)\n\n  - `system` - 時區將設定為裝置或系統的本地時區\n\n  - `default` - 設定檔的執行內容的時區\n\n  - `UTC` - 座標通用時間\n\n  - `unknown` - 移除指定值的時區資訊，並顯示表達式中定義的日期和時間。\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) - 要新增至日期的數字單位。 預設為 `milliseconds`。 支援的單位類型包括 `milliseconds`、`seconds`、`minutes`、`hours`、`days`、`months`、`years`\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) - 要新增至日期的數字單位。 預設為 `milliseconds`。 支援的單位類型包括 `milliseconds`、`seconds`、`minutes`、`hours`、`days`、`months`、`years`\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) - 要新增至日期的數字單位。 預設為 `milliseconds`。 支援的單位類型包括 `milliseconds`、`seconds`、`minutes`、`hours`\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) - 用來傳回兩個給定日期差的單位。 支援的單位類型包括 `milliseconds`、`seconds`、`minutes`、`hours`、`days`、`months`、`years`。 預設值是 `milliseconds`。\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  - `system` - 時區將設定為裝置或系統的本地時區\n\n  - `default` - 設定檔的執行內容的時區\n\n  - `UTC` - 座標通用時間\n\n  - `unknown` - 移除指定值的時區資訊，並顯示表達式中定義的日期和時間。\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 值差的單位。 支援的單位類型包括 `milliseconds`、`seconds`、`minutes`、`hours`、`days`、`months`、`years`。 預設值是 `milliseconds`。\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) - 用來傳回兩個給定時間值差的單位。 支援的單位類型包括 `milliseconds`、`seconds`、`minutes`、`hours`。 預設值是 `milliseconds`。\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 月為 `1`，12 月為 `12`。","examples":"\n**範例**\n\n根據 ISO 8601 標準取得指定日期的月份。 傳回 12，代表 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 月為 `1`，12 月為 `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":"建立日期值，表示設定檔之執行內容的時區中的目前日期和時間。","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建立日期值，表示設定檔之執行內容的時區中的目前日期和時間。\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":"建立時間值，表示設定檔之執行內容的時區中的目前時間。","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建立時間值，表示設定檔之執行內容的時區中的目前時間。\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- `system` - 時區將基於用戶端或系統的本地時區\n\n- `UTC` - 座標通用時間\n\n- `Unknown` - 未定義時區資訊。","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- `system` - 時區將基於用戶端或系統的本地時區\n\n- `UTC` - 座標通用時間\n\n- `Unknown` - 未定義時區資訊。\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":"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":"以毫秒為單位，從 epoch 計算開始圖徵到目前圖徵之軌跡的持續時間。","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以毫秒為單位，從 epoch 計算開始圖徵到目前圖徵之軌跡的持續時間。\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":"針對指定的時間範圍，傳回指定的 `field` 的屬性值陣列。 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，含) 的陣列。\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針對指定的時間範圍，傳回指定的 `field` 的屬性值陣列。 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) - 一個 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":"指示兩個值是否相等。 僅當它們是同一物件時，物件類型 (即陣列、圖徵、字典、幾何) 才會傳回 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指示兩個值是否相等。 僅當它們是同一物件時，物件類型 (即陣列、圖徵、字典、幾何) 才會傳回 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\nprints 'Boolean'\n\n```arcade\nTypeOf(true)\n```\n\nprints '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":"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\nprints '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":"檢查多維陣列中巢狀多層的索引是否有值。 這允許您進一步鑽取巢狀結構，而不是檢查每個陣列中的值。 如果結構的每個級別的索引都存在並且包含非 null 值，則傳回 `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檢查多維陣列中巢狀多層的索引是否有值。 這允許您進一步鑽取巢狀結構，而不是檢查每個陣列中的值。 如果結構的每個級別的索引都存在並且包含非 null 值，則傳回 `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\nprints 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\nreturns `['$', 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}}]}]