In ArcMap Version 10 SP3, custom map elements that do not implement IGraphicsComposite and IEnumElement interfaces crash when their properties are accessed.
上次发布: August 25, 2014No Product Found
漏洞 ID 编号
NIM074919
已提交
November 3, 2011
上次修改时间
June 5, 2024
适用范围
No Product Found
找到的版本
10.1
修正版本
10.1
状态
Fixed
此漏洞已得到修复。 有关详细信息,请参阅“版本修复”和“其他信息”(如果适用)。
解决办法
In order to work with SP3, add the IGraphicsComposite and IEnumElement interfaces to the custom element class: Example implementation: #region IGraphicsComposite Members public IEnumElement get_Graphics(IDisplay Display, object Data) { return this; } #endregion #region IEnumElement Members private int enumIndex = 0; public IElement Next() { if (enumIndex == 0) { enumIndex++; IElement element = new PolygonElementClass(); element.Geometry = m_customElement; return element; } throw new COMException("Iterator End", 1); return null; } public void Reset() { enumIndex = 0; } #endregion