zoomTo() and Features in Batched Models

Is it possible to zoomTo() or flyTo() the extents of a feature in a batched model? Consider the following workflow:

  1. Instantiate a 3D tiles tileset, each model of which is batched and contains per-feature information

  2. Manually pan and zoom around the scene to a particular part of the tileset

  3. Click on a feature in a model in the tileset. The click is caught via:

let new_feature = this.viewer.scene.drillPick(movement.endPosition, 1 /* number of items max */);

  1. Attempt to zoom to that feature. Options considered include this.viewer.zoomTo(new_feature.primitive);, but this zooms to the entire tileset or model.

Thanks in advance!

I think that would be a pretty useful feature! Thanks for describing your workflow and use case That always makes it easier to make decisions when implementing things. I documented a feature request here:

In the mean time, I think you might have to roll your own custom zoomTo feature here. I think you can get the batched model from the tileset, and use its properties (location/dimensions) to compute a fly position. This is the closest example I know of for manipulating models in a tileset:

If you get it working, it’d be awesome to post a code sample on here (Or even better, contributing a pull request back to Cesium!)