layer.Name = graphicsLayerName;
ESRI.ArcGIS.Analyst3D.IScene scene = globe as ESRI.ArcGIS.Analyst3D.IScene;
scene.AddLayer(layer, true);
// 向graphics layer添加点元素
ESRI.ArcGIS.Carto.IElement markerElement = new ESRI.ArcGIS.Carto.MarkerElementClass();
ESRI.ArcGIS.Analyst3D.ISimpleMarker3DSymbol simpleMarker3DSymbol = new ESRI.ArcGIS.Analyst3D.SimpleMarker3DSymbolClass();
simpleMarker3DSymbol.Style = ESRI.ArcGIS.Analyst3D.esriSimple3DMarkerStyle.esriS3DMSCone;
// 设置相关属性
simpleMarker3DSymbol.ResolutionQuality = 1;
ESRI.ArcGIS.Display.IColor rgbColor = new ESRI.ArcGIS.Display.RgbColorClass();
rgbColor.RGB = 255;
ESRI.ArcGIS.Display.IMarkerSymbol markerSymbol = (ESRI.ArcGIS.Display.IMarkerSymbol)simpleMarker3DSymbol;
markerSymbol.Color = rgbColor;
markerSymbol.Size = 100000;
ESRI.ArcGIS.Geometry.IPoint point = new ESRI.ArcGIS.Geometry.PointClass();
point.PutCoords(-47, 44);
markerElement.Geometry = point;
// 添加到 graphics layer
ESRI.ArcGIS.Carto.IMarkerElement markerElement_2 = (ESRI.ArcGIS.Carto.IMarkerElement)markerElement;
markerElement_2.Symbol = markerSymbol;
globeGraphicsLayer.AddElement(markerElement, 1);
// 向graphics layer添加线元素
ESRI.ArcGIS.Carto.IElement lineElement = new ESRI.ArcGIS.Carto.LineElementClass();
ESRI.ArcGIS.Analyst3D.ISimpleLine3DSymbol simpleLineSymbol3D = new ESRI.ArcGIS.Analyst3D.SimpleLine3DSymbolClass();
simpleLineSymbol3D.Style = ESRI.ArcGIS.Analyst3D.esriSimple3DLineStyle.esriS3DLSStrip;
//设置颜色和大小
simpleLineSymbol3D.ResolutionQuality = 1;
rgbColor.RGB = 255000;
ESRI.ArcGIS.Display.ILineSymbol lineSymbol = (ESRI.ArcGIS.Display.ILineSymbol)simpleLineSymbol3D;
lineSymbol.Color = rgbColor;
lineSymbol.Width = 2;
// 设置geometry
ESRI.ArcGIS.Geometry.IPolyline polyline = new ESRI.ArcGIS.Geometry.PolylineClass();
ESRI.ArcGIS.Geometry.IPoint fromPoint = new ESRI.ArcGIS.Geometry.PointClass();
fromPoint.PutCoords(-30, 44);
polyline.FromPoint = fromPoint;
ESRI.ArcGIS.Geometry.IPoint toPoint = new ESRI.ArcGIS.Geometry.PointClass();
toPoint.PutCoords(-60, 44);
polyline.ToPoint = toPoint;
lineElement.Geometry = polyline;
// 添加到 graphics layer
ESRI.ArcGIS.Carto.ILineElement lineElement_2 = (ESRI.ArcGIS.Carto.ILineElement)lineElement;
lineElement_2.Symbol = lineSymbol;
globeGraphicsLayer.AddElement(lineElement, 1);
联系客服