A TileSet3DLayer is a Layer that visualizes OGC 3D Tiles data.

Hierarchy (view full)

Implements

Constructors

Accessors

  • get bounds(): Bounds
  • The bounds of the layer. Those bounds are derived from those of the model, after applying the transformation provided through transformation, if any. If no transformation is given, then the bounds are the same as the ones from the model. In the case of 3D Tiles, it is recommended to use these bounds rather than the model bounds, so that the final reference and position can be captured.

    Returns Bounds

  • get children(): LayerTreeNode[]
  • The list of direct children of the node. The children are ordered according to the painting order (the bottom layer is the first element in the array). Note that also the nodes that are not visible will be included.

    Returns LayerTreeNode[]

  • get drapeSlopeAngle(): number
  • In the case where this mesh is set as a drape Target, this parameter sets the upper bound angle of slopes that will receive draping content. By default, slopes between 0° (flat surfaces) and 90° (vertical walls) will receive draping content. If set, slopes between 0° and the drapeSLopeAngle will be draped. Must be between 0° and 90°.

    Returns number

    90°.
    

    2022.1

  • set drapeSlopeAngle(slopeAngle): void
  • Parameters

    • slopeAngle: number

    Returns void

  • get editable(): boolean
  • Denotes whether the layer can be edited

    Returns boolean

  • set editable(editable): void
  • Parameters

    • editable: boolean

    Returns void

  • get fadingTime(): number
  • The time tiles will take to fade in / out when changing their visibility, in milliseconds. If set to 0, tiles will be popping as they are loaded on screen (fading disabled). The longer it is, the longer tiles will be going from fully transparent to fully visible.

    Returns number

    2020.0

  • set fadingTime(timeMs): void
  • Parameters

    • timeMs: number

    Returns void

  • get id(): string
  • The node's ID (immutable). This ID was configured at construction time and is unique over the whole layer tree. If no ID was given, a UUID will have been generated automatically.

    Returns string

  • get idProperty(): undefined | string
  • The ID property of the layer. This is the data property that is used to identify objects within the layer.

    Returns undefined | string

  • set idProperty(value): void
  • Parameters

    • value: undefined | string

    Returns void

  • get isDrapeTarget(): boolean
  • A property that indicates if draping content that is set to be draped on meshes should be draped on the mesh in this layer.

    Returns boolean

    false.
    

    2022.1

  • set isDrapeTarget(isDrapeTarget): void
  • Parameters

    • isDrapeTarget: boolean

    Returns void

  • get isPartOfTerrain(): boolean
  • A property that hints the map whether not to treat this mesh as part of the terrain. It is recommended to set this to true for all reality meshes (meshes that contain captures of the real world), and set to false for any other tileset 3D layers, such as CAD models, BIM models or any other data type that does not contain terrain as part of it. Default value is true.

    Returns boolean

    2020.0

  • set isPartOfTerrain(isPartOfTerrain): void
  • Parameters

    • isPartOfTerrain: boolean

    Returns void

  • get label(): string
  • The node's label. This label was configured at construction time. If no label was given, the label will correspond to the layer's ID.

    Returns string

  • set label(value): void
  • Parameters

    • value: string

    Returns void

  • get map(): null | Map
  • The map this note is attached to, or null. This property will be null if this node is not attached to a map.

    Returns null | Map

  • get meshStyle(): MeshStyle
  • The styling object used for this layer with Mesh data. This layer will emit a MeshStyleChanged event when its meshStyle property or any property of the meshStyle have been changed.

    Returns MeshStyle

  • set meshStyle(style): void
  • Parameters

    Returns void

  • get occlusionStyle(): null | OcclusionStyle
  • The occlusion style can be used to visualize 3D objects when they are obscured by other objects, for example to highlight a building. When set the occluded part of the object will always be visible with the outline and/or color configured on the OcclusionStyle.

    More information can be found in the howto article Highlighting mesh and point cloud data.

    Note: This styling is only applied when the 3D object is obscured by objects from the same layer or from layers that are beneath the layer containing the mesh. Objects from layers higher up in the layer tree are not taken into account. Additionally, the occlusion style is not applied to parts of the mesh that are obscured by the mesh itself (for example buildings in a reality mesh).

    The layer will emit a OcclusionStyleChanged event when its occlusionStyle property has been changed.

    Returns null | OcclusionStyle

    null the 3D object will not be visible when occluded by another layer.
    
  • set occlusionStyle(occlusionStyle): void
  • Parameters

    Returns void

  • get orientedBox(): OrientedBox
  • The orientedBox is a tight-fitting 3D box around the dataset. The reference of this box is either the reference of the model, or the output reference of transformation, if a transformation has been set on this layer.

    Returns OrientedBox

    2020.0

  • get outlineStyle(): null | OutlineStyle
  • When set an outline with the specified parameters will be drawn on the edges of the 3D object. Note that when a point cloud is not dense, an outline can be visible around individual points.

    More information can be found in the howto article Highlighting mesh and point cloud data.

    The layer will emit a OutlineStyleChanged event when its outlineStyle property has been changed.

    Returns null | OutlineStyle

    null no outline is drawn around the 3D object.
    
  • set outlineStyle(outlineStyle): void
  • Parameters

    Returns void

  • get parent(): null | LayerGroup
  • The parent of this node or null. This property will be null if this node has not been added as the child of another node yet.

    Returns null | LayerGroup

  • get pointCloudStyle(): PointCloudStyle
  • The styling object used for this layer with PointCloud data.

    The layer will emit a PointCloudStyleChanged event when its pointCloudStyle property or any property of the pointCloudStyle have been changed.

    Returns PointCloudStyle

  • set pointCloudStyle(style): void
  • Parameters

    Returns void

  • get qualityFactor(): number
  • The quality factor active for the layer. The quality factor along with the geometry error is used to decide if a given tile should be displayed at certain scales. It's a non-zero, positive value. The default value is 1.0.

    The layer will emit a QualityFactorChanged event when its qualityFactor property has been changed.

    Returns number

  • set qualityFactor(qualityFactor): void
  • Parameters

    • qualityFactor: number

    Returns void

  • get qualityFactorDistanceFalloff(): QualityFactorFalloffOptions
  • The distance quality factor information. With this it is possible to alter the quality factor in the distance. For instance, specifying options like :

    { nearDistance: 50, farDistance: 900, farQualityFactorMultiplier: 0.2 }

    Will make the layer :

    • Use its quality factor closer to 50m
    • Interpolate between its quality factor and the far quality between 50 and 900m
    • Use a quality factor of qualityFactor * 0.2 farther than 900m away

    Returns QualityFactorFalloffOptions

    2020.1

  • set qualityFactorDistanceFalloff(distanceInformation): void
  • Parameters

    Returns void

  • get scaleRange(): Interval
  • The scale range of this layer.

    Returns Interval

  • get selectable(): boolean
  • Determines whether the layer is selectable. This means that, if possible, individual 3D models from the data can be selected. This will only be possible if the TileSet3DLayerConstructorOptions.idProperty option is set.

    Returns boolean

  • set selectable(selectable): void
  • Parameters

    • selectable: boolean

    Returns void

  • get selectedOcclusionStyle(): null | OcclusionStyle
  • Similar to TileSet3DLayer.occlusionStyle but the occlusion effect will only apply to objects that are currently selected on the map.

    More information can be found in the howto article Using occlusion and outline styles for selected features.

    Note: This styling is only applied when the selected 3D object is obscured by objects from the same layer or from layers that are beneath the layer containing the mesh. Objects from layers higher up in the layer tree are not taken into account. Additionally, the occlusion style is not applied to parts of the mesh that are obscured by the mesh itself (for example buildings in a reality mesh).

    The layer will emit a SelectedOcclusionStyleChanged event when its selectedOcclusionStyle property has been changed.

    Returns null | OcclusionStyle

    null the selected 3D object(s) will not be visible when occluded by other objects.
    

    2023.1

  • set selectedOcclusionStyle(occlusionStyle): void
  • Parameters

    Returns void

  • get transformation(): null | Affine3DTransformation
  • The transformation applied to this Tileset3DLayer. Can be changed to reposition, rotate and scale the entire dataset. This transformation can be used to change the reference of the model. For cases where the model is not-referenced, you will have to set a transformation before you can add this layer to a map.

    Note that this will also impact the layer's bounds.

    This layer will emit a TransformationChanged event when this transformation property has been changed.

    Returns null | Affine3DTransformation

  • set transformation(affine3DTransformation): void
  • Parameters

    Returns void

  • get transparency(): boolean
  • Indicates whether transparent surfaces should be painted transparent.

    Enable this if you know your data has transparency, and you want to see it. The transparency can originate from transparent pixels in an rgba texture, transparent colors in a vertex attribute, or transparent colors from a MeshStyle.colorExpression.

    Note that this can have a significant performance impact, and as such it is disabled by default. When disabled, transparent surfaces will just be opaque.

    Returns boolean

    <code>false</code>
    

    2020.1

  • set transparency(transparency): void
  • Parameters

    • transparency: boolean

    Returns void

  • get type(): LayerType
  • The LayerType of this layer. The layer type is used by the Map to optimize rendering. It is an optional parameter of the layer constructor.

    Returns LayerType

  • get visible(): boolean
  • Denotes whether the node is visible. This can be considered to be the master visibility switch: Setting this to false makes the layer entirely invisible. If it is true, the visible paint representations will be visible.

    This property does not reflect whether this node's parent is visible as well, If this is desired, use visibleInTree instead.

    Returns boolean

  • set visible(visible): void
  • Parameters

    • visible: boolean

    Returns void

  • get visibleInTree(): boolean
  • Denotes whether this layer is visible on the map. This method will only return true if this layer and every parent layer up to the root of the layer tree is visible.

    If visibleInTree is set to true, this will ensure that every parent LayerTreeNode up to the of the tree is configured to be visible as well.

    Returns boolean

  • set visibleInTree(value): void
  • Parameters

    • value: boolean

    Returns void

