AnsweredAssumed Answered

SceneView won't render polygon with hole

Question asked by dhope@ara.com on Feb 1, 2017
Latest reply on Feb 1, 2017 by dhope@ara.com

Referencing the attached picture

polygon with hole issue

 

Both Views (SceneView on the left, MapView on the right) have a single, multi-part polygon added to a single graphics overlay. The problem is that the MapView correctly shows the hole in the polygon, but the sceneview doesn't.

 

Full project attached.

 

Any sugguestions?

 

Code looks as follows:

{
var mapOL = new GraphicsOverlay();
mapOL.SceneProperties.SurfacePlacement = SurfacePlacement.Draped;
var listpc = new List<Esri.ArcGISRuntime.Geometry.PointCollection>();
var pc1 = new Esri.ArcGISRuntime.Geometry.PointCollection(SpatialReferences.Wgs84);
pc1.Add(-5, -5, 10);
pc1.Add(5, -5, 10);
pc1.Add(5, 5, 10);
pc1.Add(-5, 5, 10);

 

listpc.Add(pc1);

 

var pc2 = new Esri.ArcGISRuntime.Geometry.PointCollection(SpatialReferences.Wgs84);
pc2.Add(-2, -2, 10);
pc2.Add(2, -2, 10);
pc2.Add(2, 2, 10);
pc2.Add(-2, 2, 10);

 

listpc.Add(pc2);

 

var poly1 = new Polygon(listpc);
var g1 = new Graphic(poly1, new SimpleFillSymbol() { Color = Colors.Red, Outline = new SimpleLineSymbol() { Color = Colors.Black, Width = 2, Style = SimpleLineSymbolStyle.Solid }, Style = SimpleFillSymbolStyle.Null }) { ZIndex = 2 };

 

mapOL.Graphics.Add(g1);

 

var poly2 = new Polygon(listpc);
var g2 = new Graphic(poly1, new SimpleFillSymbol() { Color = Colors.Red, Outline = new SimpleLineSymbol() { Color = Colors.Transparent, Width = 0, Style = SimpleLineSymbolStyle.Null }, Style = SimpleFillSymbolStyle.Solid }) { ZIndex = 1 };

 

mapOL.Graphics.Add(g2);

_mapgraphicsOverlays.Clear();

_mapgraphicsOverlays.Add(mapOL);
}

Attachments

Outcomes