Adding a polygon in ArcGlobe via GraphicsContainer.AddElement

المشرف العام

Administrator
طاقم الإدارة
I'm trying to add some data to an ArcGlobe; however, it's not showing up and I'm wondering what the issue is.

I am doing the following:

IGeometry geometry;Ipolygon polygon = myPolygon;polygon.SpatialReference= SetSpatialReference(); geometry = polygon as IGeometry;IZaware zAware = geometry as IZaware;zaware.Zaware = false;IElement element;IPolygonElement polygonElement = new PolygonElementClass();element = polygonElement as IElement;element.Geometry = polygon;IFillShapeElement fillShapeElement = polygonElement as IFillShapeElement;ISimpleFillSymbol sfs = new SimpleFillSymbolClass();sfs.Style = esriSimpleFillStyle.esriSFSSolid;sfs.Color = myColor;fillShapeElement.Symbol = sfs;((IGraphicsContainer)myGlobeGraphicsLayer).AddElement((IElement)fillShapeElement , 0);Anyone see any major issues?

EDIT 1: Made sure to use code-sample tool.



أكثر...
 
أعلى