Methods

  • Erases the cached values of all external properties for the given IDs. Consider calling this method when features with these IDs go out of view. It is especially useful for dynamically changing values. Note that without calling an update, this will result in the default value being used for all properties when these IDs come back in view. You can only erase values for properties that were defined at construction time.

    Parameters

    • ids: number[]

      the IDs you want to erase data for

    Returns void

    For more information about erasing plugged-in properties: Howto: plugging in properties from external data-sources

    2021.0

  • Returns the layer with the given ID if that layer is this node or one of its children. Note that the layer's ID does not correspond with the layer's label.

    Parameters

    • id: string

      The id of the layer that you want to retrieve.

    Returns Layer

    the requested layer or undefined if it is not present in the tree

  • Returns the layer group with the given ID if that layer is this node or one of its children.

    Parameters

    • id: string

      The id of the layer group that you want to retrieve.

    Returns LayerGroup

    the requested layer group or undefined if it is not present in the tree

    2014.0

  • Returns the layer tree node with the given ID if that layer is this node or one of its children. This may be a layer-group or a layer.

    Parameters

    • id: string

      The id of the layerTreeNode that you want to retrieve.

    Returns LayerTreeNode

    the requested layerTreeNode or undefined if it is not present in the tree

    2014.0

  • Returns the area of the map that is currently visible, expressed in model coordinates.

    Returns null | Bounds

    the visible bounds in model coordinates or null if nothing is visible

    Please use mapBounds instead.

  • Indicates whether the specified paint representation is supported for this layer. Not every LayerTreeNode may support all paint representations. E.g. raster layers may not b have a PaintRepresentation.LABEL paint representation.

    Parameters

    Returns boolean

    true when paintRepresentation is supported, false otherwise.

  • Indicates whether the specified paint representation is visible on the map. This method will only return true if this paint representation is visible for this layer and every parent layer up to the layer tree.

    Parameters

    Returns boolean

    true when paintRepresentation is supported and visible, false otherwise

  • Called when the map has detected a single click on an object that is contained by this layer. This method can be overridden to take action when the click is detected. The default implementation of this method simply returns false.

    Parameters

    Returns boolean

    true to indicate that the click was handled and default behavior should not occur; false otherwise

  • Called when the map is going to display a context menu for an object that is contained by this layer. This method can be overridden to populate the given context menu with additional items.

    Parameters

    • contextMenu: ContextMenu

      The context menu to populate

    • map: Map

      The map that is about to show a context menu

    • contextMenuInfo: any

      The object that was passed to the map when requesting the context menu. The context menu info object. This object may contain arbitrary data. The default implementation expects a pickInfo object which will be passed to the appropriate Layer's onCreateContextMenu method. A pickInfo object is JavaScript object with two properties: the objects that were touched (an array of Features) and the layer that object resides in.

    Returns void

  • Sets the visibility of a specific paint representation. This allows for example to only show the PaintRepresentation.BODY of a layer and not the PaintRepresentation.LABEL:

      var layer = ...;
    layer.setPaintRepresentationVisible( PaintRepresentation.BODY, true );
    layer.setPaintRepresentationVisible( PaintRepresentation.LABEL, false );

    Parameters

    Returns void

  • Sets the visibility of a specific paint representation in a layer tree. If it set to true, this will ensure that the paint representation of every parent LayerTreeNode up to the roof of the tree is configured to be visible as well.

    Parameters

    Returns void

  • Updates the values for the external properties you describe with the update parameter. The update parameter looks a lot like the properties descriptor used to create the layer. You provide a set of properties with IDs and updateValues. You can only update values for properties that were defined at construction time.

    Parameters

    Returns void

    Example:

      ogc3dTilesLayer.updateProperties({
    "Temperature": {
    ids: [1, 2, 3],
    //for each id we give a new TemperatureValues, ids that are not updated will remain as is
    values: [25, 27, 28],
    },
    "Maintenance": {
    ids: [9, 10, 12],
    //for each id we provide the same update-value, ids that are not updated are reset to the default value
    value: 1,
    }
    })

    For more information on updating plugged-in properties: Howto: plugging in properties from external data sources

    2021.0

  • Accepts the given visitor on the children of this.

    Parameters

    • visitor: LayerTreeVisitor

      The visitor which will receive the callbacks for the children.

    • order: VisitOrder

      The order in which the children need to be traversed.

    Returns void

  • Wait until this layer or layer group is finished with all possible work related to any change that happened before this call.
    At that moment, the screen is up-to-date with all changes.

    Examples:

      map.mapNavigator.fit({ bounds: somewhere });
    map.layerTree.whenReady().then(makeScreenshot);

    or

        layer.painter.invalidateAll();
    layer.whenReady().then(alert);

    or

        layer.model.add(newFeature);
    layer.whenReady().then(alert);

    This call can be used to have a reliable, programmatic way to wait for all work leading up to the call to be reflected on the screen.
    The returned promise will always resolve once, when the layer is ready. The promise is rejected when the layer does not become ready in 5 minutes.

    Examples (not exhaustive) of aspects this promise will wait for:

    • While loading image data when it displayed for the first time, or after navigating the view
    • While loading image data after changing raster model properties such as WMS style
    • While loading feature data when it displayed for the first time, enters its scale range, or after navigating the view
    • While loading feature data after invalidating the layer query provider
    • While processing features after invalidating the layer feature painter or shape provider, or changing the layer filter
    • While processing features after they were added, updated or removed to/in/from a model or workingSet

    NOTE: The promise gets resolved also when an error (QueryStatus.QUERY_ERROR) occurs while handling underlying query or when the node is invisible.

    A LayerTree will wait until all its children are ready.

    Returns Promise<LayerTreeNode>

    A promise that resolves to the LayerTreeNode when all current work is done

