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 = 4;
(pele as IMarkerElement).Symbol = sym;