import type { PointCloudLayerViewMixin } from "@arcgis/core/views/layers/PointCloudLayerView.js";- Since
- ArcGIS Maps SDK for JavaScript 4.13
Represents the LayerView of a PointCloudLayer after it has been added to a Map in a SceneView.
The PointCloudLayerView is responsible for streaming and rendering a PointCloudLayer's point cloud in the SceneView.
- See also
Properties
| Property | Type | Class |
|---|---|---|
availableFields readonly | string[] | |
layer readonly | |
availableFields
- Type
- string[]
A list of attribute fields fetched for each point including fields required for layer rendering and additional fields defined on the PointCloudLayer.outFields. The availableFields is populated when the layer view is finished updating. Use this list when querying points on the client.
- See also
Methods
| Method | Signature | Class |
|---|---|---|
createQuery(): Query | | |
highlight(target: HighlightTarget, options?: LayerViewHighlightOptions): ResourceHandle | | |
queryExtent(query?: QueryProperties | null | undefined, options?: AbortOptions): Promise<{
count: number;
extent: Extent | null;
}> | | |
queryFeatureCount(query?: QueryProperties | null | undefined, options?: AbortOptions): Promise<number> | | |
queryFeatures(query?: QueryProperties | null | undefined, options?: AbortOptions): Promise<FeatureSet> | |
createQuery
- Signature
-
createQuery (): Query
Creates query parameter object that can be used to fetch points as they are being
displayed. It sets the query parameter's Query.outFields
property to ["*"] and Query.returnGeometry to true.
The output spatial reference is set to the spatial reference of the view.
- Returns
- Query
The query object
highlight
- Signature
-
highlight (target: HighlightTarget, options?: LayerViewHighlightOptions): ResourceHandle
Highlights the given point(s).
- See also
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| target | The point(s) to highlight. A graphic representing a point to highlight can be obtained by using SceneView.hitTest(). | | |
| options | An object with the following properties. | |
- Returns
- ResourceHandle
Returns a highlight handler with a
remove()method that can be called to remove the highlight.
Example
// Use the default highlights collection to apply a highlight to points when you hover over them
// A handler can be used to remove any previous highlight when applying a new onelet hoverHighlight;
view.on("pointer-move", (event) => { // Search for the first feature in the layer at the hovered location view.hitTest(event).then((response) => { if (response.results[0]) { const graphic = response.results[0].graphic; view.whenLayerView(graphic.layer).then((layerView) => { // Remove any previous highlight, if it exists hoverHighlight?.remove(); // Highlight the hit points with the temporary highlight options, which are pre-configured for this use case hoverHighlight = layerView.highlight(graphic, { name: "temporary" }); }); } });}); queryExtent
- Signature
-
queryExtent (query?: QueryProperties | null | undefined, options?: AbortOptions): Promise<{ count: number; extent: Extent | null; }>
Executes a Query against points in the layer view and returns the 3D Extent of points that satisfy the query. If query parameters are not provided, the extent and count of all loaded points are returned.
For making attribute based queries on a PointCloudLayerView you need to specify the required fields in the PointCloudLayer.outFields property of the PointCloudLayer to ensure that attribute values are available on the client for querying. You can use availableFields to inspect which fields are available on the client.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| query | Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all points on the client are returned. | | |
| options | An object with the following properties. | |
- Returns
- Promise<{
count: number;
extent: Extent | null;
}>
When resolved, returns the extent and count of the points that satisfy the input query. See the object specification table below for details.
Property Type Description count Number The number of points that satisfy the input query. extent Extent The extent of the points that satisfy the query.
queryFeatureCount
- Signature
-
queryFeatureCount (query?: QueryProperties | null | undefined, options?: AbortOptions): Promise<number>
Executes a Query against points in the layer view and returns the number of points that satisfy the query. If query parameters are not provided, the count of all loaded points is returned.
For making attribute based queries on a PointCloudLayerView you need to specify the required fields in the PointCloudLayer.outFields property of the PointCloudLayer to ensure that attribute values are available on the client for querying. You can use availableFields to inspect which fields are available on the client.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| query | Specifies the attributes and spatial filter of the query.
When no parameters are passed to this method, all points on the client are returned. To only return points
visible in the view, set the | | |
| options | An object with the following properties. | |
queryFeatures
- Signature
-
queryFeatures (query?: QueryProperties | null | undefined, options?: AbortOptions): Promise<FeatureSet>
Executes a Query against points in the layer view and returns a FeatureSet. If query parameters are not provided, all loaded points are returned.
For making attribute based queries on a PointCloudLayerView you need to specify the required fields in the PointCloudLayer.outFields property of the PointCloudLayer to ensure that attribute values are available on the client for querying. You can use availableFields to inspect which fields are available on the client.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| query | Specifies the attributes and spatial filter of the query.
When no parameters are passed to this method, all points on the client are returned along with their attributes
specified in availableFields. To only return points
visible in the view, set the | | |
| options | An object with the following properties. | |
- Returns
- Promise<FeatureSet>
When resolved, a FeatureSet is returned.