Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

100
Views
Cesium js. Polyline hiding under the tile layer

I am trying to add the polyline using the following code in the viewer

const  polylineOptions = {
   mtype: 1,
   polyline: {
       clampToGround: false,
       material: {
           red: 0.9686274509803922,
           green: 0.8784313725490196,
           blue: 0.12549019607843137,
           alpha: 1
       },
       positions:[
            {
              x: 4587184.226708501,
              y: 263034.9288440118,
              z: 4408875.3130637
            },
            {
              x: 4587020.391536608,
              y: 263038.279352096,
              z: 4409044.42829542
            },
            {
              x: 4587020.391536608,
              y: 263038.279352096,
              z: 4409044.42829542
           }
         ]
       width: 3,
       zIndex: 1000
       },
   }
this.viewer.entities.add(this.polylineOptions);

but the behaviour is unexpected as follows

open this gif to see my result

and it is giving the following log in console

Entity polylines must have clampToGround: true when using zIndex.  zIndex will be ignored.

What I actually want is to draw a space line but with clampToGround:false options, it creates the polyline that id attached to the terrain but when I use clampToGround:false then it hides under the tilelayer as shown in the gif

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!