UNPKG

@arcgis/map-components

Version:
1,170 lines • 2.23 MB
{ "timestamp": "2025-07-31T23:16:01", "compiler": { "name": "@arcgis/lumina-compiler", "version": "4.33.13", "typescriptVersion": "5.8.3" }, "schemaVersion": "1.0.0", "modules": [ { "kind": "javascript-module", "path": "src/components/area-measurement-2d/area-measurement-2d.tsx", "declarations": [ { "kind": "class", "customElement": true, "name": "ArcgisAreaMeasurement2d", "tagName": "arcgis-area-measurement-2d", "description": "The Area Measurement 2D component calculates and displays the area and perimeter of a polygon only in a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html).", "demos": [ { "description": "Docs", "url": "https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-area-measurement-2d/" }, { "description": "Area Measurement 2D", "url": "https://developers.arcgis.com/javascript/latest/storybook/map-components/?path=/story/arcgis-area-measurement-2d--demo&singleStory=true" } ], "superclass": { "name": "LitElement", "package": "@arcgis/lumina" }, "encapsulation": "none", "pascalCaseName": "ArcgisAreaMeasurement2d", "importPath": "components/arcgis-area-measurement-2d", "members": [ { "kind": "field", "name": "autoDestroyDisabled", "description": "If true, the component will not be destroyed automatically when it is\ndisconnected from the document. This is useful when you want to move the\ncomponent to a different place on the page, or temporarily hide it. If this\nis set, make sure to call the [destroy](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-area-measurement-2d/#destroy) method when you are done to\nprevent memory leaks.", "type": { "text": "boolean", "values": [ { "type": "boolean" } ] }, "default": "false", "attribute": "auto-destroy-disabled" }, { "kind": "method", "name": "clear", "description": "Clear the current measurement.", "return": { "type": { "text": "Promise<void>", "references": [ { "name": "Promise", "package": "typescript", "module": "lib/lib.es5.d.ts", "start": 0, "end": 7 } ] } }, "signature": "(): Promise<void>", "async": true }, { "kind": "method", "name": "componentOnReady", "return": { "type": { "text": "Promise<void>", "references": [ { "module": "lib/lib.es5.d.ts", "name": "Promise", "package": "typescript", "start": 0, "end": 7 } ] } }, "description": "Create a promise that resolves once component is fully loaded.", "signature": "(): Promise<void>", "async": true, "inheritedFrom": { "name": "LitElement", "package": "@arcgis/lumina" }, "docsTags": [ { "name": "example", "text": "```js\nconst arcgisAreaMeasurement2d = document.querySelector(\"arcgis-area-measurement-2d\");\ndocument.body.append(arcgisAreaMeasurement2d);\nawait arcgisAreaMeasurement2d.componentOnReady();\nconsole.log(\"arcgis-area-measurement-2d is ready to go!\");\n```" } ] }, { "kind": "method", "name": "destroy", "description": "Permanently destroy the component.", "return": { "type": { "text": "Promise<void>", "references": [ { "name": "Promise", "package": "typescript", "module": "lib/lib.es5.d.ts", "start": 0, "end": 7 } ] } }, "signature": "(): Promise<void>", "async": true }, { "kind": "field", "name": "icon", "description": "Icon which represents the component.\nTypically used when the component is controlled by another component (e.g. by the Expand component).", "type": { "text": "string", "values": [ { "type": "string" } ] }, "default": "\"measure-area\"", "attribute": "icon", "docsTags": [ { "name": "see", "text": "[Calcite Icons](https://developers.arcgis.com/calcite-design-system/icons/)" } ] }, { "kind": "field", "name": "label", "description": "The widget's default label.\n\n[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement2D.html#label)", "type": { "text": "string", "values": [ { "type": "string" } ] }, "attribute": "label" }, { "kind": "field", "name": "position", "type": { "text": "\"bottom-leading\" | \"bottom-left\" | \"bottom-right\" | \"bottom-trailing\" | \"manual\" | \"top-leading\" | \"top-left\" | \"top-right\" | \"top-trailing\"", "values": [ { "value": "bottom-leading", "type": "string" }, { "value": "bottom-left", "type": "string" }, { "value": "bottom-right", "type": "string" }, { "value": "bottom-trailing", "type": "string" }, { "value": "manual", "type": "string" }, { "value": "top-leading", "type": "string" }, { "value": "top-left", "type": "string" }, { "value": "top-right", "type": "string" }, { "value": "top-trailing", "type": "string" } ] }, "default": "\"bottom-left\"", "attribute": "position" }, { "kind": "field", "name": "referenceElement", "description": "By assigning the `id` attribute of the Map or Scene component to this property, you can position a child component anywhere in the DOM while still maintaining a connection to the Map or Scene.", "type": { "text": "HTMLArcgisLinkChartElement | HTMLArcgisMapElement | HTMLArcgisSceneElement | string", "references": [ { "name": "HTMLArcgisLinkChartElement", "module": "index.js", "start": 0, "end": 26, "viewUrl": "https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-link-chart/" }, { "name": "HTMLArcgisMapElement", "module": "index.js", "start": 29, "end": 49, "viewUrl": "https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-map/" }, { "name": "HTMLArcgisSceneElement", "module": "index.js", "start": 52, "end": 74, "viewUrl": "https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-scene/" } ], "values": [ { "type": "HTMLArcgisLinkChartElement" }, { "type": "HTMLArcgisMapElement" }, { "type": "HTMLArcgisSceneElement" }, { "type": "string" } ] }, "attribute": "reference-element", "docsTags": [ { "name": "see", "text": "[Associate components with a Map or Scene component](https://developers.arcgis.com/javascript/latest/programming-patterns/#associate-components-with-a-map-or-scene-component)" } ] }, { "kind": "field", "name": "snappingOptions", "description": "The [SnappingOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-snapping-SnappingOptions.html) for sketching.\n\n[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement2D.html#snappingOptions)", "type": { "text": "SnappingOptions", "references": [ { "name": "SnappingOptions", "package": "@arcgis/core", "module": "interfaces.d.ts", "viewUrl": "https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-snapping-SnappingOptions.html", "start": 0, "end": 15 } ] } }, { "kind": "method", "name": "start", "description": "Starts a new measurement.", "return": { "type": { "text": "Promise<void>", "references": [ { "name": "Promise", "package": "typescript", "module": "lib/lib.es5.d.ts", "start": 0, "end": 7 } ] } }, "signature": "(): Promise<void>", "async": true }, { "kind": "field", "name": "state", "description": "The current state of the component.", "type": { "text": "\"disabled\" | \"measured\" | \"measuring\" | \"ready\"", "values": [ { "value": "disabled", "type": "string" }, { "value": "measured", "type": "string" }, { "value": "measuring", "type": "string" }, { "value": "ready", "type": "string" } ] }, "default": "\"disabled\"", "readonly": true, "attribute": "state", "reflects": true, "docsOnlyReadonly": true }, { "kind": "field", "name": "unit", "description": "Unit system (imperial, metric) or specific unit used for displaying the area values.\n\n[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement2D.html#unit)", "type": { "text": "\"acres\" | \"ares\" | \"hectares\" | \"imperial\" | \"metric\" | \"square-centimeters\" | \"square-decimeters\" | \"square-feet\" | \"square-inches\" | \"square-kilometers\" | \"square-meters\" | \"square-miles\" | \"square-millimeters\" | \"square-nautical-miles\" | \"square-us-feet\" | \"square-yards\"", "values": [ { "value": "acres", "type": "string" }, { "value": "ares", "type": "string" }, { "value": "hectares", "type": "string" }, { "value": "imperial", "type": "string" }, { "value": "metric", "type": "string" }, { "value": "square-centimeters", "type": "string" }, { "value": "square-decimeters", "type": "string" }, { "value": "square-feet", "type": "string" }, { "value": "square-inches", "type": "string" }, { "value": "square-kilometers", "type": "string" }, { "value": "square-meters", "type": "string" }, { "value": "square-miles", "type": "string" }, { "value": "square-millimeters", "type": "string" }, { "value": "square-nautical-miles", "type": "string" }, { "value": "square-us-feet", "type": "string" }, { "value": "square-yards", "type": "string" } ] }, "attribute": "unit" }, { "kind": "field", "name": "unitOptions", "description": "List of available units and unit systems (imperial, metric) for displaying the area values.\n\n[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement2D.html#unitOptions)", "type": { "text": "Array<\"square-millimeters\" | \"square-centimeters\" | \"square-decimeters\" | \"square-meters\" | \"square-kilometers\" | \"square-inches\" | \"square-feet\" | \"square-yards\" | \"square-miles\" | \"square-nautical-miles\" | \"square-us-feet\" | \"acres\" | \"ares\" | \"hectares\" | \"imperial\" | \"metric\">", "references": [ { "name": "Array", "package": "typescript", "module": "lib/lib.es5.d.ts", "start": 0, "end": 5 } ] } } ], "attributes": [ { "name": "auto-destroy-disabled", "description": "If true, the component will not be destroyed automatically when it is\ndisconnected from the document. This is useful when you want to move the\ncomponent to a different place on the page, or temporarily hide it. If this\nis set, make sure to call the [destroy](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-area-measurement-2d/#destroy) method when you are done to\nprevent memory leaks.", "type": { "text": "boolean", "values": [ { "type": "boolean" } ] }, "default": "false", "fieldName": "autoDestroyDisabled" }, { "name": "icon", "description": "Icon which represents the component.\nTypically used when the component is controlled by another component (e.g. by the Expand component).", "type": { "text": "string", "values": [ { "type": "string" } ] }, "default": "\"measure-area\"", "fieldName": "icon" }, { "name": "label", "description": "The widget's default label.\n\n[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement2D.html#label)", "type": { "text": "string", "values": [ { "type": "string" } ] }, "fieldName": "label" }, { "name": "position", "type": { "text": "\"bottom-leading\" | \"bottom-left\" | \"bottom-right\" | \"bottom-trailing\" | \"manual\" | \"top-leading\" | \"top-left\" | \"top-right\" | \"top-trailing\"", "values": [ { "value": "bottom-leading", "type": "string" }, { "value": "bottom-left", "type": "string" }, { "value": "bottom-right", "type": "string" }, { "value": "bottom-trailing", "type": "string" }, { "value": "manual", "type": "string" }, { "value": "top-leading", "type": "string" }, { "value": "top-left", "type": "string" }, { "value": "top-right", "type": "string" }, { "value": "top-trailing", "type": "string" } ] }, "default": "\"bottom-left\"", "fieldName": "position" }, { "name": "reference-element", "description": "By assigning the `id` attribute of the Map or Scene component to this property, you can position a child component anywhere in the DOM while still maintaining a connection to the Map or Scene.", "type": { "text": "string", "values": [ { "type": "string" } ] }, "fieldName": "referenceElement" }, { "name": "state", "description": "The current state of the component.", "type": { "text": "\"disabled\" | \"measured\" | \"measuring\" | \"ready\"", "values": [ { "value": "disabled", "type": "string" }, { "value": "measured", "type": "string" }, { "value": "measuring", "type": "string" }, { "value": "ready", "type": "string" } ] }, "default": "\"disabled\"", "fieldName": "state" }, { "name": "unit", "description": "Unit system (imperial, metric) or specific unit used for displaying the area values.\n\n[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement2D.html#unit)", "type": { "text": "\"acres\" | \"ares\" | \"hectares\" | \"imperial\" | \"metric\" | \"square-centimeters\" | \"square-decimeters\" | \"square-feet\" | \"square-inches\" | \"square-kilometers\" | \"square-meters\" | \"square-miles\" | \"square-millimeters\" | \"square-nautical-miles\" | \"square-us-feet\" | \"square-yards\"", "values": [ { "value": "acres", "type": "string" }, { "value": "ares", "type": "string" }, { "value": "hectares", "type": "string" }, { "value": "imperial", "type": "string" }, { "value": "metric", "type": "string" }, { "value": "square-centimeters", "type": "string" }, { "value": "square-decimeters", "type": "string" }, { "value": "square-feet", "type": "string" }, { "value": "square-inches", "type": "string" }, { "value": "square-kilometers", "type": "string" }, { "value": "square-meters", "type": "string" }, { "value": "square-miles", "type": "string" }, { "value": "square-millimeters", "type": "string" }, { "value": "square-nautical-miles", "type": "string" }, { "value": "square-us-feet", "type": "string" }, { "value": "square-yards", "type": "string" } ] }, "fieldName": "unit" } ], "events": [ { "name": "arcgisPropertyChange", "description": "Emitted when the value of a property is changed. Use this to listen to changes to properties.", "type": { "text": "{ name: \"state\"; }" } }, { "name": "arcgisReady", "description": "Emitted when the component associated with a map or scene view is is ready to be interacted with.", "type": { "text": "void" } } ] } ], "exports": [ { "kind": "custom-element-definition", "name": "arcgis-area-measurement-2d", "declaration": { "name": "ArcgisAreaMeasurement2d", "module": "src/components/area-measurement-2d/area-measurement-2d.tsx" } } ] }, { "kind": "javascript-module", "path": "src/components/area-measurement-3d/area-measurement-3d.tsx", "declarations": [ { "kind": "class", "customElement": true, "name": "ArcgisAreaMeasurement3d", "tagName": "arcgis-area-measurement-3d", "description": "The Area Measurement 3D component can be added to a [Scene](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-scene/)\ncomponent to calculate and display area and perimeter of polygons.\n\n[![measurement-area-3d](https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/3D_AreaMeasurement_widget.png)](https://developers.arcgis.com/javascript/latest/sample-code/measurement-3d/)\n\nHow the area and perimeter are computed depends on the scene's spatial reference and the length of the measured perimeter.\n\nIn **geographic coordinate systems** (GCS) and in **Web Mercator**:\n- If the measurement's perimeter is below 100 km, they are computed in a Euclidean manner,\n in an [ECEF](https://en.wikipedia.org/wiki/ECEF) coordinate system (or equivalent on other planets).\n- If the perimeter is above 100 km, they are computed geodetically, and the visualization takes\n the curvature of the planet into consideration.\n\nIn **projected coordinate systems** (PCS), apart from Web Mercator, the area and perimeter\nare always calculated in a Euclidean manner (in their respective PCS).\n\nThe area may be visualized and calculated in two ways:\n1. If all the vertices are mostly coplanar (lying on the same plane),\n the measurement polygon is formed on that plane, and area and perimeter are calculated from its geometry.\n2. If the vertices don't form a planar surface, the measurement polygon\n is projected to a horizontal plane, and area and perimeter are calculated from its geometry.\n\n![area-measurement-3d-types](https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/area-measurement-3d-types.png)\n\nWhen the component is active, a horizontal \"laser\" line is drawn which indicates the height at the current mouse position.\nThis line can help in analyzing the heights of objects relative to each other and the terrain.\n\n**Things to consider**\n\n* Area Measurement 3D is designed to work in the Scene component. For measurements in the [Map](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-map/)\ncomponent, use [Area Measurement 2D](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-area-measurement-2d/).\n* Snapping is enabled by default. Holding the `CTRL` key disables it.\n* Layer types currently supported for snapping are:\n[FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html),\n[GraphicsLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html) (except Mesh geometries),\n[GeoJSONLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html),\n[WFSLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WFSLayer.html),\n[CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html),\n[3D Object SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html),\nand [BuildingSceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html).\n\n**See also**\n\n- [AreaMeasurementAnalysis](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-AreaMeasurementAnalysis.html)\n- [Sample - Measurement in 3D](https://developers.arcgis.com/javascript/latest/sample-code/measurement-3d/)\n- [Sample - Analysis objects](https://developers.arcgis.com/javascript/latest/sample-code/analysis-objects/)", "demos": [ { "description": "Docs", "url": "https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-area-measurement-3d/" }, { "description": "Area Measurement 3D", "url": "https://developers.arcgis.com/javascript/latest/storybook/map-components/?path=/story/arcgis-area-measurement-3d--demo&singleStory=true" } ], "superclass": { "name": "LitElement", "package": "@arcgis/lumina" }, "encapsulation": "none", "pascalCaseName": "ArcgisAreaMeasurement3d", "importPath": "components/arcgis-area-measurement-3d", "members": [ { "kind": "field", "name": "analysis", "description": "The [AreaMeasurementAnalysis](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-AreaMeasurementAnalysis.html)\ncreated or modified by the component.\n\nWhen connecting the Area Measurement 3D component to the [Scene](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-scene/)\ncomponent, it automatically creates an empty analysis and adds it to the Scene's\n[analyses](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-scene/#analyses) collection.\nWhenever the component is destroyed, the analysis is automatically removed from the collection.\n\nAlternatively, a programmatically created analysis can be provided to the component.\nThen, the application itself needs to add it to and later remove it from the Scene's analyses collection.\n\n```js\n// Create the analysis.\nconst areaMeasurementAnalysis = new AreaMeasurementAnalysis({\n geometry: new Polygon({\n spatialReference: { latestWkid: 3857, wkid: 102100 },\n rings: [\n [\n [-13624861.22274897, 4550346.5519295, 63.378210234455764],\n [-13624935.305160372, 4550273.144585712, 63.37829629518092],\n [-13624995.61798748, 4550334.030096778, 63.37819860037416],\n [-13624921.53589075, 4550407.42357004, 63.3783810287714],\n [-13624861.22274897, 4550346.5519295, 63.378210234455764]\n ]\n ]\n })\n});\n// Get the Scene and measurement component and wait until they are ready.\nconst viewElement = document.querySelector(\"arcgis-scene\");\nawait viewElement.viewOnReady();\nconst areaMeasurement3d = document.querySelector(\"arcgis-area-measurement-3d\");\nawait areaMeasurement3d.componentOnReady();\n// Add the analysis to the Scene component.\nviewElement.analyses.add(areaMeasurementAnalysis);\n// Connect the analysis to the measurement component:\nareaMeasurement3d.analysis = areaMeasurementAnalysis;\n```", "type": { "text": "AreaMeasurementAnalysis", "references": [ { "name": "AreaMeasurementAnalysis", "package": "@arcgis/core", "module": "interfaces.d.ts", "viewUrl": "https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-AreaMeasurementAnalysis.html", "start": 0, "end": 23 } ] } }, { "kind": "field", "name": "autoDestroyDisabled", "description": "If true, the component will not be destroyed automatically when it is\ndisconnected from the document. This is useful when you want to move the\ncomponent to a different place on the page, or temporarily hide it. If this\nis set, make sure to call the [destroy](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-area-measurement-3d/#destroy) method when you are done to\nprevent memory leaks.", "type": { "text": "boolean", "values": [ { "type": "boolean" } ] }, "default": "false", "attribute": "auto-destroy-disabled" }, { "kind": "method", "name": "clear", "description": "Clears the current measurement.", "return": { "type": { "text": "Promise<void>", "references": [ { "name": "Promise", "package": "typescript", "module": "lib/lib.es5.d.ts", "start": 0, "end": 7 } ] } }, "signature": "(): Promise<void>", "async": true }, { "kind": "method", "name": "componentOnReady", "return": { "type": { "text": "Promise<void>", "references": [ { "module": "lib/lib.es5.d.ts", "name": "Promise", "package": "typescript", "start": 0, "end": 7 } ] } }, "description": "Create a promise that resolves once component is fully loaded.", "signature": "(): Promise<void>", "async": true, "inheritedFrom": { "name": "LitElement", "package": "@arcgis/lumina" }, "docsTags": [ { "name": "example", "text": "```js\nconst arcgisAreaMeasurement3d = document.querySelector(\"arcgis-area-measurement-3d\");\ndocument.body.append(arcgisAreaMeasurement3d);\nawait arcgisAreaMeasurement3d.componentOnReady();\nconsole.log(\"arcgis-area-measurement-3d is ready to go!\");\n```" } ] }, { "kind": "method", "name": "destroy", "description": "Permanently destroy the component.", "return": { "type": { "text": "Promise<void>", "references": [ { "name": "Promise", "package": "typescript", "module": "lib/lib.es5.d.ts", "start": 0, "end": 7 } ] } }, "signature": "(): Promise<void>", "async": true }, { "kind": "field", "name": "icon", "description": "Icon which represents the component.\nTypically used when the component is controlled by another component (e.g. by the Expand component).", "type": { "text": "string", "values": [ { "type": "string" } ] }, "default": "\"measure-area\"", "attribute": "icon", "reflects": true, "docsTags": [ { "name": "see", "text": "[Calcite Icons](https://developers.arcgis.com/calcite-design-system/icons/)" } ] }, { "kind": "field", "name": "label", "description": "The component's default label.", "type": { "text": "string", "values": [ { "type": "string" } ] }, "attribute": "label" }, { "kind": "field", "name": "position", "type": { "text": "\"bottom-leading\" | \"bottom-left\" | \"bottom-right\" | \"bottom-trailing\" | \"manual\" | \"top-leading\" | \"top-left\" | \"top-right\" | \"top-trailing\"", "values": [ { "value": "bottom-leading", "type": "string" }, { "value": "bottom-left", "type": "string" }, { "value": "bottom-right", "type": "string" }, { "value": "bottom-trailing", "type": "string" }, { "value": "manual", "type": "string" }, { "value": "top-leading", "type": "string" }, { "value": "top-left", "type": "string" }, { "value": "top-right", "type": "string" }, { "value": "top-trailing", "type": "string" } ] }, "default": "\"bottom-left\"", "attribute": "position" }, { "kind": "field", "name": "referenceElement", "description": "By assigning the `id` attribute of the Map or Scene component to this property, you can position a child component anywhere in the DOM while still maintaining a connection to the Map or Scene.", "type": { "text": "HTMLArcgisLinkChartElement | HTMLArcgisMapElement | HTMLArcgisSceneElement | string", "references": [ { "name": "HTMLArcgisLinkChartElement", "module": "index.js", "start": 0, "end": 26, "viewUrl": "https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-link-chart/" }, { "name": "HTMLArcgisMapElement", "module": "index.js", "start": 29, "end": 49, "viewUrl": "https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-map/" }, { "name": "HTMLArcgisSceneElement", "module": "index.js", "start": 52, "end": 74, "viewUrl": "https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-scene/" } ], "values": [ { "type": "HTMLArcgisLinkChartElement" }, { "type": "HTMLArcgisMapElement" }, { "type": "HTMLArcgisSceneElement" }, { "type": "string" } ] }, "attribute": "reference-element", "docsTags": [ { "name": "see", "text": "[Associate components with a Map or Scene component](https://developers.arcgis.com/javascript/latest/programming-patterns/#associate-components-with-a-map-or-scene-component)" } ] }, { "kind": "method", "name": "start", "description": "Starts a new measurement.", "return": { "type": { "text": "Promise<void>", "references": [ { "name": "Promise", "package": "typescript", "module": "lib/lib.es5.d.ts", "start": 0, "end": 7 } ] } }, "signature": "(): Promise<void>", "async": true }, { "kind": "field", "name": "state", "description": "The component's state. The values mean the following:\n\n* `disabled` - not ready yet\n* `ready` - ready for measuring\n* `measuring` - currently measuring\n* `measured` - measuring has finished", "type": { "text": "\"disabled\" | \"measured\" | \"measuring\" | \"ready\"", "values": [ { "value": "disabled", "type": "string" }, { "value": "measured", "type": "string" }, { "value": "measuring", "type": "string" }, { "value": "ready", "type": "string" } ] }, "readonly": true, "attribute": "state", "reflects": true }, { "kind": "field", "name": "unit", "description": "Unit system (imperial, metric) or specific unit used for displaying the area values. Possible values are listed in\n[unitOptions](#unitOptions).", "type": { "text": "\"acres\" | \"ares\" | \"hectares\" | \"imperial\" | \"metric\" | \"square-centimeters\" | \"square-decimeters\" | \"square-feet\" | \"square-inches\" | \"square-kilometers\" | \"square-meters\" | \"square-miles\" | \"square-millimeters\" | \"square-nautical-miles\" | \"square-us-feet\" | \"square-yards\"", "values": [ { "value": "acres", "type": "string" }, { "value": "ares", "type": "string" }, { "value": "hectares", "type": "string" }, { "value": "imperial", "type": "string" }, { "value": "metric", "type": "string" }, { "value": "square-centimeters", "type": "string" }, { "value": "square-decimeters", "type": "string" }, { "value": "square-feet", "type": "string" }, { "value": "square-inches", "type": "string" }, { "value": "square-kilometers", "type": "string" }, { "value": "square-meters", "type": "string" }, { "value": "square-miles", "type": "string" }, { "value": "square-millimeters", "type": "string" }, { "value": "square-nautical-miles", "type": "string" }, { "value": "square-us-feet", "type": "string" }, { "value": "square-yards", "type": "string" } ] }, "attribute": "unit" }, { "kind": "field", "name": "unitOptions", "description": "List of available units and unit systems (imperial, metric) that are shown in the component's dropdown.\nBy default, the following units are included: `metric`, `imperial`, `square-inches`, `square-feet`, `square-us-feet`, `square-yards`, `square-miles`, `square-meters`, `square-kilometers`, `acres`, `ares`, `hectares`.\nPossible [unit](#unit) values can only be a subset of this list.", "type": { "text": "Array<\"square-millimeters\" | \"square-centimeters\" | \"square-decimeters\" | \"square-meters\" | \"square-kilometers\" | \"square-inches\" | \"square-feet\" | \"square-yards\" | \"square-miles\" | \"square-nautical-miles\" | \"square-us-feet\" | \"acres\" | \"ares\" | \"hectares\" | \"imperial\" | \"metric\">", "references": [ { "name": "Array", "package": "typescript", "module": "lib/lib.es5.d.ts", "start": 0, "end": 5 } ] } } ], "attributes": [ { "name": "auto-destroy-disabled", "description": "If true, the component will not be destroyed automatically when it is\ndisconnected from the document. This is useful when you want to move the\ncomponent to a different place on the page, or temporarily hide it. If this\nis set, make sure to call the [destroy](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-area-measurement-3d/#destroy) method when you are done to\nprevent memory leaks.", "type": { "text": "boolean", "values": [ { "type": "boolean" } ] }, "default": "false", "fieldName": "autoDestroyDisabled" }, { "name": "icon", "description": "Icon which represents the component.\nTypically used when the component is controlled by another component (e.g. by the Expand component).", "type": { "text": "string", "values": [ { "type": "string" } ] }, "default": "\"measure-area\"", "fieldName": "icon" }, { "name": "label", "description": "The component's default label.", "type": { "text": "string", "values": [ { "type": "string" } ] }, "fieldName": "label" }, { "name": "position", "type": { "text": "\"bottom-leading\" | \"bottom-left\" | \"bottom-right\" | \"bottom-trailing\" | \"manual\" | \"top-leading\" | \"top-left\" | \"top-right\" | \"top-trailing\"", "values": [ { "value": "bottom-leading", "type": "string" }, { "value": "bottom-left", "type": "string" }, { "value": "bottom-right", "type": "string" }, { "value": "bottom-trailing", "type": "string" }, { "value": "manual", "type": "string" }, { "value": "top-leading", "type": "string" }, { "value": "top-left", "type": "string" }, { "value": "top-right", "type": "string" }, { "value": "top-trailing", "type": "string" } ] }, "default": "\"bottom-left\"", "fieldName": "position" }, { "name": "reference-element", "description": "By assigning the `id` attribute of the Map or Scene component to this property, you can position a child component anywhere in the DOM while still maintaining a connection to the Map or Scene.", "type": { "text": "string", "values": [ { "type": "string" } ] }, "fieldName": "referenceElement" }, { "name": "state", "description": "The component's state. The values mean the following:\n\n* `disabled` - not ready yet\n* `ready` - ready for measuring\n* `measuring` - currently measurin