2 jimgee jimgee 于 2014.07.02 16:30 提问

关于Arcengine for .net 的一些问题

一、在图层上加点时,不能修改其样式esriSimpleMarkerStyle.esriSMSSquare,运行时看到点的样式都是esriSMSCircle。代码如下:
IMarkerElement pMarkerElement;
IMarkerSymbol pMarkerSymbol;

ISimpleMarkerSymbol pSimpleMarkerSymbol = new SimpleMarkerSymbolClass();

pSimpleMarkerSymbol.Style = esriSimpleMarkerStyle.esriSMSSquare;
pSimpleMarkerSymbol.Size = 10;
pSimpleMarkerSymbol.Outline = true;
pSimpleMarkerSymbol.OutlineSize = 4;

pRGBColor.Red = 212;
pRGBColor.Green = 212;
pRGBColor.Blue = 212;
pSimpleMarkerSymbol.OutlineColor = pRGBColor;

pMarkerSymbol = pSimpleMarkerSymbol as IMarkerSymbol;
//pMarkerSymbol.Size = 20;

//pMarkerSymbol.Color = pRGBColor;

//点
IElement pElement = new MarkerElementClass();
pElement.Geometry = point as IGeometry;
pMarkerElement = pElement as IMarkerElement;
pMarkerElement.Symbol = pMarkerSymbol;

IGraphicsContainer3D pGC3D = tempLayer as IGraphicsContainer3D;
pGC3D.AddElements(pElement);

二、加载地图后,关掉子窗口,再重新打开子窗口,原来地图上的文字(ITextElement)变成方块了。

CSDN移动问答

三、鼠标滚轮缩放地图事件可否直接加到axGlobeControl控件上?现在是加到窗体上的,每次需要窗体获得焦点,而axGlobeControl控件失去焦点才能缩放。
四、每次加载地图的时候,都要绘制点、文字的集合,导致加载的过程消耗时间长。不知道有没有提升性能的方法呢?
五、绘制点时,其Symbol选用CharacterMarkerSymbol,但也没有显示出字符来,还是显示的是圆的样式。代码如下:
IMarkerElement pMarkerElement;
IMarkerSymbol pMarkerSymbol;

ICharacterMarkerSymbol pCharacterSymbol = new CharacterMarkerSymbol();

stdole.IFontDisp pFont = new stdole.StdFont() as stdole.IFontDisp;
pFont.Name = "ESRI Default Marker";
pFont.Size = 20;
pCharacterSymbol.Font=pFont;
pCharacterSymbol.CharacterIndex = 34;


pRGBColor.Red = 212;
pRGBColor.Green = 212;
pRGBColor.Blue = 212;
pCharacterSymbol.Color = pRGBColor;

pMarkerSymbol = pCharacterSymbol as IMarkerSymbol;


//点
IElement pElement = new MarkerElementClass();
pElement.Geometry = point as IGeometry;
pMarkerElement = pElement as IMarkerElement;
pMarkerElement.Symbol = pMarkerSymbol;


IGraphicsContainer3D pGC3D = tempLayer as IGraphicsContainer3D;
pGC3D.AddElements(pElement);
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!