return {
name: track.data.Name,
polygon: {
hierarchy: newPoints,
material: Cesium.Color.RED.withAlpha( 0.2 )
},
polyline: {
positions: Cesium.Cartesian3.fromDegreesArray( segment ),
width: 1,
material: new Cesium.PolylineDashMaterialProperty( {
color: Cesium.Color.BLUE
} )
}
}
The above code handles 1 polygon and polyline as a single object.
-------------------------------------------------------------------
return {
name: track.data.Name,
polygon: {arrayOfPolygons},
polyline: {
positions: Cesium.Cartesian3.fromDegreesArray( segment ),
width: 1,
material: new Cesium.PolylineDashMaterialProperty( {
color: Cesium.Color.BLUE
} )
}
}
I would like to do this, but it cannot read an array in this way. I cannot statically declare each polygon because there is no knowledge of how many will be included beforehand. Is there any way to accomplish this?
I am trying to draw 2-d corridors made up of multiple polygons and polylines. The polylines are not always in the center of the polygon. I can create each individual segement(one polygon with one polyline) but I need to be able to make a group of them behave as a single entity.
The Cesium version, operating system and browser.
1.36.0 Windows 7 and Electron/ChromeV8
Thanks in advance!
Jonathan