Events

  • Event fired when the editability of the layer changes.

    Parameters

    • event: string

      the 'EditableChanged' changed event.

    • callback: ((...args: any[]) => void)

      the callback to be invoked when the editability of the layer changes. The callback gets the 'editable' boolean parameter, which indicates whether or not the layer is editable.

        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    • Optionalcontext: any

      value to use as this when executing callback

    Returns Handle

  • Called when the transformation on this layer has been changed.

    Parameters

    • event: "TransformationChanged"

      the 'TransformationChanged' event.

    • callback: ((transformation: Affine3DTransformation) => void)

      the callback to be invoked when the transformation of the layer changes. The callback gets the 'transformation' Affine3DTransformation parameter, which is the new affine 3D transformation for the layer.

    Returns Handle

  • Subscribe on this event to sync your property updates with the changes of features in the view.

      ogc3dTilesLayer.on("FeaturesInViewChange", (idsEnteredView, idsLeftView) => {
    // Possible things to do:
    // - subscribe to the idsEnteredView
    // - remove subscription for idsLeftView
    // - keep track of all idsInView (for updates without this callback)
    // - erase values for idsLeftView (note: all values for all properties are erased at once)
    ogc3dTilesLayer.eraseProperties(idsLeftView);
    // - update values for idsEnteredView
    });

    This event will only get fired if you defined properties at construction time:

    Parameters

    • event: "FeaturesInViewChange"
    • callback: ((idsEnteredView: number[], idsLeftView: number[]) => void)
        • (idsEnteredView, idsLeftView): void
        • Parameters

          • idsEnteredView: number[]
          • idsLeftView: number[]

          Returns void

    • Optionalcontext: any

    Returns Handle

    For more information about subscribing to the layer event: Howto: plugging in properties from external data sources

    2021.0

  • Called when the qualityFactor on this layer has been changed.

    Parameters

    • event: "QualityFactorChanged"

      The "QualityFactorChanged" event.

    • callback: ((qualityFactor: number) => void)

      The callback to be invoked when the qualityFactor changes. The callback gets a number parameter, which is the new qualityFactor for the layer.

        • (qualityFactor): void
        • Parameters

          • qualityFactor: number

          Returns void

    Returns Handle

    2023.0

  • Fired when at least one of the performanceHints attribute changed.

    Parameters

    Returns Handle

    2023.0

  • Fired whenever the loadingStatus attribute changes. For example, whenever new tiles have been loaded or requested.

    Parameters

    • event: "LoadingStatusChanged"

      the 'LoadingStatusChanged' event.

    • callback: ((loadingStatus: TileLoadingStatus) => void)

      the callback to be invoked when the tile loading status of the layer changes. LoadingStatusChanged

    Returns Handle

    2023.0

  • Called when the pointCloudStyle on this layer has been changed.

    Parameters

    • event: "PointCloudStyleChanged"

      the 'PointCloudStyleChanged' event.

    • callback: ((pointCloudStyle: PointCloudStyle) => void)

      the callback to be invoked when the pointCloudStyle of the layer changes. The callback gets a PointCloudStyle parameter, which is the new pointCloudStyle for the layer.

        • (pointCloudStyle): void
        • Parameters

          Returns void

    Returns Handle

    2024.1.01

  • Called when the meshStyle on this layer has been changed.

    Parameters

    • event: "MeshStyleChanged"

      the 'MeshStyleChanged' event.

    • callback: ((meshStyle: MeshStyle) => void)

      the callback to be invoked when the meshStyle of the layer changes. The callback gets a MeshStyle parameter, which is the new meshStyle for the layer.

        • (meshStyle): void
        • Parameters

          Returns void

    Returns Handle

    2024.1.01

  • Called when the outlineStyle on this layer has been changed.

    Parameters

    • event: "OutlineStyleChanged"

      the 'OutlineStyleChanged' event.

    • callback: ((outlineStyle: OutlineStyle) => void)

      the callback to be invoked when the outlineStyle of the layer changes. The callback gets a OutlineStyle parameter, which is the new outlineStyle for the layer.

        • (outlineStyle): void
        • Parameters

          Returns void

    Returns Handle

    2024.1.01

  • Called when the selectedOutlineStyle on this layer has been changed.

    Parameters

    • event: "SelectedOutlineStyle"

      the 'SelectedOutlineStyleChange' event.

    • callback: ((selectedOutlineStyle: OutlineStyle) => void)

      the callback to be invoked when the selectedOutlineStyle of the layer changes. The callback gets a OutlineStyle parameter, which is the new selectedOutlineStyle for the layer.

        • (selectedOutlineStyle): void
        • Parameters

          Returns void

    Returns Handle

    2024.1.01

  • Called when the occlusionStyle on this layer has been changed.

    Parameters

    • event: "OcclusionStyleChanged"

      the 'OcclusionStyleChanged' event.

    • callback: ((occlusionStyle: OcclusionStyle) => void)

      the callback to be invoked when the occlusionStyle of the layer changes. The callback gets a OcclusionStyle parameter, which is the new occlusionStyle for the layer.

        • (occlusionStyle): void
        • Parameters

          Returns void

    Returns Handle

    2024.1.01

  • Called when the selectedOcclusionStyle on this layer has been changed.

    Parameters

    • event: "SelectedOcclusionStyle"

      the 'SelectedOcclusionStyleChange' event.

    • callback: ((selectedOcclusionStyle: OcclusionStyle) => void)

      the callback to be invoked when the selectedOcclusionStyle of the layer changes. The callback gets a OcclusionStyle parameter, which is the new selectedOcclusionStyle for the layer.

        • (selectedOcclusionStyle): void
        • Parameters

          Returns void

    Returns Handle

    2024.1.01