1. A concise explanation of the problem you’re experiencing.
I am using ray picking to locate the clicked location on the map and placing a marker there. This works in 3D view but fails in Columbus View, where the marker is placed in an unexpected location.
2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.
Use this sandcastle:
In default 3D mode, left-click points on the Earth and see markers added there. This works with terrain on or off.
Switch to 2D mode and left-clicking also works since pickEllipsoid is used in this case.
Switch to CV mode and left-clicking places markers in unexpected places.
Thanks for taking a look! I tried out your suggestion and it works in CV when using the ellipsoid terrain, but not so well when using “Cesium World Terrain”. In particular, I’d like to be able to zoom to a mountain and place the marker on the mountain. I think I need getPickRay to get that click location, and this works well in 3D mode.
I should have clarified that the marker appears in an undesired location when I use CV mode with terrain. What I want is for the location to appear on the terrain under the mouse, which is what getPickRay gives me in 3D mode. However, using pickEllipsoid in CV mode with terrain puts the marker further towards the horizon than where I want. Here is an updated sandcastle to help illustrate, using pickEllipsoid in CV mode and CLAMP_TO_GROUND for markers:
By default, markers are placed where expected. However, select “Cesium World Terrain” and go to a mountain and rotate the view. For example:
Now click on the mountain side and you do not get a marker placed there. Instead, if you zoom out you can see the marker was placed behind the mountain: