简体   繁体   中英

Forge viewer - How to link restored markups with their label text written on it while camera change event

In my markup, I add a label on it using (x,y) co-ordinates using "markup.markups[0].getClientPosition". This works, but if I change camera mode or rotate it will lose it place, so am wondering how I can put it back to the new position as per the new markup position? I understand I have to add event listener for "CAMERA_CHANGE_EVENT", but how I should relate the label with its corresponding svg markup, what if there are more than one markups?

Thanks in advance.

I'd suggest to use the 3d markup extension to make things easier - it supports navigation right out of the box

Follow here to get started: https://forge.autodesk.com/blog/3d-markup-icons-and-info-card

Or SVG markups work well as well: https://forge.autodesk.com/blog/create-pushpin-markup-svg

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM