I am using the latest version of Potree (the version last updated 27/08/2018). I have converted my source LAZ data into Potree compatible LAZ tiles (using PotreeConverter.exe). I have huge amounts of data (by this I mean possibly a few TBs worth of LAZ data). This is for the road network of the country I reside in.
How do I programatically zoom to a given set of coordinates (XYZ) in the point cloud upon initial load?
My point cloud is potentially hundreds of miles wide, therefore I need to zoom to given coordinates e.g. XYZ coordinates 409200.000, 209200.000, 150.000.
I have tried the following. It zooms, not to the desired location/coordinates:
Potree.loadPointCloud("pointclouds/OsgbColour/cloud.js", "OsgbColour", e => {
let pointcloud = e.pointcloud;
let material = pointcloud.material;
viewer.scene.addPointCloud(pointcloud);
material.pointColorType = Potree.PointColorType.RGB; // any Potree.PointColorType.XXXX
material.size = 1;
material.pointSizeType = Potree.PointSizeType.ATTENUATED;
material.shape = Potree.PointShape.CIRCLE;
viewer.fitToScreen();
viewer.scene.view.position.set(409200.000, 290200.000, 150.000);
viewer.scene.view.lookAt(4092000.000, 290200.000, 150.000);
var myactivecamera = viewer.scene.getActiveCamera();
myactivecamera.position.set(4092000.000, 290200.000, 150.000);
myactivecamera.zoom += 3.0;
});