UNPKG

@vertigis/viewer-spec

Version:

VertiGIS Viewer Specification

1 lines 406 kB
{"$schema":"http://json-schema.org/draft-04/schema#","definitions":{"@arcgis.core.Basemap.Basemap":{"description":"* [Overview](https://developers.arcgis.com/javascript/latest/references/core/Basemap/#overview)\n* [Creating a Basemap](https://developers.arcgis.com/javascript/latest/references/core/Basemap/#creating-a-basemap)\n* [Setting the LOD](https://developers.arcgis.com/javascript/latest/references/core/Basemap/#setting-the-lod)\n* [Waiting for Load](https://developers.arcgis.com/javascript/latest/references/core/Basemap/#waiting-for-load)\n\n<span id=\"overview\"></span>\n## Overview\n\nA basemap is a collection of layers that provide geographic context to a map or scene with data such as topographic features, road networks, buildings, and labels.\nThese features can be represented with different styles as applicable to your application, such as streets, topographic, or imagery.\n\nA basemap can contain both [base layers](https://developers.arcgis.com/javascript/latest/references/core/Basemap/#baseLayers), which comprise one or more layers, and [reference layers](https://developers.arcgis.com/javascript/latest/references/core/Basemap/#referenceLayers).\nReference layers are displayed on top of the base layers and all other layers in the map. They can be used to display labels on top of terrain or streets.\n\n<span id=\"creating-a-basemap\"></span>\n## Creating a Basemap\n\nCreates a new basemap object. Basemaps can be created in a variety of ways:\n1. From a [PortalItem](https://developers.arcgis.com/javascript/latest/references/core/portal/PortalItem/)\n ```js\n // in this case the portalItem has to be a webmap\n const basemap = new Basemap({\n portalItem: {\n id: \"8dda0e7b5e2d4fafa80132d59122268c\" // WGS84 Streets Vector webmap\n }\n });\n ```\n2. From a [basemap id](https://developers.arcgis.com/javascript/latest/references/core/Basemap/#fromId)\n ```js\n // create the basemap from a basemap id\n Basemap.fromId(\"topo-vector\");\n ```\n3. From a [basemap style](https://developers.arcgis.com/javascript/latest/references/core/Basemap/#style)\n ```js\n // create a basemap from the basemap styles service\n const basemap = new Basemap({\n style: {\n id: \"arcgis/outdoor\",\n language: \"es\" // displays basemap place labels in spanish\n }\n });\n ```\n4. From a custom basemap layer. These basemaps may be created from services you publish to your own server, or from services published by third parties.\n ```js\n // create from a third party source\n const basemap = new Basemap({\n baseLayers: [\n new WebTileLayer(...)\n ],\n referenceLayers: [\n new WebTileLayer(...)\n ]\n });\n ```\n\n<span id=\"setting-the-lod\"></span>\n## Setting the LOD\n\nThe [MapView.constraints.lods](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#constraints) property should be specified when using a dynamic service for a basemap.\nDo this by either explicitly setting the `lods` within this property, or create the `lods` via the [TileInfo.create()](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TileInfo/#create)\nmethod on the [TileInfo](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TileInfo/) class. This method is used to create a new [TileInfo](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TileInfo/) instance\nwith preset properties for [TileInfo.lods](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TileInfo/#lods). See [Zoom and LODs](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#mapview-lods) section in\n[MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) SDK document for more information.\n\n```js\n// create a basemap from a dynamic MapServer\nconst basemap = new Basemap({\n baseLayers: [\n new MapImageLayer({\n url: \"url to your dynamic MapServer\",\n title: \"Basemap\"\n })\n ],\n title: \"basemap\",\n id: \"basemap\"\n});\n\nconst map = new Map({\n basemap: basemap\n});\n\n// create a TileInfo instance using the default settings and\n// pass its resulting LOD's to a MapView's constraints\n// in this case, lods will match the ArcGIS Online web mercator LODs\nconst view = new MapView({\n container: \"viewDiv\",\n map: map,\n constraints: {\n lods: TileInfo.create().lods\n }\n});\n```\n\n<span id=\"waiting-for-load\"></span>\n## Waiting for Load\n\nThe [when()](https://developers.arcgis.com/javascript/latest/references/core/Basemap/#when) method on the Basemap instance can be called to execute processes that may only run after the Basemap is [loaded](https://developers.arcgis.com/javascript/latest/references/core/Basemap/#loaded).\n\n> [!WARNING]\n>\n> **Note:** Basemaps containing 3D layers can only be used in a [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/)."},"@arcgis.core.Color.Color":{"description":"Creates a new color object by passing either a hex, rgb(a), hsl(a) or [named color value](https://www.w3.org/wiki/CSS/Properties/color/keywords). Hex, hsl(a) and\nnamed color values can be passed as a string:\n\n```js\n// Examples for green\nlet color = new Color(\"lime\"); // named value\nlet color = new Color(\"#0f0\"); // shortened three digit hexadecimal value\nlet color = new Color(\"#00ff00\"); // six digit hexadecimal value\nlet color = new Color(\"hsl(120, 100%, 50%)\"); // hsl\nlet color = new Color(\"hsla(120, 100%, 50%, 0.5)\"); // hsla\n```\nRGB values can be passed in as either an array, a string or an object:\n\n```js\n// Examples for green\nlet color = new Color([0, 255, 0]);\nlet color = new Color([0, 255, 0, 0.5]);\nlet color = new Color(\"rgb(0, 255, 0)\");\nlet color = new Color(\"rgba(0, 255, 0, 0.5)\");\nlet color = new Color({r: 0, g: 255, b: 0});\nlet color = new Color({r: 0, g: 255, b: 0, a: 0.5});\n```\n\nThe alpha-channel (opacity) in rgba and hsla can have a value between 0.0 (fully transparent) and 1.0 (fully opaque)."},"@arcgis.core.Graphic.Graphic":{"description":"A Graphic is a vector representation of real world geographic phenomena.\nIt can contain [geometry](https://developers.arcgis.com/javascript/latest/references/core/Graphic/#geometry), a [symbol](https://developers.arcgis.com/javascript/latest/references/core/Graphic/#symbol), and [attributes](https://developers.arcgis.com/javascript/latest/references/core/Graphic/#attributes).\nA Graphic is displayed in the [GraphicsLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GraphicsLayer/).\n\nTo learn how to work with graphics, see the\n[Intro to graphics](https://developers.arcgis.com/javascript/latest/sample-code/intro-graphics/) tutorial.\n\n```js\nlet polyline = {\n type: \"polyline\", // autocasts as new Polyline()\n paths: [\n [-111.30, 52.68],\n [-98, 49.5],\n [-93.94, 29.89]\n ]\n};\n\nlet polylineSymbol = {\n type: \"simple-line\", // autocasts as SimpleLineSymbol()\n color: [226, 119, 40],\n width: 4\n};\n\nlet polylineAtt = {\n Name: \"Keystone Pipeline\",\n Owner: \"TransCanada\"\n};\n\nlet polylineGraphic = new Graphic({\n geometry: polyline,\n symbol: polylineSymbol,\n attributes: polylineAtt\n});\n\nview.graphics.add(polylineGraphic);\n```"},"@arcgis.core.Ground.Ground":{"description":"The Ground class contains properties that specify how the ground surface is\ndisplayed in a [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/). It contains a [layers](https://developers.arcgis.com/javascript/latest/references/core/Ground/#layers)\nproperty, which is a collection of [ElevationLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ElevationLayer/) that\ndefines the elevation or terrain of the map's surface.\n\nOn a [Map](https://developers.arcgis.com/javascript/latest/references/core/Map/) instance, a default ground surface using the\n[World Elevation Service](https://www.arcgis.com/home/item.html?id=7029fb60158543ad845c7e1527af11e4)\ncan conveniently be initialized through the [Map.ground](https://developers.arcgis.com/javascript/latest/references/core/Map/#ground) property:\n```js\nlet map = new Map({\n basemap: \"topo-vector\",\n ground: \"world-elevation\"\n});\n```\n\nWhen terrain and bathymetry values are needed, the\n[TopoBathy 3D Service](https://www.arcgis.com/home/item.html?id=0c69ba5a5d254118841d43f03aa3e97d) can be used:\n\n```js\nlet map = new Map({\n basemap: \"topo-vector\",\n ground: \"world-topobathymetry\"\n});\n```\n\nWhen no basemap is available, the Ground displays a grid by default:\n\n![ground-grid](https://developers.arcgis.com/javascript/latest/assets/references/core/ground/ground-grid.png)\n\nThat can be changed by setting a color on the [surfaceColor](https://developers.arcgis.com/javascript/latest/references/core/Ground/#surfaceColor) property:\n\n```js\nmap.ground.surfaceColor = '#004c73';\n```\n\n![ground-color](https://developers.arcgis.com/javascript/latest/assets/references/core/ground/ground-color.png)\n\nIf the scene contains underground data, reduce the [opacity](https://developers.arcgis.com/javascript/latest/references/core/Ground/#opacity) of the ground to be able to see through the ground:\n\n```js\nmap.ground.opacity = 0.4;\n```\n\n[![underground-global](https://developers.arcgis.com/javascript/latest/assets/references/core/ground/underground-global.png)](https://developers.arcgis.com/javascript/latest/sample-code/sceneview-underground/)"},"@arcgis.core.Map.Map":{"description":"The Map class contains properties and methods for storing, managing, and overlaying [layers](https://developers.arcgis.com/javascript/latest/references/core/Map/#layers)\ncommon to both 2D and 3D viewing.\nLayers can be added and removed from the map, but are rendered via a\n[MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) (for viewing data in 2D) or a\n[SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/) (for viewing data in 3D). Thus a map instance is a simple container\nthat holds the layers, while the [View](https://developers.arcgis.com/javascript/latest/references/core/views/View/) is the means of displaying and\ninteracting with a map's layers and basemap.\n\nA single map may be referenced by multiple views. [This sample](https://developers.arcgis.com/javascript/latest/sample-code/views-synchronize/)\nfor example, contains a single Map that is visible in two separate views - one in [2D](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/)\nand the other in [3D](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/). Because one map may be accessed by multiple views\nin the same application, all user interaction with a map's layers is handled on the\n[View](https://developers.arcgis.com/javascript/latest/references/core/views/View/), not the Map.\n\nAn instance of Map is an essential component of the [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/)\nand [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/). A Map object should be created prior to a\nview so it can be passed into the `map` property of that view\n(e.g. [MapView.map](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#map), [SceneView.map](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#map)).\n\n```js\n// Load the Map and MapView modules\nconst [Map, MapView] = await $arcgis.import([\"@arcgis/core/Map.js\", \"@arcgis/core/views/MapView.js\"]);\n// Create a Map instance\nconst myMap = new Map({\n basemap: \"streets-vector\"\n});\n// Create a MapView instance (for 2D viewing) and reference the map instance\nconst view = new MapView({\n map: myMap\n});\n```"},"@arcgis.core.PopupTemplate.PopupTemplate":{"description":"A PopupTemplate formats and defines the content of a [Popup](https://developers.arcgis.com/javascript/latest/references/core/widgets/Popup/) for\na specific [Layer](https://developers.arcgis.com/javascript/latest/references/core/layers/Layer/) or [Graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/). The user can also use\nthe PopupTemplate to access values from feature attributes and values returned\nfrom [Arcade](https://developers.arcgis.com/javascript/latest/arcade/) expressions when a feature in the\nview is selected.\n\nThe PopupTemplate contains [title](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#title) and [content](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#content) properties\nthat act as a template used to transform a feature's\n[Graphic.attributes](https://developers.arcgis.com/javascript/latest/references/core/Graphic/#attributes) into an HTML representation.\nThe syntax `{fieldName}` or `{expression/expressionName}` performs parameter\nsubstitution. The default behavior on a [Graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) is to show the\nview's Popup after a\nclick on the [Graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/). A PopupTemplate is required for this\ndefault behavior.\n\nPopupTemplate also allows you to format the `Number` and `Date` field values and\noverride field aliases with\nthe [fieldInfos](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#fieldInfos) property. [actions](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#actions) may also be added\nto the template to give users\nthe ability to perform actions related to the feature, such as zooming to it or performing a Query based on\nthe feature's location or attributes.\n\n[![popupTemplate-example](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/popup/popup-basic.png)](https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=intro-popuptemplate)\n\nIn the image above, the initial text **Marriage in Nassau County Census Tract 5177.01** is set in the [title](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#title)\nproperty of the PopupTemplate where `CENSUS_TRACT` is the name of the field containing census tract numbers.\n\n```\npopupTemplate.title = \"Marriage in {COUNTY} County {CENSUS_TRACT}\",\n```\n\nThe rest of the content is defined in the [content](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#content) property where\n`MARRIEDRATE`, `NEVMARR_CY`, `MARRIED_CY`, and `DIVORCD_CY` are all field names that contain\nvalues to be used in the popup.\n\n```\npopupTemplate.content = \"<p>From 2017 to 2021, <b>{MARRIEDRATE}%</b> of the\" +\n\" population in {CENSUS_TRACT} were married.</p>\" +\n\"<ul><li>{MARRIED_CY} people were married.</li>\" +\n\"<li>{NEVMARR_CY} people had never married.</li>\" +\n\"<li>{DIVORCD_CY} people were divorced.</li><ul>\";\n```\nThe above example demonstrates how to format the content directly with a custom\ntext string. This is one way to format the template, it is also possible to\nadd additional elements in the content such as `fields`, `media`, and `attachments`.\nThese elements can be added individually or combined. More information on working\nwith these various elements can be found in [content](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#content).\n\nPopupTemplates may also contain custom [actions](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#actions). When clicked, these actions execute custom code\ndefined by the developer. See the [actions](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#actions) property for more details."},"@arcgis.core.PopupTemplate.PopupTemplateProperties":{"properties":{"actions":{"$ref":"#/definitions/ReadonlyArrayOrCollection<(ActionButtonProperties&{type:\"button\";})|(ActionToggleProperties&{type:\"toggle\";})>","description":"A [Collection](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/) of [action](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/) or [action toggle](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionToggle/) objects.\nEach object represents an action or function that may be executed by clicking the icon\nor image symbolizing them in the [Popup](https://developers.arcgis.com/javascript/latest/references/core/widgets/Popup/). By default, every\n[Popup](https://developers.arcgis.com/javascript/latest/references/core/widgets/Popup/) has a `zoom-to` action styled with a magnifying glass icon\n![popupTemplate-zoom-action](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/popup/popuptemplate-zoom-action.png).\nWhen this icon is clicked, the view zooms in four LODs and centers on the selected feature.\n\nPopupTemplates do not have default actions. To override actions on the\n[Popup](https://developers.arcgis.com/javascript/latest/references/core/widgets/Popup/) using PopupTemplate see [overwriteActions](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#overwriteActions).\nActions defined in a PopupTemplate will only appear in the [Popup](https://developers.arcgis.com/javascript/latest/references/core/widgets/Popup/) for\nfeatures or layers that apply that particular PopupTemplate.\n\nThe order of each action in the popup is the same order in which they appear in\nthe actions [Collection](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/).\n\nThe [Popup.@trigger-action](https://developers.arcgis.com/javascript/latest/references/core/widgets/Popup/#event-trigger-action) event in\n[Popup](https://developers.arcgis.com/javascript/latest/references/core/widgets/Popup/) fires each time an action in the popup is clicked.\nThis event should be used to execute custom code for each action clicked. For example, if you would\nlike to add a `zoom-out` action to the PopupTemplate that zooms the view out several LODs, you would\ndefine the zoom-out code in a separate function. Then you would call the custom `zoom-out` function\nin the [Popup.@trigger-action](https://developers.arcgis.com/javascript/latest/references/core/widgets/Popup/#event-trigger-action) event handler. See the sample code\nsnippet below for more details on how this works.\n\nActions are defined with the properties listed in the [ActionButton](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/) or [ActionToggle](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionToggle/) class."},"content":{"anyOf":[{"$ref":"#/definitions/HTMLElement"},{"$ref":"#/definitions/@arcgis.core.widgets.Widget.Widget"},{"items":{"$ref":"#/definitions/@arcgis.core.popup.content.Content.ContentProperties"},"type":"array"},{"$ref":"#/definitions/Promise"},{"$ref":"#/definitions/__type"},{"type":"string"}],"description":"The template for defining and formatting a popup's content.\n\n* **String** - A popup's content can be a simple text or string value referencing field\n values or [Arcade](https://developers.arcgis.com/javascript/latest/arcade/) expressions. Expressions must be defined in\n the [expressionInfos](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#expressionInfos) property.\n* **Popup elements** - You can also display content as popup elements. There are various types of\n elements which can be used individually or combined. The order in which they are set determines\n how they display within the popup. See the items below describing each element.\n - **text** - A [text content element](https://developers.arcgis.com/javascript/latest/references/core/popup/content/TextContent/)\n that provides descriptive text as content.\n - **media** - A [media content element](https://developers.arcgis.com/javascript/latest/references/core/popup/content/MediaContent/)\n that is used to display media such as charts/images.\n - **fields** - A [fields content element](https://developers.arcgis.com/javascript/latest/references/core/popup/content/FieldsContent/).\n that contains the fields to display within the content. If this is not set\n directly within the `content` property, the popup will display whatever is set in the\n [fieldInfos](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#fieldInfos) property.\n - **attachments** - An [attachments content element](https://developers.arcgis.com/javascript/latest/references/core/popup/content/AttachmentsContent/)\n that contains attachments associated with the feature.\n - **expression** - An [expression content element](https://developers.arcgis.com/javascript/latest/references/core/popup/content/ExpressionContent/) that contains an [Arcade](https://developers.arcgis.com/javascript/latest/arcade/)\n expression evaluating to a dictionary representing a [TextContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/TextContent/),\n [FieldsContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/FieldsContent/), or a [MediaContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/MediaContent/) popup element as\n defined in the [Popup Element web map specification](https://developers.arcgis.com/web-map-specification/objects/popupElement/).\n - **relationship** - A [relationship content element](https://developers.arcgis.com/javascript/latest/references/core/popup/content/RelationshipContent/) associated with a feature.\n - **custom** - A [custom content element](https://developers.arcgis.com/javascript/latest/references/core/popup/content/CustomContent/)\n that contains custom content.\n* **promise** - The PopupTemplate's content may also be defined with a promise that resolves to any of the\n above-mentioned elements. This is useful for cases when you call a method or execute a query and want\n to display the results in the popup. Simply pass the promise to the popupTemplate's content and ensure\n that it resolves to a string or other popup element.\n* **function** - Content may be defined with a JavaScript function that returns any of the above-mentioned\n elements. This is useful when your popup requires additional processing or functionality than what is\n provided with the content types listed above. For example, assume that you would like to\n display charts using third-party JavaScript libraries or categorize information into separate tabs.\n In these cases, you can use a function that returns either a string, a reference to an\n HTML element, a popup element, or a promise.\n When the feature is clicked, the feature is passed as an argument to the function and provides\n access to the feature's graphic and attributes. Set the [outFields](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#outFields) property to\n specify any fields needed for rendering the popup and set the [returnGeometry](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#returnGeometry) property\n to `true` if needing access to the associated feature's geometry.\n The function then executes and returns a value to display in the popup template.\n\n> [!CAUTION]\n>\n> **Note:** Autocasting does not apply when creating content via a function or promise."},"expressionInfos":{"description":"An array of objects or [ExpressionInfo[]](https://developers.arcgis.com/javascript/latest/references/core/popup/ExpressionInfo/) that reference\n[Arcade](https://developers.arcgis.com/javascript/latest/arcade/) expressions following\nthe specification defined by the [Arcade Popup Profile](https://developers.arcgis.com/javascript/latest/arcade/#popup).","items":{"$ref":"#/definitions/@arcgis.core.popup.ExpressionInfo.ExpressionInfoProperties"},"type":"array"},"fieldInfos":{"description":"An array of [FieldInfo](https://developers.arcgis.com/javascript/latest/references/core/popup/FieldInfo/) that defines how fields in the dataset\nor values from [Arcade](https://developers.arcgis.com/javascript/latest/arcade/) expressions participate\nin a popup. If no [FieldInfo](https://developers.arcgis.com/javascript/latest/references/core/popup/FieldInfo/) are specified, nothing will display since\nthe popup will only display the fields that are defined by this array.\nEach [FieldInfo](https://developers.arcgis.com/javascript/latest/references/core/popup/FieldInfo/) contains properties for a single field\nor expression. This property can be set directly within the PopupTemplate or\nwithin the [fields content element](https://developers.arcgis.com/javascript/latest/references/core/popup/content/FieldsContent/).\nIf this is not set within the [fields content element](https://developers.arcgis.com/javascript/latest/references/core/popup/content/FieldsContent/),\nit will default to whatever is specified directly within the `PopupTemplate.fieldInfos`.\n\n> [!WARNING]\n>\n> Use this `fieldInfos` property to display fields from related tables in chart or text elements.\n> `FieldInfos` set within the template's [fields content element](https://developers.arcgis.com/javascript/latest/references/core/popup/content/FieldsContent/) take precedence over the `PopupTemplate.fieldInfos`.\n\nThe image on the left is a result of using the first example snippet below, whereas the image on the right is a result of the second snippet.\n\n| **Content set using 'fields' type** | **Content referenced from fields set within fieldInfo** |\n| -------------------------- | --------------------------- |\n| ![popuptemplate-fields](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/popup/popuptemplate-fields.png) | ![popuptemplate-fieldinfocontent](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/popup/popuptemplate-fieldinfocontent.png) |","items":{"$ref":"#/definitions/@arcgis.core.popup.FieldInfo.FieldInfoProperties"},"type":"array"},"lastEditInfoEnabled":{"default":true,"description":"Indicates whether or not editor tracking should display.\n\n![popupTemplate-showLastEditInfo](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/popup/showlasteditinfo.png)","type":"boolean"},"layerOptions":{"$ref":"#/definitions/@arcgis.core.popup.LayerOptions.LayerOptionsProperties","description":"Additional options that can be defined for the popup layer."},"outFields":{"description":"An array of field names used in the PopupTemplate.\nUse this property to indicate what fields are required\nto fully render the PopupTemplate. This is important if setting\n[content](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#content) via a function since any fields needed for successful\nrendering should be specified here.\n\nGenerally speaking, it is good practice to always set this property\nwhen instantiating a new popup template.\n\nTo fetch the values from all fields, use `[\"*\"]`.\n\n> [!WARNING]\n>\n> This will not fetch fields from related tables. If related features\n> are needed, set this using [FieldInfo](https://developers.arcgis.com/javascript/latest/references/core/popup/FieldInfo/).","items":{"type":"string"},"type":"array"},"overwriteActions":{"default":false,"description":"Indicates whether actions should replace existing [popup actions](https://developers.arcgis.com/javascript/latest/references/core/widgets/Popup/#actions).","type":"boolean"},"returnGeometry":{"default":false,"description":"Indicates whether to include the feature's geometry for use by the template. This\nproperty should be set to `true` if needing to access the popup's selected feature's geometry.\nAccess the geometry via the returned graphic from the popup's\n[Popup.selectedFeatureWidget](https://developers.arcgis.com/javascript/latest/references/core/widgets/Popup/#selectedFeatureWidget).\nThis is needed since the geometry is not automatically queried and returned in the popup's selected feature.\n\nIf the feature layer does not specify its\n[FeatureLayer.outFields](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#outFields) and the\ntemplate's [outFields](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#outFields) isn't set, the returned popup's geometry is only returned if\n`returnGeometry` is set to `true`.\nThis also applies when working with [WebMaps](https://developers.arcgis.com/javascript/latest/references/core/WebMap/).","type":"boolean"},"title":{"$ref":"#/definitions/PopupTemplateTitle","default":"","description":"The template for defining how to format the title used in a popup.\nYou can format the title by specifying either a string value or a JavaScript function\nthat returns a simple string or a promise (since 4.15) that resolves to a string.\n\nIf using a function, the defined content returns a string value. When the feature is clicked,\nthe feature is passed as an argument to the function and provides\naccess to the feature's graphic and attributes. The function then executes and returns\na value to display in the popup template's title."}},"type":"object"},"@arcgis.core.Viewpoint.Viewpoint":{"description":"Describes a point of view for a 2D or 3D view. In a 2D view, the viewpoint is\ndetermined using a center point and scale value. In a 3D view, it is determined\nusing a [Camera](https://developers.arcgis.com/javascript/latest/references/core/Camera/) position. The Viewpoint can be\nbookmarked for later use, or used for navigation purposes."},"@arcgis.core.core.Collection.Collection":{"description":"Collection stores an array of items of the same type.\nIt provides useful utility methods for working with items in the Collection, including\n[filter()](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/#filter), [find()](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/#find), and [reduce()](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/#reduce).\n\nA Collection can be of any type. For example, [GraphicsLayer.graphics](https://developers.arcgis.com/javascript/latest/references/core/layers/GraphicsLayer/#graphics)\nis a collection of graphics that are stored in the GraphicsLayer. You can use the methods found in the Collection class\nto add, remove, re-order, or manipulate graphics in a GraphicsLayer.\n\nAnother example of a Collection is [Map.layers](https://developers.arcgis.com/javascript/latest/references/core/Map/#layers), which is a Collection of operational layers included in\nthe [Map](https://developers.arcgis.com/javascript/latest/references/core/Map/).\n\n```js\n// Removes a layer from the map using Collection.remove();\nmap.layers.remove(layer);\n```\n\nThe [change event](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/#event-change) fires each time an item is [added](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/#add), [moved](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/#reorder), or [removed](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/#remove)\nfrom the Collection.\n\nAs of version 4.18, you can iterate through the items of a Collection using [for...of](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of).\n\n```js\n// a collection of graphics displayed in the view\nconst graphics = view.graphics;\n\nfor (const graphic of graphics){\n // do something with each view graphic\n}\n```\nAs of version 4.23, [reactiveUtils](https://developers.arcgis.com/javascript/latest/references/core/core/reactiveUtils/) can be utilized to watch for property changes on items in a Collection.\n\n```js\n// reactiveUtils watch method can be used to watch the visible\n// property of each layer within the map.allLayer's collection\nconst handle = reactiveUtils.watch(\n () => view.map.allLayers.every((layer) => layer.visible),\n (allVisible) => {\n console.log(`All layers are visible = ${allVisible}`);\n }\n);\n```"},"@arcgis.core.core.Collection.ReadonlyCollection":{},"@arcgis.core.core.Error.Error":{"description":"Error is a class that enhances the debugging and error handling process. Rather than returning a generic\n[JavaScript error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error),\nthis Error returns a standardized error object with several properties. The error class can be useful\nin many scenarios, such as working with promises, the [esriRequest](https://developers.arcgis.com/javascript/latest/references/core/request/) module, and many different layers and widgets."},"@arcgis.core.editing.sharedTemplates.SharedTemplateMetadata.SharedTemplateMetadata":{"description":"The `SharedTemplateMetadata` class represents a minimal set of\ninformation about a shared template. This is the information from\nthe the [`sharedTemplates/query` endpoint](https://developers.arcgis.com/rest/services-reference/enterprise/query-shared-templates/) of a feature service. By contrast, the [SharedTemplate](https://developers.arcgis.com/javascript/latest/references/core/editing/sharedTemplates/SharedTemplate/) class represents full information about a shared template, which is a larger payload obtained from the\n[`sharedTemplates/templates`\nendpoint](https://developers.arcgis.com/rest/services-reference/enterprise/fs-template/).\nUse the `SharedTemplateMetadata` class when you\nneed only minimal information about many shared templates, such as when\npopulating a gallery or picker interface. Use the [SharedTemplate](https://developers.arcgis.com/javascript/latest/references/core/editing/sharedTemplates/SharedTemplate/) class when\nyou need full information about a specific template, such as when a\nparticular template has been selected for use in a feature creation workflow."},"@arcgis.core.geometry.Extent.Extent":{"description":"The minimum and maximum X and Y coordinates of a bounding box. Extent is used\nto describe the visible portion of a [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/).\nWhen working in a [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/), [Camera](https://developers.arcgis.com/javascript/latest/references/core/Camera/)\nis used to define the visible part of the map within the view."},"@arcgis.core.geometry.Extent.ExtentProperties":{"properties":{"hasM":{"default":false,"description":"Indicates if the geometry has M values.","type":"boolean"},"hasZ":{"default":false,"description":"Indicates if the geometry has z-values (elevation).\n\n> [!WARNING]\n>\n> **Z-values** defined in a geographic or metric coordinate system are\n> expressed in meters. However, in local scenes that use a\n> projected coordinate system, vertical units are assumed to be the same as the\n> horizontal units specified by the service.","type":"boolean"},"mmax":{"description":"The maximum possible `m` value in an extent envelope.","type":"number"},"mmin":{"description":"The minimum possible `m` value of an extent envelope.","type":"number"},"spatialReference":{"$ref":"#/definitions/@arcgis.core.geometry.SpatialReference.SpatialReferenceProperties","description":"The spatial reference of the geometry."},"xmax":{"default":0,"description":"The maximum X-coordinate of an extent envelope.","type":"number"},"xmin":{"default":0,"description":"The minimum X-coordinate of an extent envelope.","type":"number"},"ymax":{"default":0,"description":"The maximum Y-coordinate of an extent envelope.","type":"number"},"ymin":{"default":0,"description":"The minimum Y-coordinate of an extent envelope.","type":"number"},"zmax":{"description":"The maximum possible `z`, or elevation, value in an extent envelope.\n\n> [!WARNING]\n>\n> **Z-values** defined in a geographic or metric coordinate system are\n> expressed in meters. However, in local scenes that use a\n> projected coordinate system, vertical units are assumed to be the same as the\n> horizontal units specified by the service.","type":"number"},"zmin":{"description":"The minimum possible `z`, or elevation, value of an extent envelope.\n\n> [!WARNING]\n>\n> **Z-values** defined in a geographic or metric coordinate system are\n> expressed in meters. However, in local scenes that use a\n> projected coordinate system, vertical units are assumed to be the same as the\n> horizontal units specified by the service.","type":"number"}},"type":"object"},"@arcgis.core.geometry.Mesh.Mesh":{"description":"A mesh is a general, client-side 3D [Geometry](https://developers.arcgis.com/javascript/latest/references/core/geometry/Geometry/) type\ncomposed of [vertices with attributes](https://developers.arcgis.com/javascript/latest/references/core/geometry/Mesh/#vertexAttributes). The vertices include\ngeographic position, normals that affect lighting/shading and UV coordinates that\ncan be used to map images to the mesh. Vertices are combined into 3D primitives\nto render the mesh in the scene (only triangle primitives are currently supported).\n\nMesh geometries can have an intrinsic material that determines how it is being\ndisplayed. Similar to 3D objects in scene layers, mesh geometries are symbolized with a\n[MeshSymbol3D](https://developers.arcgis.com/javascript/latest/references/core/symbols/MeshSymbol3D/) symbol containing a\n[FillSymbol3DLayer](https://developers.arcgis.com/javascript/latest/references/core/symbols/FillSymbol3DLayer/).\n\nTo support multiple materials (as is often the case for complex 3D models), meshes\nmay define [components](https://developers.arcgis.com/javascript/latest/references/core/geometry/Mesh/#components) that define a material for a specific region\nin the mesh. In addition to supporting multiple materials, components can also\nreuse vertices that would otherwise be duplicated to form triangles.\n\nMeshes are loadable since 4.27. In particular when meshes come from remote services like\nthrough [SceneLayer.queryFeatures()](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/#queryFeatures), then\nthe contents of the mesh needs to be loaded asynchronously through the\n[load()](https://developers.arcgis.com/javascript/latest/references/core/geometry/Mesh/#load) method before\n[vertexAttributes](https://developers.arcgis.com/javascript/latest/references/core/geometry/Mesh/#vertexAttributes),\n[extent](https://developers.arcgis.com/javascript/latest/references/core/geometry/Mesh/#extent),\n[components](https://developers.arcgis.com/javascript/latest/references/core/geometry/Mesh/#components), etc. are available.\n\nMeshes represent fully georeferenced 3D geometry and care needs to be taken when importing mesh data.\n<details>\n<summary>Read More</summary>\n\nIt is typical for modern 3D GIS workflows that 3D geometry data be represented by 3D models, which can be stored in different file formats like glTF, OBJ, FBX, IFC, etc. These models can come from different sources, such as 3D modeling software like SketchUp or Blender, CAD software like Revit, or even custom mesh generation code.\n\nWhile some of the software may work in a georeferenced space and some of the file formats, such as IFC, may be georeferenced, much of the software and most of the model file formats are not georeferenced. This presents the challenge of expressing different georeferencing scenarios while maintaining a fast and efficient experience when displaying and editing 3D model content. In the Maps SDK we strive to strike a good balance between allowing our users to work with different scenarios while preventing situations in which good display and editing experience cannot be provided.\n\n<span id=\"mesh-api\"></span>\n## Mesh API\n\nThe entry point for representing 3D models in the Maps SDK is the [Mesh](https://developers.arcgis.com/javascript/latest/references/core/geometry/Mesh/). We refer to the API reference for details on mesh [components](https://developers.arcgis.com/javascript/latest/references/core/geometry/Mesh/#components), [MeshComponent.material](https://developers.arcgis.com/javascript/latest/references/core/geometry/support/MeshComponent/#material) and how to create meshes. This guide is concerned with georeferencing meshes.\n\nA mesh represents a georeferenced 3D model in the Maps SDK. In order to fully georeference meshes three things are needed:\n1. Spatial reference\n2. Location of the mesh in that spatial reference. We call this the origin.\n3. The coordinate system in which mesh vertices are provided. We call it the vertex space.\n\nGiven these three things, meshes can be fully georeferenced. However, for certain configurations of spatial reference, mesh vertex space and viewing mode, costly projection may be required. Because that would greatly affect display and editing performance, we decided to not display or allow editing in those cases. Please see the [limitations](https://developers.arcgis.com/javascript/latest/references/core/geometry/Mesh/#limitations) section for an overview of these restrictions.\n\nThe [spatial reference](https://developers.arcgis.com/javascript/latest/references/core/geometry/SpatialReference/) of the mesh is provided with its construction. When using one of the create functions, such as\n[createFromGLTF()](https://developers.arcgis.com/javascript/latest/references/core/geometry/Mesh/#createFromGLTF), the spatial reference will be taken from the provided location.\n\n### Mesh vertex spaces\n\nThe origin and spatial reference of a mesh provide georeferencing, but only for the origin. A mesh is composed of vertices, and they may exist in different coordinate systems depending on the data source. Hence, to fully georeference the mesh, it's crucial to define the coordinate system associated with the mesh vertices. The [mesh vertex space property](https://developers.arcgis.com/javascript/latest/references/core/geometry/Mesh/#vertexSpace) was introduced to address this need. This property specifies the meaning of the mesh vertex coordinates, ensuring that the entire mesh can be correctly georeferenced.\n\n#### Mesh local vertex space\n\nMost popular 3D model formats, such as glTF, are not georeferenced and represent the mesh vertex coordinates in a plain **local cartesian** space with some length unit (e.g. `meters` for glTF). The coordinate (0,0,0) is the origin. We call this coordinate system \"local\" and represent it using the [MeshLocalVertexSpace](https://developers.arcgis.com/javascript/latest/references/core/geometry/support/MeshLocalVertexSpace/). The units in this vertex space are always \"meters\".\n\n<img src=\"https://developers.arcgis.com/javascript/latest/assets/references/core/geometry/mesh-local-vertex-space.png\" style=\"width:300px;\"/>\n\n*local vertex space*\n\nGeoreferencing local coordinates is done by \"putting them on the map\" using a georeferenced cartesian reference frame. This frame is found by using the [local tangent plane](https://en.wikipedia.org/wiki/Local_tangent_plane_coordinates) at the georeferenced origin of the mesh. When the spatial reference uses a geographic coordinate system (GCS) or Web Mercator, the tangent plane is aligned such that the local Y tangent vector is always pointing to the north pole resulting in the east, north, up (ENU) frame.\n\nCurrently we use the tangent plane of the sphere even for ellipsoidal geographic coordinate systems. This is a simplification we use as we render on a perfect sphere in global viewing mode.\n\n<img src=\"https://developers.arcgis.com/javascript/latest/assets/references/core/geometry/mesh-local-vertex-space-on-GCS-or-WM.png\" style=\"width:300px;\"/>\n\n*local vertex space on GCS or Web Mercator (ENU)*\n\nA [local vertex space](https://developers.arcgis.com/javascript/latest/references/core/geometry/support/MeshLocalVertexSpace/) with a spatial reference which is a GCS or Web Mercator is efficient to work with as the tangent plane is easy to find and we can simply move the vertices to its georeferenced location using efficient linear transformations. This comes at the cost of an approximation error between the tangent plane and the actual surface. Consequently for larger models, this error increases while it decreases as the models get smaller.\n\nThere is an important element to consider when a mesh is created with a [local vertex space](https://developers.arcgis.com/javascript/latest/references/core/geometry/support/MeshLocalVertexSpace/) (e.g. by creating it from a glTF) and displayed in local viewing mode where a projected coordinate system (PCS) is used:\n\nThe projection introduces a warping and distortion of the space in order to allow mapping of surface coordinates to a plane. This produces a mismatch between the linear coordinates of the local vertex space and the warped, non-linear coordinates of the underlying spatial reference. While steps along a line in the local vertex space are of same length, steps along a line in the underlying spatial reference are not. This means that measuring the same line in local space and the underlying spatial reference will produce different measurements. This difference further depends on the origin location of the mesh. It is important to realize that this scenario cannot be used when correct georeferencing is required.\n\n#### Mesh georeferenced vertex spaces\n\nThe [georeferenced vertex space](https://developers.arcgis.com/javascript/latest/references/core/geometry/support/MeshGeoreferencedVertexSpace/) indicates that mesh vertices are already projected and that their coordinates are in the spatial reference of the mesh. If an [MeshGeoreferencedVertexSpace.origin](https://developers.arcgis.com/javascript/latest/references/core/geometry/support/MeshGeoreferencedVertexSpace/#origin) is provided, those vertex coordinates are interpreted as offsets relative to the origin. Otherwise, the coordinates are interpreted as absolute.\n\n<img src=\"https://developers.arcgis.com/javascript/latest/assets/references/core/geometry/mesh-georeferenced-vertex-space-on-PCS.png\" style=\"width:300px;\"/>\n\n*georeferenced vertex space on PCS*\n\nDisplay and editing are efficient for meshes with a georeferenced vertex space and when the spatial reference is a projected coordinate system and matches the spatial reference of the view. This is because in those cases, manipulations like moving a mesh can be expressed as linear transformations.\n\n## The effect of viewing modes\n\nWe will not display or allow edits for configurations where efficient display or editing is not possible due to costly reprojections being required. It is important to realize that the [SceneView.viewingMode](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#viewingMode) defines the spatial reference in which the data is displayed and hence has a direct effect on which vertex space and spatial reference combination of meshes can be done efficiently. This means that, depending on the viewing mode, display and editing of meshes with certain combinations of vertex space and spatial reference are not supported. See [limitations](https://developers.arcgis.com/javascript/latest/references/core/geometry/Mesh/#limitations) for an overview.\n\nWe established that for mesh spatial references which use a geographic coordinate system (or Web Mercator) and a local vertex space, display and editing can be done efficiently. That is true for `\"global\"` viewing mode, where the view uses a geographic coordinate system (or Web Mercator) for display.\n\nMeshes with a georeferenced vertex space and a spatial reference using a projected coordinate system (PCS) can be displayed and edited efficiently in a view using the `\"local\"` viewing mode and when the view has the same spatial reference as the mesh.\n\n## Web Mercator\n\nWeb Mercator is a spatial reference with a projected coordinate system and the de facto standard for web mapping applications. This is due to its suitability for efficient map tiling. Even though it uses a projected coordinate system, we still support using Web Mercator in global viewing mode. This is because of its importance for web mapping and also because projecting Web Mercator on the globe cancels out the strong distortions near the poles. It is the only PCS based spatial reference we support in global viewing mode.\n\nWeb Mercator support for global viewing mode naturally extends to supporting efficient display and editing for meshes with a Web Mercator spatial reference and a local vertex space, even though it is based on a projected coordinate system. Since Web Mercator is a spatial reference based on a PCS, we also support efficient display and editing for Web Mercator with meshes using a georeferenced vertex space. Web Mercator is the only exception to the rule of only meshes with a spatial reference with a geographic coordinate system can be supported in global viewing mode.\n\n<span id=\"limitations\"></span>\n## Limitations\n\n- See [Scene Layers](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/) in regards to limitations on display and editing for mesh features.\n\n## Troubleshooting mesh georeferencing\n\nIf meshes are not being displayed, then chances are that this is due to a configuration which the API does not support for display and editing