Use asynchronous picking
To include 3D Tiles in the result when you’re picking, you can use these asynchronous picking methods:
-
RIAMap.pickAtAsync -
RIAMap.pickAtRectangleAsync -
RIAMap.pickClosestObjectAsync -
RIAMap.pickClosestObjectRectangleAsync
These methods return a promise. You can then process the results as follows:
map.pickAtAsync(posX, posY, 1).then(pickInfos => {
for (const pickInfo of pickInfos) {
// ...
}
});
Synchronous picking
Starting with LuciadRIA 2026.0, synchronous picking methods no longer include 3D Tiles layers by default.
More specifically, these methods ignore 3D Tiles layers:
-
RIAMap.pickAt -
RIAMap.pickAtRectangle -
RIAMap.pickClosestObject -
RIAMap.pickClosestObjectRectangle
For compatibility purposes, the standard pick requests can still include 3D Tiles if you explicitly enable it.
To activate this behavior, set the synchronousPicking flag in the TileSet3DLayerConstructorOptions.
const ogc3dTilesLayer = new TileSet3DLayer(model, {
selectable: true,
synchronousPicking: true
});
|
This compatibility mode has an impact on both performance and memory consumption. It’s therefore recommended to use the asynchronous picking methods whenever possible. |
Note that there are limitations when you’re using synchronous picking mode:
-
Metadata encoded in textures or as per-vertex properties isn’t included in the results.
-
For point clouds, the picking results only report the picking position in world coordinates.
Using pick and hover controllers
By default, PickController and HoverController are configured to perform synchronous picks.
Since 3D Tiles require asynchronous picking, these controllers won’t select 3D Tiles using their default settings.
However, it’s possible to enable asynchronous picks in these controllers. You can do so as follows:
map.defaultController = new DefaultController({
selectController: new SelectController({async: true}),
hoverController: new HoverController({async: true})
});
Alternatively, you can enable the synchronousPicking flag in TileSet3DLayerConstructorOptions and use the default behavior of PickController and HoverController.
See Synchronous picking for more details.