Drawing on map in 2D/ columbus view

1. A concise explanation of the problem you're experiencing.
Sandcastle example "Drawing on Terrain" works in 3D, does not work in 2D, and "kinda works" in Columbus view.
In columbus the vertex points are not positioned correctly while you still can draw.

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

We would like to implement some drawing that has to work in all view modes

Thank you,
Akbar

I think you’ll have to detect when you’re in 2D mode or when there’s no terrain, and switch to:

viewer.camera.pickEllipsoid

``

instead of:

viewer.scene.pickPosition

``

That seems to get it to work correctly in 2D. It does seem to work in columbus view for me with pickPosition though. Can you elaborate on “kinda works” ?

Thank you Omar for the reply.

By "Kinda works" I meant that vertex point is not positioned at mouse curso, see https://photos.app.goo.gl/9UPfvG99oUvQVCxN7

Thank you,
Akbar

Hello,

A related question: how can I temporally disable panning when moving mouse with left button down (we are implementing dragging)

Thank you

found
scene.screenSpaceCameraController.enableTranslate = false;

The camera tutorial is a nice reference on creating custom controls:

Thanks for the screenshot. I did find that turning off :

heightReference: Cesium.HeightReference.CLAMP_TO_GROUND

``

in createPoint seems to at least get the point to be attached to the line in columbus view.