1.根据XY创建一个点
/// <summary>
/// 根据x y创建新点
/// </summary>
/// <param name="dX">x坐标值</param>
/// <param name="dY">y坐标值</param>
/// <returns>返回点要素</returns>
/// <remarks></remarks>
public static IPoint GetPntFromXY(double dX, double dY)
{
IPoint pPnt = new PointClass();
pPnt.PutCoords(dX, dY);
return pPnt;
}
2.创建MarkerElement
IElement pele = new MarkerElementClass(); pele.Geometry = GetPntFromXY(x, y); IMarkerSymbol sym = new SimpleMarkerSymbolClass(); sym.Color = ColorCustom(rDefault, gDefault, bDefault); sym.Size = ; (pele as IMarkerElement).Symbol = sym;