AMD:
require(["esri/pointCloudRenderers"], (pointCloudRenderers) => { /* code goes here */ });
ESM:
import * as pointCloudRenderers from "@arcgis/core/pointCloudRenderers.js";
Object:
esri/pointCloudRenderers
Since: ArcGIS Maps SDK for JavaScript 4.8
A convenience module for importing PointCloudRenderer classes when developing with TypeScript. For example, rather than importing renderers one at a time like this:
import PointCloudClassBreaksRenderer from "esri/renderers/PointCloudClassBreaksRenderer";
import PointCloudRGBRenderer from "esri/renderers/PointCloudRGBRenderer";
import PointCloudStretchRenderer from "esri/renderers/PointCloudStretchRenderer";
import PointCloudUniqueValueRenderer from "esri/renderers/PointCloudUniqueValueRenderer";
You can use this module to import them on a single line:
import {
PointCloudClassBreaksRenderer,
PointCloudRGBRenderer,
PointCloudStretchRenderer,
PointCloudUniqueValueRenderer
} from "esri/pointCloudRenderers";
This module also allows you to implement type guards on renderers, making your code smarter.
import { PointCloudRenderer } from "esri/pointCloudRenderers";
function logInfos(renderer: PointCloudRenderer): void {
if (renderer.type === "point-cloud-class-breaks") {
// new at 4.8, the compiler knows the renderer is a PointCloudClassBreaksRenderer
console.log("renderer colorClassBreakInfos: ", renderer.colorClassBreakInfos);
}
}
Type Definitions
-
PointCloudClassBreaksRenderer
PointCloudClassBreaksRenderer PointCloudClassBreaksRenderer
-
PointCloudClassBreaksRenderer.
-
PointCloudRenderer
PointCloudRenderer PointCloudClassBreaksRenderer |PointCloudRGBRenderer |PointCloudStretchRenderer |PointCloudUniqueValueRenderer
-
Renderer types.
-
PointCloudRGBRenderer
PointCloudRGBRenderer PointCloudRGBRenderer
-
PointCloudRGBRenderer.
-
PointCloudStretchRenderer
PointCloudStretchRenderer PointCloudStretchRenderer
-
PointCloudStretchRenderer.
-
PointCloudUniqueValueRenderer
PointCloudUniqueValueRenderer PointCloudUniqueValueRenderer
-
PointCloudUniqueValueRenderer.