How to draw curved polyline on the globe by constructing JSON array of data

Hello everyone,

My goal is to draw a curved polyline on the surface of the globe.

I construct a JSON array of data where I specify positions of two points. I need these two points to be connected with the curved line, so I use property "followSurface" and set it to "true". What I get instead is two points on the globe connected with a straight line. If I place points far enough then the line shoots through the globe.

I searched throughout the forum, code examples, API Reference, but was unable to find solution to it.

Below is a snippet of my JSON array:

{
    "id":"5ba2435d-2ad3-4a2a-882b-ef5b610ea383",
    "name":"Point 1",
    "polyline":{
  "color":{
    "rgba":[
       0,255,0,255
    ]
  },
  "width":2,
  "followSurface":true,
  "show":true
  },
  "vertexPositions":{
    "cartographicDegrees":[
      55.73, 37.71, 0,
      28.30, -81.91, 0
    ]
  }
},
{
    "id":"cf09eb5a-1c4f-4a6e-bee8-0c9e6e47abf2",
    "name":"Point 2",
    "polyline":{
  "color":{
     "rgba":[
        0,255,0,255
     ]
  },
  "width":2,
  "followSurface":true,
  "show":true
  },
  "vertexPositions":{
    "cartographicDegrees":[
      28.30, -81.91, 0
      55.73, 37.71, 0,
    ]
  }
}

Any help would be appreciated.

Thanks

Hello,

What version of Cesium are you using? I could not reproduce this in the most recent version of Cesium.

Best,

Hannah

Hannah,

The version I currently use was downloaded sometime in mid 2015. Is there a way to tell what version by looking at Cesium.js file? However, I tried it with the Cesium 1.20, but had the same outcome.

Thanks

If you open your browser’s dev tools with your app running and Cesium loaded, and type in the command:
Cesium.VERSION

``

into the console, you should see the current version displayed.

Mark,

I tried the command you suggested, but it displays 'undefined'.

Thanks.