Skip to content

Commit

Permalink
geosolutions-it#9548: fix issue of 3D point measurement
Browse files Browse the repository at this point in the history
  • Loading branch information
mahmoudadel54 committed Dec 12, 2023
1 parent 468775b commit c7c4807
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 3 additions & 2 deletions web/client/utils/cesium/ClickUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ export function computePositionInfo(map, movement, {

const feature = scene.pick(position);
const depthCartesian = scene.pickPosition(position);

if (!!(feature && depthCartesian)) {
if (!(feature?.primitive instanceof Cesium.GroundPrimitive)
&& !(feature?.primitive instanceof Cesium.GroundPolylinePrimitive)
&& !!(feature && depthCartesian)) {
return {
cartesian: depthCartesian,
cartographic: Cesium.Cartographic.fromCartesian(depthCartesian),
Expand Down
6 changes: 5 additions & 1 deletion web/client/utils/cesium/DrawGeometryInteraction.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,11 @@ class CesiumDrawGeometryInteraction {
this._coordinatesLength = options?.coordinatesLength;
this._geodesic = options?.geodesic;
this._sampleTerrain = options?.sampleTerrain;
this._getObjectsToExcludeOnPick = options?.getObjectsToExcludeOnPick;
this._getObjectsToExcludeOnPick = () => [
...(options?.getObjectsToExcludeOnPick ? options.getObjectsToExcludeOnPick() : []),
this._dynamicPrimitivesCollection,
this._dynamicBillboardCollection
];
this._depthTestAgainstTerrain = options?.depthTestAgainstTerrain;
this._getPositionInfo = options?.getPositionInfo || defaultGetPositionInfo;

Expand Down

0 comments on commit c7c4807

Please sign in to comment.