Creates a TileSet3DLayer
that can visualize 3D tiles in a LuciadRIA Map.
Supported models include:
A model containing 3D tiles-based data. If the given model is not compatible, a ProgrammingError will be thrown.
Optional
options: TileSet3DLayerConstructorOptionsThe options for this layer.
The content provider that may be used when 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 showBalloon for information on how to style the balloon.
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.
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.
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°.
90°.
2022.1
Denotes whether the layer can be edited
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.
2020.0
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.
The ID property of the layer. This is the data property that is used to identify objects within the layer.
A property that indicates if draping content that is set to be draped on meshes should be draped on the mesh in this layer.
false.
2022.1
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.
2020.0
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.
Indicates the current status of tile loading.
2023.0
The TileLoadingStrategy used by this layer.
Default is HSPC.
The model of this layer.
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).
null the 3D object will not be visible when occluded by another layer.
2020.1
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.
2020.0
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.
null no outline is drawn around the 3D object.
2020.1
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.
Settings that affect the layer's performance.
2023.0
The styling object used for this layer with PointCloud data.
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 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 :
2020.1
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.
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).
null the selected 3D object(s) will not be visible when occluded by other objects.
2023.1
Similar to TileSet3DLayer.outlineStyle but the outline effect will only apply to object(s) that are currently selected on the map.
More information can be found in the howto article Using occlusion and outline styles for selected features.
null no outline is drawn around the selected 3D object(s).
2023.1
Denotes what PaintRepresentations are available for this layer. This usually depends on the type of layer or the painter configuration on the layer
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.
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.<code>false</code>
2020.1
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.
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.
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.
the IDs you want to erase data for
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.
The id of the layer that you want to retrieve.
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.
The id of the layer group that you want to retrieve.
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.
The id of the layerTreeNode that you want to retrieve.
the requested layerTreeNode or undefined if it is not present in the tree
2014.0
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.
the paint representation
true
when paintRepresentation
is supported,
false
otherwise.
Indicates whether the specified paint representation is visible.
The paint representation
true
when paintRepresentation
is supported
and visible, 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.
The paint representation
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
.
the object that was clicked on
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.
The context menu to populate
The map that is about to show a context menu
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.
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 );
The renderer-type of the layer. Must be one of the supported paint representations.
the new visible state of the paint representation
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.
The renderer-type of the layer. Must be one of the supported paint representations.
the new visible state of the paint representation
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.
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
.
The visitor which will receive the callbacks for the children.
The order in which the children need to be traversed.
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.
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.
A promise that resolves to the LayerTreeNode when all current work is done
Registers a callback function for a given event type.
the event type to register on
the callback function to register
Rest
...args: any[]Optional
context: anythe context in which the callback function should be invoked implementation dependent.
a handle to the registered callback with a single function 'remove'. This function can be used to unregister the callback function.
Called when the transformation on this layer has been changed.
the 'TransformationChanged' event.
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: anyvalue to use as this when executing callback
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:
Optional
context: anyFor more information about subscribing to the layer event: Howto: plugging in properties from external data sources
2021.0
Fired when at least one of the performanceHints attribute changed.
The "PerformanceHintsChanged" event.
The callback to be invoked when the performanceHints changes.
2023.0
Fired whenever the loadingStatus attribute changes. For example, whenever new tiles have been loaded or requested.
the 'LoadingStatusChanged' event.
the callback to be invoked when the tile loading status of the layer changes. LoadingStatusChanged
2023.0
A
TileSet3DLayer
is a Map.