Hello All,
I load geometries from GeoJASON file. I need to get the coordinates of the geometry once it is picked.
Is there any way to do it?
Thanks.
Hello All,
I load geometries from GeoJASON file. I need to get the coordinates of the geometry once it is picked.
Is there any way to do it?
Thanks.
Hello,
Here is an example that prints the polygon positions to the console when that polygon is picked:
var handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
handler.setInputAction(function(click) {
var pickedObject = viewer.scene.pick(click.position);
if (Cesium.defined(pickedObject)) {
console.log(pickedObject.id.polygon.hierarchy.getValue().positions);
}
}, Cesium.ScreenSpaceEventType.LEFT_CLICK)
``
Best,
Hannah