pointCloudRenderers

require(["esri/pointCloudRenderers"], function(pointCloudRenderers) { /* code goes here */ });
Object: esri/pointCloudRenderers
Since: ArcGIS API 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 = require("esri/renderers/PointCloudClassBreaksRenderer");
import PointCloudRGBRenderer = require("esri/renderers/PointCloudRGBRenderer");
import PointCloudStretchRenderer = require("esri/renderers/PointCloudStretchRenderer");
import PointCloudUniqueValueRenderer = require("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 geometries, 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);
  }
}

API Reference search results

NameTypeModule
Loading...