Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CGeoJSONLayer

Cesium三维矢量图层

export
implements

{IConfigCreatableLayer}

Hierarchy

  • PrimitiveCollection
    • CGeoJSONLayer

Implements

Index

Constructors

  • 构建CGeoJSONLayer

    memberof

    CGeoJSONLayer

    Parameters

    Returns CGeoJSONLayer

Properties

destroyPrimitives: boolean

Determines if primitives in the collection are destroyed when they are removed by {@link PrimitiveCollection#destroy} or {@link PrimitiveCollection#remove} or implicitly by {@link PrimitiveCollection#removeAll}.

example

// Example 1. Primitives are destroyed by default. var primitives = new Cesium.PrimitiveCollection(); var labels = primitives.add(new Cesium.LabelCollection()); primitives = primitives.destroy(); var b = labels.isDestroyed(); // true

example

// Example 2. Do not destroy primitives in a collection. var primitives = new Cesium.PrimitiveCollection(); primitives.destroyPrimitives = false; var labels = primitives.add(new Cesium.LabelCollection()); primitives = primitives.destroy(); var b = labels.isDestroyed(); // false labels = labels.destroy(); // explicitly destroy

length: number

Gets the number of primitives in the collection.

pickEvent: Event

拾取事件

memberof

CGeoJSONLayer

show: boolean

Determines if primitives in this collection will be shown.

DefaultOptions: ICGeoJSONLayerOptions = ...

默认参数

static
memberof

CGeoJSONLayer

Methods

  • add(primitive: any, index?: number): any
  • Adds a primitive to the collection.

    example

    var billboards = scene.primitives.add(new Cesium.BillboardCollection());

    Parameters

    • primitive: any

      The primitive to add.

    • Optional index: number

    Returns any

    The primitive added to the collection.

  • contains(primitive?: any): boolean
  • Determines if this collection contains a primitive.

    Parameters

    • Optional primitive: any

    Returns boolean

    true if the primitive is in the collection; false if the primitive is undefined or was not found in the collection.

  • destroy(): void
  • Returns void

  • get(index: number): any
  • Returns the primitive in the collection at the specified index.

    example

    // Toggle the show property of every primitive in the collection. var primitives = scene.primitives; var length = primitives.length; for (var i = 0; i < length; ++i) { var p = primitives.get(i); p.show = !p.show; }

    Parameters

    • index: number

      The zero-based index of the primitive to return.

    Returns any

    The primitive at the index.

  • isDestroyed(): boolean
  • Returns true if this object was destroyed; otherwise, false.

    If this object was destroyed, it should not be used; calling any function other than isDestroyed will result in a {@link DeveloperError} exception.

    Returns boolean

    True if this object was destroyed; otherwise, false.

  • lower(primitive?: any): void
  • Lowers a primitive "down one" in the collection. If all primitives in the collection are drawn on the globe surface, this visually moves the primitive down one.

    Parameters

    • Optional primitive: any

    Returns void

  • lowerToBottom(primitive?: any): void
  • Lowers a primitive to the "bottom" of the collection. If all primitives in the collection are drawn on the globe surface, this visually moves the primitive to the bottom.

    Parameters

    • Optional primitive: any

    Returns void

  • raise(primitive?: any): void
  • Raises a primitive "up one" in the collection. If all primitives in the collection are drawn on the globe surface, this visually moves the primitive up one.

    Parameters

    • Optional primitive: any

    Returns void

  • raiseToTop(primitive?: any): void
  • Raises a primitive to the "top" of the collection. If all primitives in the collection are drawn on the globe surface, this visually moves the primitive to the top.

    Parameters

    • Optional primitive: any

    Returns void

  • remove(primitive?: any): boolean
  • Removes a primitive from the collection.

    example

    var billboards = scene.primitives.add(new Cesium.BillboardCollection()); scene.primitives.remove(billboards); // Returns true

    Parameters

    • Optional primitive: any

    Returns boolean

    true if the primitive was removed; false if the primitive is undefined or was not found in the collection.

  • removeAll(): void
  • Removes all primitives in the collection.

    Returns void

  • setDrawOptions(drawOptions: string | FeatureStyle3D | IFeatureStyle3DOptions, partialUpdate?: boolean): CGeoJSONLayer
  • 设置渲染参数

    memberof

    LGeoJSONLayer

    Parameters

    • drawOptions: string | FeatureStyle3D | IFeatureStyle3DOptions
    • partialUpdate: boolean = true

    Returns CGeoJSONLayer

    {this}

  • update(frameState: any): void
  • Parameters

    • frameState: any

    Returns void

Generated using TypeDoc