I want to basically do what is asked in this link. However I have a few questions, is canvas-click event predefined is openseadragon? Also this method gives me errors Cannot read property of null (reading 'addHandler')
. Is there any other method to add marker to the clicking point in openseadragon viewer.
EDIT1: Apparently i was calling addHandler before adding an image to osd viewer. So this situation is fixed now. So now I have an icon that I want to add at the point of click on viewer.
EDIT2: Okay so the method mentioned in the above answer worked. But I had to declare an img tag and pass its id to addOverlay method. Also it seems we can add label to only 1 point using this. What I have is an icon (chakraui icon precisely) and want to attach that to the viewer multiple times. So everytime I click on viewer it should attach a new instance of icon to the point of click.