CesiumGS/cesium

Primitive with heightReference have a wrong positioning in 2D mode

Open

#12.531 aperta il 20 mar 2025

Vedi su GitHub
 (4 commenti) (1 reazione) (1 assegnatario)JavaScript (3324 fork)batch import
good first issueonrampingtype - bug

Metriche repository

Star
 (11.758 star)
Metriche merge PR
 (Merge medio 26g 3h) (26 PR mergiate in 30 g)

Descrizione

What happened?

Hello!

I use Cesium version 1.127.0. When a primitive has a heightReference other than NONE, its position on map is wrong in 2D mode. In 3D or without the heightReference, the primitive is placed properly.

If the primitive is displayed at lattitude longitude [0, 0], it is correctly placed.

Thank you for your help!

Sandcastle with option to add a point with a heightReference set to CLAMP_TO_GROUND

Reproduction steps

  1. Add two primitives (point or billboard) with and without a heightReference different than NONE
  2. Set the map in 2D mode
  3. The two primitives are not placed at the same position on map

Sandcastle example

https://sandcastle.cesium.com/#c=vZRtb9owEMe/ipVXqcQMG6voKEVDgEalUhCk48UyVca5EGuOjWyHlk189zlPlNBMqzRpSEj4fP/z7467o1Jog3YMnkChGyTgCQ1BsyTGXzOb6zs0Ow+lMIQJUL5zce0LX+QarCkIwLEMwMoL6TK1Ta0JL4fj+/GHUSag2VNbyYSZS80Mk+JFMiTK2F9EtHGoZDyCjQLQ7rvOJb781Ol0GuhjC7faV1ft/PUwETSLQIJgnoZ0L9AvXyC0JCKgRBsOOADKiQK3dMmVqMgWgzAWAjS2926mRZYuB+tWORvlrbV1UeGLEJVcqu4xhfSEV5Nbb9woPbbsGfiS/YQuusxth+zukLIcUpyaVFbMRBNgm8gsIAQFgsIbsqtR/ZeEF+NRbbpHY1SFOsrPYPHwbjCdP3qzxy+L2cP9qL5cJwWwWXhS8jVRUxCJ+y11LEgNPFts3xkEQZ4DWt16k9mDV8AgVb7qOwWnbU7gQK3s+H+URU8/L212XZpOUCIblKeBK712wt/4K9w/k9V2zdtg/9A6Vf7veTedBFKgwdgRJnov6Gu4ousoiUERHPL9RMbgtvLI5y2pIJY7GHDuVu7z7WJAKbt75kruWHC+p8acs62WLPCqXnWBNlyu08nZmsgDbQYb669NIbRhQ8I1pK1mv07D6Wmz59Ava/iZxVupDEoUdzFuGoi3nNit1Vwn9AcYTLUuy9Zrnkp7AdshFtzU7FJkh1hrexMmPJsc3+n3mtb/lZRLEjCxme1AcbJP3aL3/bvciDHuNe2xXmnyKTmL/Bs

Environment

Browser: Chrome and Edge CesiumJS Version: 1.127.0 Operating System: Window 10 and 11

Guida contributor