Skip to content
import PointCloudUniqueValueRenderer from "@arcgis/core/renderers/PointCloudUniqueValueRenderer.js";
Inheritance:
PointCloudUniqueValueRendererPointCloudRendererAccessor
Since
ArcGIS Maps SDK for JavaScript 4.2

PointCloudUniqueValueRenderer allows you to colorize points in a PointCloudLayer based on an attribute value. This is done by assigning unique colors to represent points with equal attribute values. This renderer is used to visualize points of the same type, not interpolate colors along a continuous ramp mapped to numbers.

See also

Constructors

Constructor

Constructor
Parameters
ParameterTypeDescriptionRequired
properties
See the properties table for a list of all the properties that may be passed into the constructor.

Properties

Any properties can be set, retrieved or listened to. See the Watch for changes topic.

colorModulation

autocast inherited Property
Type
ColorModulation
Inherited from: PointCloudRenderer
Since
ArcGIS Maps SDK for JavaScript 4.4

Reduces the brightness of the point's color, based on the value of another field, usually intensity. High values leave the color unchanged, while low values darken the color of the point. This helps to display the scanned surface in a more realistic way.

See also

colorUniqueValueInfos

autocast Property
Type
ColorUniqueValueInfo[] | null | undefined

Each element in the array is an object that matches a unique value with a specific color. Features with equal values to those specified here will be assigned the associated color. For example, you may choose to visualize points representing low vegetation with a green color and points representing power lines with a gray color. Each object has the following specification:

declaredClass

readonlyinherited Property
Type
string
Inherited from: Accessor
Since
ArcGIS Maps SDK for JavaScript 4.7

The name of the class. The declared class name is formatted as esri.folder.className.

field

Property
Type
string | null | undefined

The name of the field whose values are used to drive the visualization.

fieldTransformType

Property
Type
FieldTransformType | null | undefined

A transform that is applied to the field value before evaluating the renderer.

legendOptions

autocast Property
Type
RendererLegendOptions | null | undefined
Since
ArcGIS Maps SDK for JavaScript 4.6

An object providing options for displaying the renderer in the Legend.

Example
renderer.legendOptions = {
title: "Classification (high/low)",
order: "descending-values",
};

pointSizeAlgorithm

autocast inherited Property
Type
PointSizeFixedSizeAlgorithm | PointSizeSplatAlgorithm
Inherited from: PointCloudRenderer

Specifies how the size of the points in the point cloud is computed for rendering.

The splat algorithm automatically computes a size based on the density, which varies with the Level of Detail that is currently displayed.

The fixed size algorithm displays all points with the same size, either in screen space or real world units.

When pointSizeAlgorithm is not set, the default is splat.

pointsPerInch

inherited Property
Type
number
Inherited from: PointCloudRenderer

The number of points to draw per display inch. This property determines the level of detail in the visualization.

Default value
10

type

readonly Property
Type
"point-cloud-unique-value"

The type of Renderer.

Methods

MethodSignatureClass
fromJSON
inherited static
fromJSON(json: any): any
clone(): PointCloudUniqueValueRenderer
toJSON
inherited
toJSON(): any

fromJSON

inheritedstatic Method
Signature
fromJSON (json: any): any
Inherited from: JSONSupportMixin

Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product. The object passed into the input json parameter often comes from a response to a query operation in the REST API or a toJSON() method from another ArcGIS product. See the Using fromJSON() topic in the Guide for details and examples of when and how to use this function.

Parameters
ParameterTypeDescriptionRequired
json
any

A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects.

Returns
any

Returns a new instance of this class.

clone

Method
Signature
clone (): PointCloudUniqueValueRenderer
Since
ArcGIS Maps SDK for JavaScript 4.4

Creates a deep clone of the renderer.

Returns
PointCloudUniqueValueRenderer

A deep clone of the object that invoked this method.

Example
// Creates a deep clone of the first layer's renderer
let renderer = view.map.layers.at(0).renderer.clone();

toJSON

inherited Method
Signature
toJSON (): any
Inherited from: JSONSupportMixin

Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.

Returns
any

The ArcGIS portal JSON representation of an instance of this class.