/** * 绘制单点,该点状态不随地图状态变化而变化 * @return 点对象 */ public Graphic DrawPoint() { double mLat = 39.98923; double mLon = 116.397428; int lat = (int)(mLat * 1E6); int lon = (int)(mLon * 1E6); GeoPoint pt1 = new GeoPoint(lat, lon); //构建点 Geometry pointGeometry = new Geometry(); //设置坐标 pointGeometry.SetPoint(pt1, 10); //设定样式 Symbol pointSymbol = new Symbol(); Symbol.Color pointColor = new Com.Baidu.Mapapi.Map.Symbol.Color(pointSymbol); pointColor.Red = 0; pointColor.Green = 126; pointColor.Blue = 255; pointColor.Alpha = 255; pointSymbol.SetPointSymbol(pointColor); //生成Graphic对象 Graphic pointGraphic = new Graphic(pointGeometry, pointSymbol); return pointGraphic; }