一、在图层上加点时,不能修改其样式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)变成方块了。
三、鼠标滚轮缩放地图事件可否直接加到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);