Extrusion not working

225
1
03-29-2023 09:41 AM
FlorianKowalsky
New Contributor III

I'm trying the Extrusion in a Scene but my Polygon is flat on the Scene.

Can you see the Error?

List<Field> polyFields = new List<Field>();
Field areaField = new Field(FieldType.Text, "height","height",50);
polyFields.Add(areaField);
FeatureCollectionTable polysTable = new FeatureCollectionTable(polyFields, GeometryType.Polygon, SpatialReferences.Wgs84);
polysTable.Renderer = CreateRenderer(GeometryType.Polygon);


Feature polyFeature = polysTable.CreateFeature();
polyFeature.SetAttributeValue(areaField, "2100");


Polygon poly = new Polygon(new MapPoint[] { p1u, p2u,p3u,p4u });
polyFeature.Geometry = poly;


await polysTable.AddFeatureAsync(polyFeature);

FeatureCollection featuresCollection = new FeatureCollection();
featuresCollection.Tables.Add(polysTable);

FeatureCollectionLayer collectionLayer = new FeatureCollectionLayer(featuresCollection);

await collectionLayer.LoadAsync();

Scene.OperationalLayers.Add(collectionLayer);

 

0 Kudos
1 Reply
KoushikHajra
Esri Contributor

Hello @FlorianKowalsky 

Thank you for reaching out to us with your question. Upon looking at your code, I do not see any extrusion operation being done. Please look at the example code in this sample to see how you setup the extrusion on features. If you have more questions, please feel free to reach out to us.

Regards,

Koushik

0 Kudos