Hello,
I have polylines being added to a polylineCollection:
const polylines = new PolylineCollection();
viewer.scene.primitives.add(polylines);
for (let i = 0; i < vertices.length ; i++) {
state[viewerId].segmentedLines.push(
polylines.add(
new Polyline(
{
width: 10,
positions: [
state[viewerId].vertices[i - 1],
state[viewerId].vertices[i],
],
material: new Material({
fabric: {
type: "Color",
uniforms: {
color: new Color(1, 0.0, 0.0, 0.5),
},
},
}),
},
polylines
)
)
);
}
I am using this to generate segments underneath a more complext polyline I have. However, when I am generating this polyline collection, it is using the arcType of NONE
rather than GEODESIC
can someone please tell me how to make this polyline use the GEODESIC
arcType? I have tried adding it as a property on the same level as the material like so: arcType: ArcType.GEODESIC
, but it doesn’t seem to do any good.
Here is a screenshot of the issue I am seeing just in case my description was not clear:
The polyline that is working properly was added with the following syntax:
viewer.entities.add({
polyline: {
positions: positions,
material: new ColorMaterialProperty(Color.WHITE.withAlpha(0.5)),
},
});
However, when I try adding the red line to the entities collection like this (as opposed to the primitives collection), I am unable to drill pick the red line and could not figure out why. Thank you for your help.