Geojson height and strokeWidth

I want to adjust strokeWidth and height in geojson file.
This is sample coding.
Even if I put height and strokeWidth values, it doesn’t change.

Sandcastle.addToolbarButton(“Basic styling”, function () {
** viewer.dataSources.add(**
** Cesium.GeoJsonDataSource.load(“../SampleData/ne_10m_us_states.topojson”, {**
** stroke: Cesium.Color.HOTPINK,**
** fill: Cesium.Color.PINK.withAlpha(0.1),**
** strokeWidth: 30,**
** height : 1000000,**
** heightReference: Cesium.HeightReference.RELATIVE_TO_TERRAIN, **
** outline: true,**
** }),**
** );**
});

Hi @11167,
Thanks for your post and for being part of the Cesium community.

Adjusting the strokeWidth for a geoJSON loaded via GeoJsonDataSource as you indicated in your sample code should work. There is a working sandcastle example showing this Cesium Sandcastle

height is not a field that can be set in the GeoJsonDataSource class according to the docs GeoJsonDataSource - Cesium Documentation What effect are you trying to achieve? Do you want the flat GeoJSON to sit at a certain altitude/height above the ellipsoidal surface of the earth? Or a 3D volume effect? It would be helpful if you could clarify what you are trying to achieve by specifying height.

Thanks,
Luke

Thank you for your answer.
I will explain more.
I am trying to solve the problem that the geoJson file is not visible because of the 3dMesh building.
So I want to adjust the height or increase the height of the line to make it 3D.
And strokeWidth: 50, it does not work.
If you have any ideas, please share them.

Do you want the flat GeoJSON to sit at a certain altitude/height above the ellipsoidal surface of the earth? → YES

Hi @11167 ,

Thanks for providing more information. You can anchor a geoJSON to the ground on top of terrain or tiles using the GeoJsonDataSource.clampToGround property.

  viewer.dataSources.add(
    Cesium.GeoJsonDataSource.load("../SampleData/ne_10m_us_states.topojson", {
      stroke: Cesium.Color.HOTPINK,
      fill: Cesium.Color.PINK.withAlpha(0.5),
      strokeWidth: 3,
      clampToGround: true,
    }),
  );

You can try this out in this sandcastle Cesium Sandcastle

Please let us know if this is helpful for your use case and if you have further questions.
Best,
Luke