I am trying to extract the set of points that define a line the user clicks on in the 3d view.
As a result of scene.drillPick
I get a Cesium3DTileFeature
. This has a content
property of a Vector3DTileContent
. However I don’t see a way to access a set of points that define the polyline on either of those objects.
Any idea how to get the set of points off of either of these objects? Thanks!
@mdc9001
Is Camera.getPickRay()
similar to you are looking for? Camera.getPickRay()
returns a Ray
object containing the direction
and origin
of the Camera
. I believe that the origin
has the information you are looking for.
This sandcastle demo might also be useful. It shows how to annotate the Cesium viewer with meridian lines as well as billboards showing the coordinates of where a user has clicked.
Let me know if you have any other questions or concerns!
-Sam
Sorry Sam, that is not what I am looking for. I want to extract data from loaded 3d tile contents, not from the location of the camera.
In my case there are vector lines and polygons included as part of the 3dTile. (eg roads or boundaries). I would like to get the points that define these roads or boundaries when the user clicks on one of them. I can get a Cesium3DTileFeature
that represents these lines with scene.drillPick
however I don’t see a way to get the set of points from that object.
@mdc9001
I apologize for the confusion - I thought you were interested in getting data from either the camera or only the location that a user selects. I will check in with emerging tech about this and get back to you ASAP.
-Sam
@mchristyuk
I triaged this issue with @sean_lilley. The functionality that you are looking for is currently not supported with “stock” CesiumJS. However, @sean_lilley is looking into a workaround.
-Sam