Weird behaviour when dragging an icon in an IconLayer with TerrainExtension #7831
-
I'm currently working on implementing drag-and-drop functionality in an IconLayer that uses TerrainExtension. I used a reference CodePen and the TerrainExtension documentation to guide my implementation. While the functionality works as expected when the pitch is 0, I've noticed that the icon jumps away from the cursor on drag when the pitch is greater than 0. The amount of this jump increases with larger pitch values. I've created a CodePen to demonstrate this behavior, which can be observed by dragging the icon with a pitch greater than 0. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
The default |
Beta Was this translation helpful? Give feedback.
-
Using
Thanks, @Pessimistress. Closing this discussion now. |
Beta Was this translation helpful? Give feedback.
The default
on*
events do not give you the accurate coordinate when you use terrain. You need to calldeck.pickObject
withunproject3D: true
. https://deck.gl/docs/api-reference/core/deck#pickobject