pointCloudRenderers

AMD: require(["geoscene/pointCloudRenderers"], (pointCloudRenderers) => { /* code goes here */ });
ESM: import * as pointCloudRenderers from "@geoscene/core/pointCloudRenderers";
类: geoscene/pointCloudRenderers
起始版本:GeoScene Maps SDK for JavaScript 4.8

使用 TypeScript 开发时,导入 PointCloudRenderer 类的便捷模块。例如,不是像这样一次导入一个渲染器:

import PointCloudClassBreaksRenderer from "geoscene/renderers/PointCloudClassBreaksRenderer";
import PointCloudRGBRenderer from "geoscene/renderers/PointCloudRGBRenderer";
import PointCloudStretchRenderer from "geoscene/renderers/PointCloudStretchRenderer";
import PointCloudUniqueValueRenderer from "geoscene/renderers/PointCloudUniqueValueRenderer";

您可以使用此模块在一行中导入它们:

import {
  PointCloudClassBreaksRenderer,
  PointCloudRGBRenderer,
  PointCloudStretchRenderer,
  PointCloudUniqueValueRenderer
} from "geoscene/pointCloudRenderers";

此模块还允许您在渲染器上实现类型保护,从而使代码更加智能。

import { PointCloudRenderer } from "geoscene/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);
  }
}

类型定义

PointCloudClassBreaksRenderer PointCloudClassBreaksRenderer

PointCloudClassBreaksRenderer。

渲染器类型。

PointCloudRGBRenderer PointCloudRGBRenderer

PointCloudRGBRenderer。

PointCloudStretchRenderer PointCloudStretchRenderer

PointCloudStretchRenderer。

PointCloudUniqueValueRenderer PointCloudUniqueValueRenderer

PointCloudUniqueValueRenderer。

您的浏览器不再受支持。请升级您的浏览器以获得最佳体验。请参阅浏览器弃用帖子以获取更多信息