@arcgis/arcade-languageservice 4.29.0-test.0 → 4.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/README.md +4 -4
- package/{assets → dist/assets}/api/arcade-api.t9n.ar.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.bg.json +495 -30
- package/{assets → dist/assets}/api/arcade-api.t9n.bs.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.ca.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.cs.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.da.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.de.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.el.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.en.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.es.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.et.json +481 -16
- package/{assets → dist/assets}/api/arcade-api.t9n.fi.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.fr.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.he.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.hr.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.hu.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.id.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.it.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.ja.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.ko.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.lt.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.lv.json +481 -16
- package/{assets → dist/assets}/api/arcade-api.t9n.nb.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.nl.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.pl.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.pt-BR.json +481 -16
- package/{assets → dist/assets}/api/arcade-api.t9n.pt-PT.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.ro.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.ru.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.sk.json +481 -16
- package/{assets → dist/assets}/api/arcade-api.t9n.sl.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.sr.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.sv.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.th.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.tr.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.uk.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.vi.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.zh-CN.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.zh-HK.json +493 -28
- package/{assets → dist/assets}/api/arcade-api.t9n.zh-TW.json +493 -28
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.ar.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.bg.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.bs.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.ca.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.cs.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.da.json +15 -3
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.de.json +15 -3
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.el.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.en.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.es.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.et.json +15 -3
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.fi.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.fr.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.he.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.hr.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.hu.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.id.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.it.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.ja.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.ko.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.lt.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.lv.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.nb.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.nl.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.pl.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.pt-BR.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.pt-PT.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.ro.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.ru.json +15 -3
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.sk.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.sl.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.sr.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.sv.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.th.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.tr.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.uk.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.vi.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.zh-CN.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.zh-HK.json +16 -4
- package/{assets → dist/assets}/profiles/arcade-profiles.t9n.zh-TW.json +16 -4
- package/{esm → dist/esm}/index.d.ts +124 -83
- package/dist/esm/index.js +32 -0
- package/package.json +38 -6
- package/esm/index.js +0 -32
- /package/{assets → dist/assets}/t9n/profile.t9n.ar.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.bg.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.bs.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.ca.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.cs.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.da.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.de.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.el.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.en.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.es.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.et.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.fi.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.fr.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.he.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.hr.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.hu.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.id.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.it.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.ja.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.ko.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.lt.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.lv.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.nb.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.nl.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.pl.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.pt-BR.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.pt-PT.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.ro.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.ru.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.sk.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.sl.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.sr.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.sv.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.th.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.tr.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.uk.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.vi.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.zh-CN.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.zh-HK.json +0 -0
- /package/{assets → dist/assets}/t9n/profile.t9n.zh-TW.json +0 -0
|
@@ -649,6 +649,31 @@
|
|
|
649
649
|
"max": 2
|
|
650
650
|
}
|
|
651
651
|
},
|
|
652
|
+
{
|
|
653
|
+
"type": "function",
|
|
654
|
+
"name": "filterbysubtypecode",
|
|
655
|
+
"bundle": "data-access",
|
|
656
|
+
"sinceVersion": "1.25",
|
|
657
|
+
"link": "https://developers.arcgis.com/arcade/function-reference/featureset_functions/#filterbysubtypecode",
|
|
658
|
+
"description": "创建一个新的 FeatureSet,其中包含与给定子类型代码相匹配的所有要素。",
|
|
659
|
+
"examples": "\n##### 示例\n\n使用子类型代码过滤要素\n\n```arcade\n// Returns all features that have the given subtype code\nFilterBySubtypeCode($layer, 5)\n```\n\n",
|
|
660
|
+
"completion": {
|
|
661
|
+
"label": "FilterBySubtypeCode",
|
|
662
|
+
"detail": "FilterBySubtypeCode(features, subtypeCode) -> FeatureSet",
|
|
663
|
+
"insertText": "FilterBySubtypeCode(${1:features_}, ${2:subtypeCode_})$0",
|
|
664
|
+
"insertTextMode": 2,
|
|
665
|
+
"insertTextFormat": 2,
|
|
666
|
+
"kind": 3,
|
|
667
|
+
"documentation": {
|
|
668
|
+
"kind": "markdown",
|
|
669
|
+
"value": "**[起始版本 1.25](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n创建一个新的 FeatureSet,其中包含与给定子类型代码相匹配的所有要素。\n\n**参数**\n\n- **features**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset) - 要过滤的 FeatureSet 或图层。\n- **subtypeCode**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 用于过滤 FeatureSet 或图层中要素的子类型代码。\n\n**返回值**: [FeatureSet](https://developers.arcgis.com/arcade/guide/types/#featureset)"
|
|
670
|
+
}
|
|
671
|
+
},
|
|
672
|
+
"parametersInfo": {
|
|
673
|
+
"min": 2,
|
|
674
|
+
"max": 2
|
|
675
|
+
}
|
|
676
|
+
},
|
|
652
677
|
{
|
|
653
678
|
"type": "function",
|
|
654
679
|
"name": "first",
|
|
@@ -882,7 +907,7 @@
|
|
|
882
907
|
"sinceVersion": "1.14",
|
|
883
908
|
"link": "https://developers.arcgis.com/arcade/function-reference/featureset_functions/#length3d",
|
|
884
909
|
"description": "根据高度或 Z 信息,返回输入 FeatureSet 的平面(即笛卡尔)长度。 必须为提供给该函数的几何分配一个投影坐标系。 如果空间参考不提供 Z 单位的值,则返回结果将以米为单位。 请记住,并非所有客户端(例如 ArcGIS API for JavaScript 的 3.x 系列)都支持 即使数据包含 Z 信息,也请求 Z 值。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此,在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件,例如弹出窗口,提供全分辨率几何。_",
|
|
885
|
-
"examples": "\n##### 示例\n\n以米为单位返回图层要素的 3D 长度\n\n```arcade\
|
|
910
|
+
"examples": "\n##### 示例\n\n以米为单位返回图层要素的 3D 长度\n\n```arcade\nLength3D($layer, 'meters')\n```\n\n",
|
|
886
911
|
"completion": {
|
|
887
912
|
"label": "Length3D",
|
|
888
913
|
"detail": "Length3D(features, unit?) -> Number",
|
|
@@ -1688,6 +1713,57 @@
|
|
|
1688
1713
|
"max": 2
|
|
1689
1714
|
}
|
|
1690
1715
|
},
|
|
1716
|
+
[
|
|
1717
|
+
{
|
|
1718
|
+
"type": "function",
|
|
1719
|
+
"name": "defaultvalue",
|
|
1720
|
+
"bundle": "core",
|
|
1721
|
+
"sinceVersion": "1.26",
|
|
1722
|
+
"link": "https://developers.arcgis.com/arcade/function-reference/geometry_functions/#defaultvalue1",
|
|
1723
|
+
"description": "如果几何中的键不存在,或指定键处的值为 `null` 或空文本值,则返回指定默认值。",
|
|
1724
|
+
"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",
|
|
1725
|
+
"completion": {
|
|
1726
|
+
"label": "DefaultValue",
|
|
1727
|
+
"detail": "DefaultValue(container, key, defaultValue) -> Any",
|
|
1728
|
+
"insertText": "DefaultValue(${1:container_}, ${2:key_}, ${3:defaultValue_})$0",
|
|
1729
|
+
"insertTextMode": 2,
|
|
1730
|
+
"insertTextFormat": 2,
|
|
1731
|
+
"kind": 3,
|
|
1732
|
+
"documentation": {
|
|
1733
|
+
"kind": "markdown",
|
|
1734
|
+
"value": "**[起始版本 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n如果几何中的键不存在,或指定键处的值为 `null` 或空文本值,则返回指定默认值。\n\n**参数**\n\n- **container**: [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` 中指定的值。"
|
|
1735
|
+
}
|
|
1736
|
+
},
|
|
1737
|
+
"parametersInfo": {
|
|
1738
|
+
"min": 3,
|
|
1739
|
+
"max": 3
|
|
1740
|
+
}
|
|
1741
|
+
},
|
|
1742
|
+
{
|
|
1743
|
+
"type": "function",
|
|
1744
|
+
"name": "defaultvalue",
|
|
1745
|
+
"bundle": "core",
|
|
1746
|
+
"link": "https://developers.arcgis.com/arcade/function-reference/geometry_functions/#defaultvalue2",
|
|
1747
|
+
"description": "如果几何嵌套属性中至少一个键不存在,或指定键处的值为 `null` 或空文本值,则返回指定默认值。",
|
|
1748
|
+
"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",
|
|
1749
|
+
"completion": {
|
|
1750
|
+
"label": "DefaultValue",
|
|
1751
|
+
"detail": "DefaultValue(container, keys, defaultValue) -> Any",
|
|
1752
|
+
"insertText": "DefaultValue(${1:container_}, ${2:keys_}, ${3:defaultValue_})$0",
|
|
1753
|
+
"insertTextMode": 2,
|
|
1754
|
+
"insertTextFormat": 2,
|
|
1755
|
+
"kind": 3,
|
|
1756
|
+
"documentation": {
|
|
1757
|
+
"kind": "markdown",
|
|
1758
|
+
"value": "如果几何嵌套属性中至少一个键不存在,或指定键处的值为 `null` 或空文本值,则返回指定默认值。\n\n**参数**\n\n- **container**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - 要检查的输入几何。\n- **keys**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [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` 中指定的值。"
|
|
1759
|
+
}
|
|
1760
|
+
},
|
|
1761
|
+
"parametersInfo": {
|
|
1762
|
+
"min": 3,
|
|
1763
|
+
"max": 3
|
|
1764
|
+
}
|
|
1765
|
+
}
|
|
1766
|
+
],
|
|
1691
1767
|
{
|
|
1692
1768
|
"type": "function",
|
|
1693
1769
|
"name": "densify",
|
|
@@ -1838,6 +1914,31 @@
|
|
|
1838
1914
|
"max": 3
|
|
1839
1915
|
}
|
|
1840
1916
|
},
|
|
1917
|
+
{
|
|
1918
|
+
"type": "function",
|
|
1919
|
+
"name": "distancetocoordinate",
|
|
1920
|
+
"bundle": "geometry",
|
|
1921
|
+
"sinceVersion": "1.26",
|
|
1922
|
+
"link": "https://developers.arcgis.com/arcade/function-reference/geometry_functions/#distancetocoordinate",
|
|
1923
|
+
"description": "根据给定距离沿输入线返回一个坐标。 尝试在给定距离内找到坐标时,考虑线的所有部分。 距离不包括线的路径(或部分)之间的间隙。 如果沿输入线未找到距离,则结果将为 `null`。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此,在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件,例如弹出窗口,提供全分辨率几何。_",
|
|
1924
|
+
"examples": "\n##### 示例\n\n根据给定距离值返回输入折线的坐标\n\n```arcade\nvar result = DistanceToCoordinate($feature, 1038);\n\nreturn result.coordinate;\n```\n\n",
|
|
1925
|
+
"completion": {
|
|
1926
|
+
"label": "DistanceToCoordinate",
|
|
1927
|
+
"detail": "DistanceToCoordinate(inputLine, inputDistance) -> Dictionary",
|
|
1928
|
+
"insertText": "DistanceToCoordinate(${1:inputLine_}, ${2:inputDistance_})$0",
|
|
1929
|
+
"insertTextMode": 2,
|
|
1930
|
+
"insertTextFormat": 2,
|
|
1931
|
+
"kind": 3,
|
|
1932
|
+
"documentation": {
|
|
1933
|
+
"kind": "markdown",
|
|
1934
|
+
"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)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> \\| [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- **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。"
|
|
1935
|
+
}
|
|
1936
|
+
},
|
|
1937
|
+
"parametersInfo": {
|
|
1938
|
+
"min": 2,
|
|
1939
|
+
"max": 2
|
|
1940
|
+
}
|
|
1941
|
+
},
|
|
1841
1942
|
{
|
|
1842
1943
|
"type": "function",
|
|
1843
1944
|
"name": "envelopeintersects",
|
|
@@ -2011,6 +2112,58 @@
|
|
|
2011
2112
|
"max": 1
|
|
2012
2113
|
}
|
|
2013
2114
|
},
|
|
2115
|
+
[
|
|
2116
|
+
{
|
|
2117
|
+
"type": "function",
|
|
2118
|
+
"name": "hasvalue",
|
|
2119
|
+
"bundle": "core",
|
|
2120
|
+
"sinceVersion": "1.26",
|
|
2121
|
+
"link": "https://developers.arcgis.com/arcade/function-reference/geometry_functions/#hasvalue1",
|
|
2122
|
+
"description": "指示几何在给定键或索引处是否有值。",
|
|
2123
|
+
"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",
|
|
2124
|
+
"completion": {
|
|
2125
|
+
"label": "HasValue",
|
|
2126
|
+
"detail": "HasValue(inputGeometry, key) -> Boolean",
|
|
2127
|
+
"insertText": "HasValue(${1:inputGeometry_}, ${2:key_})$0",
|
|
2128
|
+
"insertTextMode": 2,
|
|
2129
|
+
"insertTextFormat": 2,
|
|
2130
|
+
"kind": 3,
|
|
2131
|
+
"documentation": {
|
|
2132
|
+
"kind": "markdown",
|
|
2133
|
+
"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)"
|
|
2134
|
+
}
|
|
2135
|
+
},
|
|
2136
|
+
"parametersInfo": {
|
|
2137
|
+
"min": 2,
|
|
2138
|
+
"max": 2
|
|
2139
|
+
}
|
|
2140
|
+
},
|
|
2141
|
+
{
|
|
2142
|
+
"type": "function",
|
|
2143
|
+
"name": "hasvalue",
|
|
2144
|
+
"bundle": "core",
|
|
2145
|
+
"sinceVersion": "1.26",
|
|
2146
|
+
"link": "https://developers.arcgis.com/arcade/function-reference/geometry_functions/#hasvalue2",
|
|
2147
|
+
"description": "检查几何中嵌套多个层级的属性或索引是否存在值。 这允许您一步深入到嵌套结构中,而不是检查每个层级中的值。 如果结构的每个层级中均存在键和索引且包含非空值,则返回 `true`。",
|
|
2148
|
+
"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",
|
|
2149
|
+
"completion": {
|
|
2150
|
+
"label": "HasValue",
|
|
2151
|
+
"detail": "HasValue(inputGeometry, keys) -> Boolean",
|
|
2152
|
+
"insertText": "HasValue(${1:inputGeometry_}, ${2:keys_})$0",
|
|
2153
|
+
"insertTextMode": 2,
|
|
2154
|
+
"insertTextFormat": 2,
|
|
2155
|
+
"kind": 3,
|
|
2156
|
+
"documentation": {
|
|
2157
|
+
"kind": "markdown",
|
|
2158
|
+
"value": "**[起始版本 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n检查几何中嵌套多个层级的属性或索引是否存在值。 这允许您一步深入到嵌套结构中,而不是检查每个层级中的值。 如果结构的每个层级中均存在键和索引且包含非空值,则返回 `true`。\n\n**参数**\n\n- **inputGeometry**: [Geometry](https://developers.arcgis.com/arcade/guide/types/#geometry) - 要检查的字典或功能。\n- **keys**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)> - 要在结构的每个层级中检查的键或索引数组。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"
|
|
2159
|
+
}
|
|
2160
|
+
},
|
|
2161
|
+
"parametersInfo": {
|
|
2162
|
+
"min": 2,
|
|
2163
|
+
"max": 2
|
|
2164
|
+
}
|
|
2165
|
+
}
|
|
2166
|
+
],
|
|
2014
2167
|
{
|
|
2015
2168
|
"type": "function",
|
|
2016
2169
|
"name": "intersection",
|
|
@@ -2186,6 +2339,31 @@
|
|
|
2186
2339
|
"max": 2
|
|
2187
2340
|
}
|
|
2188
2341
|
},
|
|
2342
|
+
{
|
|
2343
|
+
"type": "function",
|
|
2344
|
+
"name": "measuretocoordinate",
|
|
2345
|
+
"bundle": "geometry",
|
|
2346
|
+
"sinceVersion": "1.26",
|
|
2347
|
+
"link": "https://developers.arcgis.com/arcade/function-reference/geometry_functions/#measuretocoordinate",
|
|
2348
|
+
"description": "根据给定测量值或 m 值沿输入线返回第一个坐标。 如果沿输入线未找到测量值,则结果将为 `null`。 尝试在给定测量值处找到坐标时,考虑线的所有部分。 测量值不包括线的路径(或部分)之间的间隙。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此,在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件,例如弹出窗口,提供全分辨率几何。_",
|
|
2349
|
+
"examples": "\n##### 示例\n\n根据给定测量值返回输入折线的坐标\n\n```arcade\nvar result = MeasureToCoordinate(Geometry($feature), 110);\n\nreturn result.coordinate;\n```\n\n",
|
|
2350
|
+
"completion": {
|
|
2351
|
+
"label": "MeasureToCoordinate",
|
|
2352
|
+
"detail": "MeasureToCoordinate(inputLine, inputMeasure) -> Dictionary",
|
|
2353
|
+
"insertText": "MeasureToCoordinate(${1:inputLine_}, ${2:inputMeasure_})$0",
|
|
2354
|
+
"insertTextMode": 2,
|
|
2355
|
+
"insertTextFormat": 2,
|
|
2356
|
+
"kind": 3,
|
|
2357
|
+
"documentation": {
|
|
2358
|
+
"kind": "markdown",
|
|
2359
|
+
"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)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> \\| [Feature](https://developers.arcgis.com/arcade/guide/types/#feature) - 用于找到坐标的线或路径。 输入线的 `hasM` 必须等于 `true`。 如果 `hasM` 为 `false`,则将返回 `null`。 使用要素作为输入时,要素的几何必须是折线。\n- **inputMeasure**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 从线起点沿 `inputLine` 找到坐标的测量值或 m 值。 尝试在给定测量值处找到坐标时,考虑线的所有部分。 测量值不包括线的路径(或部分)之间的间隙。\n\n**返回值**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \n返回具有以下属性的字典。 如果沿输入线未找到测量值,则结果将为 `null`。\n\n- **coordinate**: [Point](https://developers.arcgis.com/arcade/guide/types/#point) - 根据给定测量值沿 `inputLine` 的点的第一个坐标。\n- **distanceAlong**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 从 `inputLine` 起点沿线测量到 `coordinate` 的平面距离。 在路径不相连的折线中,`distanceAlong` 值不包括路径起止折点间间隙的距离。\n- **partId**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 在折线输入的情况下,`coordinate` 所属路径的索引。\n- **segmentId**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - `coordinate` 所属线段的索引(相对于路径)。 如果 `coordinate` 代表输入线的一个折点,则 `segmentId` 将返回前一个折点的索引。 如果 `coordinate` 是 `inputLine` 的第一个折点,则 `segmentId` 的值将为 0。"
|
|
2360
|
+
}
|
|
2361
|
+
},
|
|
2362
|
+
"parametersInfo": {
|
|
2363
|
+
"min": 2,
|
|
2364
|
+
"max": 2
|
|
2365
|
+
}
|
|
2366
|
+
},
|
|
2189
2367
|
{
|
|
2190
2368
|
"type": "function",
|
|
2191
2369
|
"name": "multiparttosinglepart",
|
|
@@ -2302,7 +2480,7 @@
|
|
|
2302
2480
|
"kind": 3,
|
|
2303
2481
|
"documentation": {
|
|
2304
2482
|
"kind": "markdown",
|
|
2305
|
-
"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`
|
|
2483
|
+
"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` 的上方。"
|
|
2306
2484
|
}
|
|
2307
2485
|
},
|
|
2308
2486
|
"parametersInfo": {
|
|
@@ -2327,7 +2505,7 @@
|
|
|
2327
2505
|
"kind": 3,
|
|
2328
2506
|
"documentation": {
|
|
2329
2507
|
"kind": "markdown",
|
|
2330
|
-
"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`
|
|
2508
|
+
"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` 的上方。"
|
|
2331
2509
|
}
|
|
2332
2510
|
},
|
|
2333
2511
|
"parametersInfo": {
|
|
@@ -2435,6 +2613,31 @@
|
|
|
2435
2613
|
}
|
|
2436
2614
|
}
|
|
2437
2615
|
],
|
|
2616
|
+
{
|
|
2617
|
+
"type": "function",
|
|
2618
|
+
"name": "pointtocoordinate",
|
|
2619
|
+
"bundle": "geometry",
|
|
2620
|
+
"sinceVersion": "1.26",
|
|
2621
|
+
"link": "https://developers.arcgis.com/arcade/function-reference/geometry_functions/#pointtocoordinate",
|
|
2622
|
+
"description": "返回搜索点到输入线的最近坐标和到该坐标的距离。\n\n_可视化和标签配置文件中的要素几何 会根据视图的比例分辨率进行概化以提高绘制性能。 因此,在这些上下文中使用要素的几何(即 `$feature`)作为任何几何函数的输入 将返回因比例级别而异的结果。 其他配置文件,例如弹出窗口,提供全分辨率几何。_",
|
|
2623
|
+
"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",
|
|
2624
|
+
"completion": {
|
|
2625
|
+
"label": "PointToCoordinate",
|
|
2626
|
+
"detail": "PointToCoordinate(inputLine, searchPoint) -> Dictionary",
|
|
2627
|
+
"insertText": "PointToCoordinate(${1:inputLine_}, ${2:searchPoint_})$0",
|
|
2628
|
+
"insertTextMode": 2,
|
|
2629
|
+
"insertTextFormat": 2,
|
|
2630
|
+
"kind": 3,
|
|
2631
|
+
"documentation": {
|
|
2632
|
+
"kind": "markdown",
|
|
2633
|
+
"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)<[Point](https://developers.arcgis.com/arcade/guide/types/#point)> \\| [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。"
|
|
2634
|
+
}
|
|
2635
|
+
},
|
|
2636
|
+
"parametersInfo": {
|
|
2637
|
+
"min": 2,
|
|
2638
|
+
"max": 2
|
|
2639
|
+
}
|
|
2640
|
+
},
|
|
2438
2641
|
[
|
|
2439
2642
|
{
|
|
2440
2643
|
"type": "function",
|
|
@@ -2873,7 +3076,7 @@
|
|
|
2873
3076
|
"sinceVersion": "1.7",
|
|
2874
3077
|
"link": "https://developers.arcgis.com/arcade/function-reference/feature_functions/#domaincode",
|
|
2875
3078
|
"description": "返回要素中的关联属性域描述的代码。",
|
|
2876
|
-
"examples": "\n##### 示例\n\n
|
|
3079
|
+
"examples": "\n##### 示例\n\n打印参考字段的属性域代码。\n\n```arcade\nDomainCode($feature, 'Enabled', 'True')\n```\n\n",
|
|
2877
3080
|
"completion": {
|
|
2878
3081
|
"label": "DomainCode",
|
|
2879
3082
|
"detail": "DomainCode(inputFeature, fieldName, value?, subtype?) -> Number,Text",
|
|
@@ -3090,6 +3293,31 @@
|
|
|
3090
3293
|
"max": 1
|
|
3091
3294
|
}
|
|
3092
3295
|
},
|
|
3296
|
+
{
|
|
3297
|
+
"type": "function",
|
|
3298
|
+
"name": "hasvalue",
|
|
3299
|
+
"bundle": "core",
|
|
3300
|
+
"sinceVersion": "1.20",
|
|
3301
|
+
"link": "https://developers.arcgis.com/arcade/function-reference/feature_functions/#hasvalue",
|
|
3302
|
+
"description": "指示要素是否具有给定字段,以及该字段是否有值。",
|
|
3303
|
+
"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",
|
|
3304
|
+
"completion": {
|
|
3305
|
+
"label": "HasValue",
|
|
3306
|
+
"detail": "HasValue(inputFeature, fieldName) -> Boolean",
|
|
3307
|
+
"insertText": "HasValue(${1:inputFeature_}, ${2:fieldName_})$0",
|
|
3308
|
+
"insertTextMode": 2,
|
|
3309
|
+
"insertTextFormat": 2,
|
|
3310
|
+
"kind": 3,
|
|
3311
|
+
"documentation": {
|
|
3312
|
+
"kind": "markdown",
|
|
3313
|
+
"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)"
|
|
3314
|
+
}
|
|
3315
|
+
},
|
|
3316
|
+
"parametersInfo": {
|
|
3317
|
+
"min": 2,
|
|
3318
|
+
"max": 2
|
|
3319
|
+
}
|
|
3320
|
+
},
|
|
3093
3321
|
{
|
|
3094
3322
|
"type": "function",
|
|
3095
3323
|
"name": "schema",
|
|
@@ -3196,6 +3424,57 @@
|
|
|
3196
3424
|
"id": "dictionary_functions",
|
|
3197
3425
|
"title": "字典函数",
|
|
3198
3426
|
"items": [
|
|
3427
|
+
[
|
|
3428
|
+
{
|
|
3429
|
+
"type": "function",
|
|
3430
|
+
"name": "defaultvalue",
|
|
3431
|
+
"bundle": "core",
|
|
3432
|
+
"sinceVersion": "1.26",
|
|
3433
|
+
"link": "https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#defaultvalue1",
|
|
3434
|
+
"description": "如果字典中的键不存在,或指定键处的值为 `null` 或空文本值,则返回指定默认值。",
|
|
3435
|
+
"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",
|
|
3436
|
+
"completion": {
|
|
3437
|
+
"label": "DefaultValue",
|
|
3438
|
+
"detail": "DefaultValue(container, key, defaultValue) -> Any",
|
|
3439
|
+
"insertText": "DefaultValue(${1:container_}, ${2:key_}, ${3:defaultValue_})$0",
|
|
3440
|
+
"insertTextMode": 2,
|
|
3441
|
+
"insertTextFormat": 2,
|
|
3442
|
+
"kind": 3,
|
|
3443
|
+
"documentation": {
|
|
3444
|
+
"kind": "markdown",
|
|
3445
|
+
"value": "**[起始版本 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n如果字典中的键不存在,或指定键处的值为 `null` 或空文本值,则返回指定默认值。\n\n**参数**\n\n- **container**: [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` 中指定的值。"
|
|
3446
|
+
}
|
|
3447
|
+
},
|
|
3448
|
+
"parametersInfo": {
|
|
3449
|
+
"min": 3,
|
|
3450
|
+
"max": 3
|
|
3451
|
+
}
|
|
3452
|
+
},
|
|
3453
|
+
{
|
|
3454
|
+
"type": "function",
|
|
3455
|
+
"name": "defaultvalue",
|
|
3456
|
+
"bundle": "core",
|
|
3457
|
+
"link": "https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#defaultvalue2",
|
|
3458
|
+
"description": "如果嵌套字典中至少一个键不存在,或指定键处的值为 `null` 或空文本值,则返回指定默认值。",
|
|
3459
|
+
"examples": "\n##### 示例\n\nDefaultValue 返回定义的值\n\n```arcade\nvar data = {\n time: Date(2024, 0, 24, 12),\n weather: {\n precipitation: {\n type: \"rain\",\n value: 0.4,\n unit: \"inches\"\n },\n temperature: {\n value: 50,\n unit: \"f\"\n },\n conditions: {\n description: \"Overcast\"\n }\n }\n}\n\nDefaultValue(data, [\"weather\", \"precipitation\", \"value\"], \"No time logged\")\n// value of data.weather.precipitation.value is defined, so it is returned\n// returns 0.4\n```\n\n如果指定键出没有值,则 DefaultValue 返回默认值。\n\n```arcade\nvar data = {\n time: Date(2024, 0, 24, 12),\n weather: {\n precipitation: {\n type: \"rain\",\n value: null,\n unit: \"inches\"\n },\n temperature: {\n value: 50,\n unit: \"f\"\n },\n conditions: {\n description: \"Overcast\"\n }\n }\n}\n\nDefaultValue(data, [\"weather\", \"precipitation\", \"value\"], 0)\n// value of data.weather.precipitation.value is null, so the default is returned\n// returns 0\n```\n\n如果键不存在,则 DefaultValue 返回默认值。\n\n```arcade\nvar data = {\n time: Date(2024, 0, 24, 12),\n weather: {\n precipitation: {\n type: \"rain\",\n value: null,\n unit: \"inches\"\n },\n temperature: {\n value: 50,\n unit: \"f\"\n },\n conditions: {\n description: \"Overcast\"\n }\n }\n}\n\nDefaultValue(data, [\"weather\", \"wind\", \"value\"], \"n/a\")\n// the data.weather.wind key does not exist, so the default is returned\n// returns \"n/a\"\n```\n\n检查包含键的字典中的数组内是否存在空值\n\n```arcade\nvar data = {\n time: Date(2024, 0, 24, 12),\n interval: 1,\n intervalUnit: \"days\",\n weather: {\n precipitation: {\n type: \"rain\",\n values: [0.4, 0, 0, null, 0.1, 0.8, 1],\n unit: \"inches\"\n },\n temperature: {\n values: [50, 50, 51, 52, 55, 49, 51],\n unit: \"f\"\n },\n }\n}\n\nDefaultValue(data, [\"weather\", \"precipitation\", \"values\", 3], 0)\n// the value data.weather.precipitation.values[3] is null, so the default is returned\n// returns 0\n```\n\n",
|
|
3460
|
+
"completion": {
|
|
3461
|
+
"label": "DefaultValue",
|
|
3462
|
+
"detail": "DefaultValue(container, keys, defaultValue) -> Any",
|
|
3463
|
+
"insertText": "DefaultValue(${1:container_}, ${2:keys_}, ${3:defaultValue_})$0",
|
|
3464
|
+
"insertTextMode": 2,
|
|
3465
|
+
"insertTextFormat": 2,
|
|
3466
|
+
"kind": 3,
|
|
3467
|
+
"documentation": {
|
|
3468
|
+
"kind": "markdown",
|
|
3469
|
+
"value": "如果嵌套字典中至少一个键不存在,或指定键处的值为 `null` 或空文本值,则返回指定默认值。\n\n**参数**\n\n- **container**: [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)<[Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [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` 中指定的值。"
|
|
3470
|
+
}
|
|
3471
|
+
},
|
|
3472
|
+
"parametersInfo": {
|
|
3473
|
+
"min": 3,
|
|
3474
|
+
"max": 3
|
|
3475
|
+
}
|
|
3476
|
+
}
|
|
3477
|
+
],
|
|
3199
3478
|
[
|
|
3200
3479
|
{
|
|
3201
3480
|
"type": "function",
|
|
@@ -3371,31 +3650,58 @@
|
|
|
3371
3650
|
"max": 2
|
|
3372
3651
|
}
|
|
3373
3652
|
},
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
"
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
"
|
|
3391
|
-
|
|
3653
|
+
[
|
|
3654
|
+
{
|
|
3655
|
+
"type": "function",
|
|
3656
|
+
"name": "hasvalue",
|
|
3657
|
+
"bundle": "core",
|
|
3658
|
+
"sinceVersion": "1.20",
|
|
3659
|
+
"link": "https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#hasvalue1",
|
|
3660
|
+
"description": "指示字典是否具有给定键以及该键是否具有值。",
|
|
3661
|
+
"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",
|
|
3662
|
+
"completion": {
|
|
3663
|
+
"label": "HasValue",
|
|
3664
|
+
"detail": "HasValue(inputDictionary, key) -> Boolean",
|
|
3665
|
+
"insertText": "HasValue(${1:inputDictionary_}, ${2:key_})$0",
|
|
3666
|
+
"insertTextMode": 2,
|
|
3667
|
+
"insertTextFormat": 2,
|
|
3668
|
+
"kind": 3,
|
|
3669
|
+
"documentation": {
|
|
3670
|
+
"kind": "markdown",
|
|
3671
|
+
"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)"
|
|
3672
|
+
}
|
|
3673
|
+
},
|
|
3674
|
+
"parametersInfo": {
|
|
3675
|
+
"min": 2,
|
|
3676
|
+
"max": 2
|
|
3392
3677
|
}
|
|
3393
3678
|
},
|
|
3394
|
-
|
|
3395
|
-
"
|
|
3396
|
-
"
|
|
3679
|
+
{
|
|
3680
|
+
"type": "function",
|
|
3681
|
+
"name": "hasvalue",
|
|
3682
|
+
"bundle": "core",
|
|
3683
|
+
"sinceVersion": "1.26",
|
|
3684
|
+
"link": "https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#hasvalue2",
|
|
3685
|
+
"description": "检查字典中嵌套多个层级的属性是否存在值。 这允许您一步深入到嵌套结构中,而不是检查每个层级中的值。 如果结构的每个层级中均存在键和索引且包含非空值,则返回 `true`。",
|
|
3686
|
+
"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",
|
|
3687
|
+
"completion": {
|
|
3688
|
+
"label": "HasValue",
|
|
3689
|
+
"detail": "HasValue(inputDictionary, keys) -> Boolean",
|
|
3690
|
+
"insertText": "HasValue(${1:inputDictionary_}, ${2:keys_})$0",
|
|
3691
|
+
"insertTextMode": 2,
|
|
3692
|
+
"insertTextFormat": 2,
|
|
3693
|
+
"kind": 3,
|
|
3694
|
+
"documentation": {
|
|
3695
|
+
"kind": "markdown",
|
|
3696
|
+
"value": "**[起始版本 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n检查字典中嵌套多个层级的属性是否存在值。 这允许您一步深入到嵌套结构中,而不是检查每个层级中的值。 如果结构的每个层级中均存在键和索引且包含非空值,则返回 `true`。\n\n**参数**\n\n- **inputDictionary**: [Dictionary](https://developers.arcgis.com/arcade/guide/types/#dictionary) \\| [Attachment](https://developers.arcgis.com/arcade/guide/types/#attachment) - 要检查的字典或附件。\n- **keys**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)> - 要在结构的每个层级中检查的键或索引数组。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"
|
|
3697
|
+
}
|
|
3698
|
+
},
|
|
3699
|
+
"parametersInfo": {
|
|
3700
|
+
"min": 2,
|
|
3701
|
+
"max": 2
|
|
3702
|
+
}
|
|
3397
3703
|
}
|
|
3398
|
-
|
|
3704
|
+
]
|
|
3399
3705
|
]
|
|
3400
3706
|
},
|
|
3401
3707
|
{
|
|
@@ -4369,6 +4675,57 @@
|
|
|
4369
4675
|
"max": 1
|
|
4370
4676
|
}
|
|
4371
4677
|
},
|
|
4678
|
+
[
|
|
4679
|
+
{
|
|
4680
|
+
"type": "function",
|
|
4681
|
+
"name": "defaultvalue",
|
|
4682
|
+
"bundle": "core",
|
|
4683
|
+
"sinceVersion": "1.26",
|
|
4684
|
+
"link": "https://developers.arcgis.com/arcade/function-reference/array_functions/#defaultvalue1",
|
|
4685
|
+
"description": "如果数组中的索引不存在,或指定索引处的值为 `null` 或空文本值,则返回指定默认值。",
|
|
4686
|
+
"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",
|
|
4687
|
+
"completion": {
|
|
4688
|
+
"label": "DefaultValue",
|
|
4689
|
+
"detail": "DefaultValue(container, index, defaultValue) -> Any",
|
|
4690
|
+
"insertText": "DefaultValue(${1:container_}, ${2:index_}, ${3:defaultValue_})$0",
|
|
4691
|
+
"insertTextMode": 2,
|
|
4692
|
+
"insertTextFormat": 2,
|
|
4693
|
+
"kind": 3,
|
|
4694
|
+
"documentation": {
|
|
4695
|
+
"kind": "markdown",
|
|
4696
|
+
"value": "**[起始版本 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n如果数组中的索引不存在,或指定索引处的值为 `null` 或空文本值,则返回指定默认值。\n\n**参数**\n\n- **container**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - 要检查的输入数组。\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` 中指定的值。"
|
|
4697
|
+
}
|
|
4698
|
+
},
|
|
4699
|
+
"parametersInfo": {
|
|
4700
|
+
"min": 3,
|
|
4701
|
+
"max": 3
|
|
4702
|
+
}
|
|
4703
|
+
},
|
|
4704
|
+
{
|
|
4705
|
+
"type": "function",
|
|
4706
|
+
"name": "defaultvalue",
|
|
4707
|
+
"bundle": "core",
|
|
4708
|
+
"link": "https://developers.arcgis.com/arcade/function-reference/array_functions/#defaultvalue2",
|
|
4709
|
+
"description": "检查多维数组中嵌套多个层级的索引是否有值,并在存在时返回该值。 否则,如果至少一个嵌套键或索引不存在,或指定键或索引处的值为 `null` 或空文本值,则返回指定默认值。 这允许您一步深入到嵌套结构中,而不是检查每个数组内的值。",
|
|
4710
|
+
"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",
|
|
4711
|
+
"completion": {
|
|
4712
|
+
"label": "DefaultValue",
|
|
4713
|
+
"detail": "DefaultValue(container, keys, defaultValue) -> Any",
|
|
4714
|
+
"insertText": "DefaultValue(${1:container_}, ${2:keys_}, ${3:defaultValue_})$0",
|
|
4715
|
+
"insertTextMode": 2,
|
|
4716
|
+
"insertTextFormat": 2,
|
|
4717
|
+
"kind": 3,
|
|
4718
|
+
"documentation": {
|
|
4719
|
+
"kind": "markdown",
|
|
4720
|
+
"value": "检查多维数组中嵌套多个层级的索引是否有值,并在存在时返回该值。 否则,如果至少一个嵌套键或索引不存在,或指定键或索引处的值为 `null` 或空文本值,则返回指定默认值。 这允许您一步深入到嵌套结构中,而不是检查每个数组内的值。\n\n**参数**\n\n- **container**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - 要检查的输入数组。\n- **keys**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [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` 中指定的值。"
|
|
4721
|
+
}
|
|
4722
|
+
},
|
|
4723
|
+
"parametersInfo": {
|
|
4724
|
+
"min": 3,
|
|
4725
|
+
"max": 3
|
|
4726
|
+
}
|
|
4727
|
+
}
|
|
4728
|
+
],
|
|
4372
4729
|
[
|
|
4373
4730
|
{
|
|
4374
4731
|
"type": "function",
|
|
@@ -4520,6 +4877,58 @@
|
|
|
4520
4877
|
"max": 1
|
|
4521
4878
|
}
|
|
4522
4879
|
},
|
|
4880
|
+
[
|
|
4881
|
+
{
|
|
4882
|
+
"type": "function",
|
|
4883
|
+
"name": "hasvalue",
|
|
4884
|
+
"bundle": "core",
|
|
4885
|
+
"sinceVersion": "1.26",
|
|
4886
|
+
"link": "https://developers.arcgis.com/arcade/function-reference/array_functions/#hasvalue1",
|
|
4887
|
+
"description": "指示给定索引处的数组是否有值。",
|
|
4888
|
+
"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",
|
|
4889
|
+
"completion": {
|
|
4890
|
+
"label": "HasValue",
|
|
4891
|
+
"detail": "HasValue(inputArray, index) -> Boolean",
|
|
4892
|
+
"insertText": "HasValue(${1:inputArray_}, ${2:index_})$0",
|
|
4893
|
+
"insertTextMode": 2,
|
|
4894
|
+
"insertTextFormat": 2,
|
|
4895
|
+
"kind": 3,
|
|
4896
|
+
"documentation": {
|
|
4897
|
+
"kind": "markdown",
|
|
4898
|
+
"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)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - 要检查的数组。\n- **index**: [Number](https://developers.arcgis.com/arcade/guide/types/#number) - 要检查的索引。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"
|
|
4899
|
+
}
|
|
4900
|
+
},
|
|
4901
|
+
"parametersInfo": {
|
|
4902
|
+
"min": 2,
|
|
4903
|
+
"max": 2
|
|
4904
|
+
}
|
|
4905
|
+
},
|
|
4906
|
+
{
|
|
4907
|
+
"type": "function",
|
|
4908
|
+
"name": "hasvalue",
|
|
4909
|
+
"bundle": "core",
|
|
4910
|
+
"sinceVersion": "1.26",
|
|
4911
|
+
"link": "https://developers.arcgis.com/arcade/function-reference/array_functions/#hasvalue2",
|
|
4912
|
+
"description": "检查多维数组中嵌套多个层级的索引是否有值。 这允许您一步深入到嵌套结构中,而不是检查每个数组内的值。 如果结构的每个层级中均存在索引且包含非空值,则返回 `true`。",
|
|
4913
|
+
"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",
|
|
4914
|
+
"completion": {
|
|
4915
|
+
"label": "HasValue",
|
|
4916
|
+
"detail": "HasValue(inputArray, indexes) -> Boolean",
|
|
4917
|
+
"insertText": "HasValue(${1:inputArray_}, ${2:indexes_})$0",
|
|
4918
|
+
"insertTextMode": 2,
|
|
4919
|
+
"insertTextFormat": 2,
|
|
4920
|
+
"kind": 3,
|
|
4921
|
+
"documentation": {
|
|
4922
|
+
"kind": "markdown",
|
|
4923
|
+
"value": "**[起始版本 1.26](https://developers.arcgis.com/arcade/guide/version-matrix)**\n\n检查多维数组中嵌套多个层级的索引是否有值。 这允许您一步深入到嵌套结构中,而不是检查每个数组内的值。 如果结构的每个层级中均存在索引且包含非空值,则返回 `true`。\n\n**参数**\n\n- **inputArray**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Any](https://developers.arcgis.com/arcade/guide/types/#any)> - 要检查的数组。\n- **indexes**: [Array](https://developers.arcgis.com/arcade/guide/types/#array)<[Number](https://developers.arcgis.com/arcade/guide/types/#number) \\| [Text](https://developers.arcgis.com/arcade/guide/types/#text)> - 要在结构的每个层级中检查的键或索引数组。\n\n**返回值**: [Boolean](https://developers.arcgis.com/arcade/guide/types/#boolean)"
|
|
4924
|
+
}
|
|
4925
|
+
},
|
|
4926
|
+
"parametersInfo": {
|
|
4927
|
+
"min": 2,
|
|
4928
|
+
"max": 2
|
|
4929
|
+
}
|
|
4930
|
+
}
|
|
4931
|
+
],
|
|
4523
4932
|
{
|
|
4524
4933
|
"type": "function",
|
|
4525
4934
|
"name": "includes",
|
|
@@ -5623,7 +6032,7 @@
|
|
|
5623
6032
|
"bundle": "core",
|
|
5624
6033
|
"link": "https://developers.arcgis.com/arcade/function-reference/date_functions/#datediff1",
|
|
5625
6034
|
"description": "将两个日期相减,并以指定的单位返回差值。",
|
|
5626
|
-
"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
|
|
6035
|
+
"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",
|
|
5627
6036
|
"completion": {
|
|
5628
6037
|
"label": "DateDiff",
|
|
5629
6038
|
"detail": "DateDiff(date1, date2, units?, timeZone?) -> Number",
|
|
@@ -6496,6 +6905,62 @@
|
|
|
6496
6905
|
}
|
|
6497
6906
|
]
|
|
6498
6907
|
},
|
|
6908
|
+
{
|
|
6909
|
+
"id": "knowledge-graph_functions",
|
|
6910
|
+
"title": "知识图谱功能",
|
|
6911
|
+
"items": [
|
|
6912
|
+
{
|
|
6913
|
+
"type": "function",
|
|
6914
|
+
"name": "knowledgegraphbyportalitem",
|
|
6915
|
+
"bundle": "knowledge-graph",
|
|
6916
|
+
"sinceVersion": "1.26",
|
|
6917
|
+
"link": "https://developers.arcgis.com/arcade/function-reference/knowledge-graph_functions/#knowledgegraphbyportalitem",
|
|
6918
|
+
"description": "从门户项目返回一个知识图谱。",
|
|
6919
|
+
"examples": "\n##### 示例\n\n返回门户项目中的知识图谱。\n\n```arcade\nvar knowledgeGraph = KnowledgeGraphByPortalItem(\n Portal('https://www.arcgis.com'),\n '7b1fb95ab77f40bf8aa09c8b59045449',\n);\n```\n\n",
|
|
6920
|
+
"completion": {
|
|
6921
|
+
"label": "KnowledgeGraphByPortalItem",
|
|
6922
|
+
"detail": "KnowledgeGraphByPortalItem(portalObject, itemId) -> KnowledgeGraph",
|
|
6923
|
+
"insertText": "KnowledgeGraphByPortalItem(${1:portalObject_}, ${2:itemId_})$0",
|
|
6924
|
+
"insertTextMode": 2,
|
|
6925
|
+
"insertTextFormat": 2,
|
|
6926
|
+
"kind": 3,
|
|
6927
|
+
"documentation": {
|
|
6928
|
+
"kind": "markdown",
|
|
6929
|
+
"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)"
|
|
6930
|
+
}
|
|
6931
|
+
},
|
|
6932
|
+
"parametersInfo": {
|
|
6933
|
+
"min": 2,
|
|
6934
|
+
"max": 2
|
|
6935
|
+
}
|
|
6936
|
+
},
|
|
6937
|
+
{
|
|
6938
|
+
"type": "function",
|
|
6939
|
+
"name": "querygraph",
|
|
6940
|
+
"bundle": "knowledge-graph",
|
|
6941
|
+
"sinceVersion": "1.26",
|
|
6942
|
+
"link": "https://developers.arcgis.com/arcade/function-reference/knowledge-graph_functions/#querygraph",
|
|
6943
|
+
"description": "使用 openCypher 查询知识图谱,并返回图谱中的实体和关系集合及其属性。",
|
|
6944
|
+
"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",
|
|
6945
|
+
"completion": {
|
|
6946
|
+
"label": "QueryGraph",
|
|
6947
|
+
"detail": "QueryGraph(graph, openCypherQuery, queryParameters?) -> Array",
|
|
6948
|
+
"insertText": "QueryGraph(${1:graph_}, ${2:openCypherQuery_})$0",
|
|
6949
|
+
"insertTextMode": 2,
|
|
6950
|
+
"insertTextFormat": 2,
|
|
6951
|
+
"kind": 3,
|
|
6952
|
+
"documentation": {
|
|
6953
|
+
"kind": "markdown",
|
|
6954
|
+
"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\n**返回值**: Array"
|
|
6955
|
+
}
|
|
6956
|
+
},
|
|
6957
|
+
"parametersInfo": {
|
|
6958
|
+
"min": 2,
|
|
6959
|
+
"max": 3
|
|
6960
|
+
}
|
|
6961
|
+
}
|
|
6962
|
+
]
|
|
6963
|
+
},
|
|
6499
6964
|
{
|
|
6500
6965
|
"id": "debugging_functions",
|
|
6501
6966
|
"title": "调试函数",
|
|
@@ -6712,7 +7177,7 @@
|
|
|
6712
7177
|
"sinceVersion": "1.12",
|
|
6713
7178
|
"link": "https://developers.arcgis.com/arcade/function-reference/track_functions/#trackdistanceat",
|
|
6714
7179
|
"description": "从第一个观测点到当前观测点的观测点之间的距离的总和加上给定值。",
|
|
6715
|
-
"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(
|
|
7180
|
+
"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",
|
|
6716
7181
|
"completion": {
|
|
6717
7182
|
"label": "TrackDistanceAt",
|
|
6718
7183
|
"detail": "TrackDistanceAt(index) -> Number",
|