Options
All
  • Public
  • Public/Protected
  • All
Menu

A TileSet3DLayer is a Layer that can visualize 3D tiles in a LuciadRIA Map.

Hierarchy

Implements

Overview

Constructors

constructor

Events

on

  • (event: string, callback: (...args: any[]) => void, context?: any): Handle
  • (event: "TransformationChanged", callback: (transformation: Affine3DTransformation) => void, context?: any): Handle
  • (event: "FeaturesInViewChange", callback: (idsEnteredView: number[], idsLeftView: number[]) => void, context?: any): Handle
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    • Optional context: any

    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.

    • Optional context: any

      value to use as this when executing callback

    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:

    see

    TileSet3DLayerConstructorOptions.properties You can use this event to trigger an update or deletion of property values based on the features present in the view

    see

    TileSet3DLayer.updateProperties and TileSet3DLayer.eraseProperties

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

    since

    2021.0

    Parameters

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

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

          Returns void

    • Optional context: any

    Returns Handle

Accessors

balloonContentProvider

  • get balloonContentProvider(): (obj: Feature | Shape) => string | HTMLElement
  • set balloonContentProvider(balloonContentProvider: (obj: Feature | Shape) => string | HTMLElement): void
  • The content provider that may be used when Map.showBalloon is called on the map. The content provider is a function that takes a single parameter and returns the contents for the balloon. The parameter is the object for which the balloon is shown, which is typically a Feature. The return value of the function can be a string or a DOM-node.

    See Map.showBalloon for information on how to style the balloon.

    Returns (obj: Feature | Shape) => string | HTMLElement

  • The content provider that may be used when Map.showBalloon is called on the map. The content provider is a function that takes a single parameter and returns the contents for the balloon. The parameter is the object for which the balloon is shown, which is typically a Feature. The return value of the function can be a string or a DOM-node.

    See Map.showBalloon for information on how to style the balloon.

    Parameters

    Returns any

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

children

  • 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[]

editable

  • get editable(): boolean
  • set editable(editable: boolean): void

fadingTime

  • get fadingTime(): number
  • set fadingTime(timeMs: number): void
  • 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.

    since

    2020.0

    Returns 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.

    since

    2020.0

    Parameters

    • timeMs: number

    Returns any

id

  • get id(): string
  • The node's ID (immutable). This ID was configured at construction time. If no ID was given, a UUID will have been generated automatically.

    Returns string

idProperty

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

    Returns string | undefined

  • The ID property of the layer. This is the data property that is used to identify objects within the layer.

    Parameters

    • value: string | undefined

    Returns any

isPartOfTerrain

  • get isPartOfTerrain(): boolean
  • set isPartOfTerrain(isPartOfTerrain: boolean): void
  • 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.

    since

    2020.0

    Returns 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.

    since

    2020.0

    Parameters

    • isPartOfTerrain: boolean

    Returns any

label

  • get label(): string
  • set label(value: string): void
  • 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

  • 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.

    Parameters

    • value: string

    Returns any

loadingStrategy

map

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

    Returns Map | null

meshStyle

  • The styling object used for this layer with Mesh data.

    Returns MeshStyle

  • The styling object used for this layer with Mesh data.

    Parameters

    Returns any

model

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.

    Note: This styling is only applied when the 3D object is obscured by objects 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).

    default

    null the 3D object will not be visible when occluded by another layer.

    since

    2020.1

    Returns OcclusionStyle | null

  • 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.

    Note: This styling is only applied when the 3D object is obscured by objects 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).

    default

    null the 3D object will not be visible when occluded by another layer.

    since

    2020.1

    Parameters

    Returns any

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.

    since

    2020.0

    Returns OrientedBox

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.

    default

    null no outline is drawn around the 3D object.

    since

    2020.1

    Returns OutlineStyle | null

  • 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.

    default

    null no outline is drawn around the 3D object.

    since

    2020.1

    Parameters

    Returns any

parent

  • 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 LayerGroup | null

pointCloudStyle

  • The styling object used for this layer with PointCloud data.

    Returns PointCloudStyle

  • The styling object used for this layer with PointCloud data.

    Parameters

    Returns any

qualityFactor

  • get qualityFactor(): number
  • set qualityFactor(qualityFactor: number): void
  • 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.

    Returns 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.

    Parameters

    • qualityFactor: number

    Returns any

qualityFactorDistanceFalloff

  • The dynamic distance quality factor information. Using these, it is possible to alter the quality factor in the distance. For instance, specifying options like :

    { nearDistance: 50, farDistance: 900, farQuality: 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 0.2 further than 900m away
    since

    2020.1

    Returns QualityFactorFalloffOptions

  • The dynamic distance quality factor information. Using these, it is possible to alter the quality factor in the distance. For instance, specifying options like :

    { nearDistance: 50, farDistance: 900, farQuality: 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 0.2 further than 900m away
    since

    2020.1

    Parameters

    Returns any

scaleRange

  • get scaleRange(): { max: number; min: number }
  • The scale range of this layer. The scale range is an object with a 'min' and 'max' property.

    Returns { max: number; min: number }

    • max: number
    • min: number

selectable

  • get selectable(): boolean
  • set selectable(selectable: boolean): void
  • 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

  • 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.

    Parameters

    • selectable: boolean

    Returns any

supportedPaintRepresentations

transformation

  • 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 Affine3DTransformation | null

  • 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.

    Parameters

    Returns any

transparency

  • get transparency(): boolean
  • set transparency(transparency: boolean): void
  • 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 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.

    default

    false

    since

    2020.1

    Returns 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 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.

    default

    false

    since

    2020.1

    Parameters

    • transparency: boolean

    Returns any

treeNodeType

type

  • 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

visible

  • get visible(): boolean
  • set visible(visible: boolean): void
  • 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 LayerTreeNode.visibleInTree instead.

    Returns 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 LayerTreeNode.visibleInTree instead.

    Parameters

    • visible: boolean

    Returns any

visibleInTree

  • get visibleInTree(): boolean
  • set visibleInTree(value: boolean): void
  • 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

  • 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.

    Parameters

    • value: boolean

    Returns any

Methods

accept

eraseProperties

  • (ids: number[]): void
  • 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.

    see

    TileSet3DLayerConstructorOptions.properties You can use the "FeaturesInViewChange" event to erase properties for features that left the view only.

    see

    TileSet3DLayer.on

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

    since

    2021.0

    Parameters

    • ids: number[]

      the IDs you want to erase data for

    Returns void

findLayerById

  • 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

findLayerGroupById

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

    since

    2014.0

    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

findLayerTreeNodeById

  • 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.

    since

    2014.0

    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

getModelBoundsVisibleOnMap

isPaintRepresentationSupported

isPaintRepresentationVisible

isPaintRepresentationVisibleInTree

onClick

  • 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

    • object: Feature

      the object that was clicked on

    Returns boolean

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

onCreateContextMenu

  • 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

setPaintRepresentationVisible

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

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

    Parameters

    Returns void

setPaintRepresentationVisibleInTree

  • 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

updateProperties

  • 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.

    see

    TileSet3DLayerConstructorOptions.properties You can use the "FeaturesInViewChange" event to send updates for features that are present in the view only.

    see

    TileSet3DLayer.on

    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

    since

    2021.0

    Parameters

    Returns void

visitChildren

  • 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

whenReady

  • 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.

    A LayerGroup or 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

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method