UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

188 lines (186 loc) • 15.5 kB
import type SpatialReference from "../geometry/SpatialReference.js"; import type Layer from "./Layer.js"; import type SceneModifications from "./support/SceneModifications.js"; import type ElevationInfo from "../symbols/support/ElevationInfo.js"; import type { MultiOriginJSONSupportMixin } from "../core/MultiOriginJSONSupport.js"; import type { APIKeyMixin, APIKeyMixinProperties } from "./mixins/APIKeyMixin.js"; import type { CustomParametersMixin, CustomParametersMixinProperties } from "./mixins/CustomParametersMixin.js"; import type { OperationalLayer, OperationalLayerProperties } from "./mixins/OperationalLayer.js"; import type { PortalLayer, PortalLayerProperties } from "./mixins/PortalLayer.js"; import type { ScaleRangeLayer, ScaleRangeLayerProperties } from "./mixins/ScaleRangeLayer.js"; import type { SceneModificationsItems } from "./support/SceneModifications.js"; import type { SpatialReferenceProperties } from "../geometry/SpatialReference.js"; import type { ElevationInfoProperties } from "../symbols/support/ElevationInfo.js"; import type { LayerProperties } from "./Layer.js"; export interface IntegratedMesh3DTilesLayerProperties extends LayerProperties, APIKeyMixinProperties, CustomParametersMixinProperties, ScaleRangeLayerProperties, PortalLayerProperties, OperationalLayerProperties, Partial<Pick<IntegratedMesh3DTilesLayer, "url">> { /** * Specifies how the mesh is placed on the vertical axis (z). This property may only be used * in a [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/). See the [ElevationInfo sample](https://developers.arcgis.com/javascript/latest/sample-code/scene-elevationinfo/) * for an example of how this property may be used. * > [!WARNING] * > * > This property only affects [IntegratedMesh3DTilesLayers](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMesh3DTilesLayer/) when using the `absolute-height` mode. * > [ElevationInfo.featureExpressionInfo](https://developers.arcgis.com/javascript/latest/references/core/symbols/support/ElevationInfo/#featureExpressionInfo) is not supported when the elevation info is specified for this class. * > Integrated mesh 3D Tiles layers always render in front of the ground surface, so setting negative offset values will not render them below the ground. * > If the elevation info is not specified, the effective elevation depends on the context and could vary per point. * * @since 4.29 */ elevationInfo?: ElevationInfoProperties | null; /** * A [SceneModification](https://developers.arcgis.com/javascript/latest/references/core/layers/support/SceneModification/) collection used to apply client-side * modifications to the layer. These modifications are not affected by the offset from * [elevationInfo](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMesh3DTilesLayer/#elevationInfo). Modifications are persisted when * using [WebScene.save()](https://developers.arcgis.com/javascript/latest/references/core/WebScene/#save), which allows you to share the modified integrated mesh * through web scenes. The following types of modifications can be applied to the integrated mesh: * * Illustration | Modification | Description * ------|------------|-------- * <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/layers/modification-clip.png" alt="modification-type-clip" style="width:100px;"/>| <b>clip</b> - removes selected area | Clip-out portions of the integrated mesh to see features below. For example, utility work on gas or water lines in an area. Planners can create a scene in which the integrated mesh is clipped out at a site to expose the water or gas lines below it. * <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/layers/modification-mask.png" alt="modification-type-mask" style="width:100px;"/> | <b>mask</b> - displays only selected area | Define an area of interest. Use a polygon and draw only parts of the integrated mesh inside that polygon. For example, if you want to show only a portion of an integrated mesh within the boundaries of a city. * <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/layers/modification-replace.png" alt="modification-type-replace" style="width:100px;"/> | <b>replace</b> - flattens selected area |Replace an area of an integrated mesh based on a 3D polygon. For example, to add constructed buildings, flatten the integrated mesh at the footprint of a building so the new building can be visualized. Create different scenarios of the new construction area and share the scenarios as a web scene to discuss with stakeholders. The integrated mesh flattens to the minimum z-vertex of the modification polygon. * * > [!WARNING] * > * > Scene modifications need to be in the same spatial reference as the layer they modify. Reprojection between WGS84 * > and WebMercator will be done automatically. Reprojection of the geometry to other spatial references can be done * > with the [projectOperator](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/projectOperator/). * * @since 4.33 * @see [ArcGIS Pro - Modify an integrated mesh layer](https://pro.arcgis.com/en/pro-app/latest/help/mapping/layer-properties/modify-integrated-mesh-layer.htm) * @see [SceneModifications](https://developers.arcgis.com/javascript/latest/references/core/layers/support/SceneModifications/) * @see [SceneModification](https://developers.arcgis.com/javascript/latest/references/core/layers/support/SceneModification/) * @see [Sample - Integrated mesh modification](https://developers.arcgis.com/javascript/latest/sample-code/layers-integratedmeshlayer-modification/) * @example * // create the IntegratedMesh3DTilesLayer * const layer = new IntegratedMesh3DTilesLayer({ ... }) * * // create a polygon * const polygon = new Polygon({ ... }); * * // create the modifications * let modifications = new SceneModifications( * [ * new SceneModification({geometry: polygon, type: 'replace'}) * ]); * * // add the modification to the IntegratedMesh * layer.modifications = modifications; */ modifications?: SceneModificationsItems | null; /** The spatial reference of the layer. */ spatialReference?: SpatialReferenceProperties; /** * The title of the layer used to identify it in places such as the [LayerList](https://developers.arcgis.com/javascript/latest/references/core/widgets/LayerList/) widget. * * When loading a layer by service url, the title is derived from the service name. * When the layer is loaded from a portal item, the title of the portal item will be used instead. * Finally, if a layer is loaded as part of a webmap or a webscene, then the title of the layer as stored in the webmap/webscene will be used. */ title?: string | null; } /** * The IntegratedMesh3DTilesLayer is designed for visualizing accurate representations of built and natural * environments in a [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/). * * Integrated mesh data is typically captured by an automated process for constructing 3D features from large sets of * overlapping imagery. The result integrates the original input image information as a realistic textured mesh and can * include elevation information and objects such as buildings and trees. Integrated mesh layers are generally created * for citywide 3D mapping; they are often captured by drone and cannot be restyled. * * The IntegratedMesh3DTilesLayer loads integrated mesh data based on a hierarchical data structure defined by the * [3D Tiles specification](https://www.ogc.org/standard/3DTiles/). 3D Tiles are an OGC standard used to visualize large * amounts of 3D content, similar to [Indexed Scene Layer (I3S)](https://www.ogc.org/standard/i3s/) scene layers. The * JavaScript Maps SDK currently supports 3D Tiles data with JPEG, PNG, and KTX2/Basis textures. * * The 3D Tiles Service is identified by the URL of the ArcGIS Server REST resource, specifically the 3D Tiles root * tileset json file: * * ```js * const integratedMesh3DTilesLayer = new IntegratedMesh3DTilesLayer({ * url: "https://tiles.arcgis.com/tiles/0z60TleH1Y2qkUzY/arcgis/rest/services/Stuttgart_WGS84/3DTilesServer/tileset.json" * }); * ``` * * @since 4.29 * @see [Sample - IntegratedMesh3DTilesLayer](https://developers.arcgis.com/javascript/latest/sample-code/layers-integratedmesh3dtileslayer/) * @see [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/) * @see [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMeshLayer/) * @see [Map](https://developers.arcgis.com/javascript/latest/references/core/Map/) */ export default class IntegratedMesh3DTilesLayer extends IntegratedMesh3DTilesLayerSuperclass { constructor(properties?: IntegratedMesh3DTilesLayerProperties); /** * Specifies how the mesh is placed on the vertical axis (z). This property may only be used * in a [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/). See the [ElevationInfo sample](https://developers.arcgis.com/javascript/latest/sample-code/scene-elevationinfo/) * for an example of how this property may be used. * > [!WARNING] * > * > This property only affects [IntegratedMesh3DTilesLayers](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMesh3DTilesLayer/) when using the `absolute-height` mode. * > [ElevationInfo.featureExpressionInfo](https://developers.arcgis.com/javascript/latest/references/core/symbols/support/ElevationInfo/#featureExpressionInfo) is not supported when the elevation info is specified for this class. * > Integrated mesh 3D Tiles layers always render in front of the ground surface, so setting negative offset values will not render them below the ground. * > If the elevation info is not specified, the effective elevation depends on the context and could vary per point. * * @since 4.29 */ get elevationInfo(): ElevationInfo | null | undefined; set elevationInfo(value: ElevationInfoProperties | null | undefined); /** * A [SceneModification](https://developers.arcgis.com/javascript/latest/references/core/layers/support/SceneModification/) collection used to apply client-side * modifications to the layer. These modifications are not affected by the offset from * [elevationInfo](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMesh3DTilesLayer/#elevationInfo). Modifications are persisted when * using [WebScene.save()](https://developers.arcgis.com/javascript/latest/references/core/WebScene/#save), which allows you to share the modified integrated mesh * through web scenes. The following types of modifications can be applied to the integrated mesh: * * Illustration | Modification | Description * ------|------------|-------- * <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/layers/modification-clip.png" alt="modification-type-clip" style="width:100px;"/>| <b>clip</b> - removes selected area | Clip-out portions of the integrated mesh to see features below. For example, utility work on gas or water lines in an area. Planners can create a scene in which the integrated mesh is clipped out at a site to expose the water or gas lines below it. * <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/layers/modification-mask.png" alt="modification-type-mask" style="width:100px;"/> | <b>mask</b> - displays only selected area | Define an area of interest. Use a polygon and draw only parts of the integrated mesh inside that polygon. For example, if you want to show only a portion of an integrated mesh within the boundaries of a city. * <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/layers/modification-replace.png" alt="modification-type-replace" style="width:100px;"/> | <b>replace</b> - flattens selected area |Replace an area of an integrated mesh based on a 3D polygon. For example, to add constructed buildings, flatten the integrated mesh at the footprint of a building so the new building can be visualized. Create different scenarios of the new construction area and share the scenarios as a web scene to discuss with stakeholders. The integrated mesh flattens to the minimum z-vertex of the modification polygon. * * > [!WARNING] * > * > Scene modifications need to be in the same spatial reference as the layer they modify. Reprojection between WGS84 * > and WebMercator will be done automatically. Reprojection of the geometry to other spatial references can be done * > with the [projectOperator](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/projectOperator/). * * @since 4.33 * @see [ArcGIS Pro - Modify an integrated mesh layer](https://pro.arcgis.com/en/pro-app/latest/help/mapping/layer-properties/modify-integrated-mesh-layer.htm) * @see [SceneModifications](https://developers.arcgis.com/javascript/latest/references/core/layers/support/SceneModifications/) * @see [SceneModification](https://developers.arcgis.com/javascript/latest/references/core/layers/support/SceneModification/) * @see [Sample - Integrated mesh modification](https://developers.arcgis.com/javascript/latest/sample-code/layers-integratedmeshlayer-modification/) * @example * // create the IntegratedMesh3DTilesLayer * const layer = new IntegratedMesh3DTilesLayer({ ... }) * * // create a polygon * const polygon = new Polygon({ ... }); * * // create the modifications * let modifications = new SceneModifications( * [ * new SceneModification({geometry: polygon, type: 'replace'}) * ]); * * // add the modification to the IntegratedMesh * layer.modifications = modifications; */ get modifications(): SceneModifications | null | undefined; set modifications(value: SceneModificationsItems | null | undefined); /** The spatial reference of the layer. */ get spatialReference(): SpatialReference; set spatialReference(value: SpatialReferenceProperties); /** * The title of the layer used to identify it in places such as the [LayerList](https://developers.arcgis.com/javascript/latest/references/core/widgets/LayerList/) widget. * * When loading a layer by service url, the title is derived from the service name. * When the layer is loaded from a portal item, the title of the portal item will be used instead. * Finally, if a layer is loaded as part of a webmap or a webscene, then the title of the layer as stored in the webmap/webscene will be used. */ accessor title: string | null | undefined; /** The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules. */ get type(): "integrated-mesh-3dtiles"; /** The URL of the root json file. */ accessor url: string | null | undefined; } declare const IntegratedMesh3DTilesLayerSuperclass: typeof Layer & typeof APIKeyMixin & typeof CustomParametersMixin & typeof MultiOriginJSONSupportMixin & typeof ScaleRangeLayer & typeof PortalLayer & typeof OperationalLayer