Function convert

  • Converts a feature and all its associated geometries to items which can be added to cesium collections directly: Primitives, BillboardOptions or LabelOptions. This is an internal API, typically it is enough to simple use a VectorLayer to handle conversions for you.

    1. All styles provided by the style like are flattened.
    2. All single OL geometries which should be rendered with each style are extracted
    3. Cesium geometry options are extracted from each OL geometry based on the geometry, feature & vector properties
    4. Cesium geometries which can be batched into a single primitive (for instance, an extruded volume would have all its solids batched and all its outlines batched In case of relativeTo* altitude modes, primitives are batched based on the clamp origin
    5. The converted items are returned, typically to the vector context which called convert in the first place.

    Parameters

    • feature: Feature<Geometry>
    • style: StyleLike
    • vectorProperties: VectorProperties
    • scene: Scene

    Returns Promise<ConvertedItem[]>