Click on pieces of trajectories

Hi ! I am trying to display a trajectory where there are segments, I would like to know whether it is possible to click on certain pieces of the trajectory and register in a record the ones which have been clicked ?
Thanks a lot for your answer

Hi @sarahlnt,

Thanks for sharing this question!

Do you have some code example you can share (or pseudocode)?

Actually no. The idea would be to label pictures by clicking on a button yes or no, actually, and register this into a database, but this seems easier than I thought