Different elevations result of clampToHeightMostDetailed at same position

Hi,

If I have understood the documentation correctly, clampToHeightMostDetailed should always give the same result, no matter how high the camera is, right?
It should be use the maximum LOD.
In my sandbox, I have created my own terrain and set the camera to 2 different heights.
The clampToHeightMostDetailed function outputs different heights, which are visualised using the polylines.


Sandcastle

I would like to display a elevation profile as a chart, which is calculated by 2 selected points.
It should not matter in which camera position/height I am.
In addition, the elevation profile should refer to both the terrain and any objects that are displayed

Or how can my problem be solved?

Some new informations from my site.

as soon as the tiles have been loaded once, the result looks quite good.
There are still differences, but not as extreme.
Sandcastle

  1. add polyline
  2. zoom to 1000
  3. add polyline

As you can see, the results at each zoom level are almost identical.

in the next example, however, the result does not look good at all.
Sandcastle

  1. add polyline
  2. zoom to 500
  3. add polyline

The result is quite different.
it looks to me as if clampToHeightMostDetailed does not always take the most detailed level.

any ideas?