Hello,
First of all, is there a different method for PolygonOutline?
if not how can i do flyTo polygon created by GeometryInstance?
I am using the following codes for PolygonOutline. But I can not use the flyTo function for this polygon I created.
var positions = Cesium.Cartesian3.fromDegreesArray(coords);
var polygonOutlineInstance = new Cesium.GeometryInstance({
geometry: Cesium.PolygonOutlineGeometry.fromPositions({
positions: positions
}),
attributes: {
color: Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.RED)
}
});
var primite = new Cesium.Primitive({
geometryInstances: [polygonOutlineInstance],
appearance: new Cesium.PerInstanceColorAppearance({
flat: true,
renderState: {
lineWidth: Math.min(2.0, viewer.scene.maximumAliasedLineWidth)
}
})
})
viewer.scene.primitives.add(primite);