如何动态添加KML坐标点和计算速度 文件结构我已经能生成出来 也可用了 具体代码该怎么写 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 //插入数据 string path = @"E:\niu.kml"; XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(path); XmlNode xn = xmlDoc.SelectSingleNode("kml/Document"); XmlElement pl = xmlDoc.CreateElement("Place"); xn.AppendChild(pl); XmlElement des = xmlDoc.CreateElement("description"); des.InnerText = "Time:" + System.DateTime.Now.ToString() + " Coord:" + xx.ToString() + "," + yy.ToString() + " Speed:" + "23km/h";//设置节点文本 pl.AppendChild(des);//添加到<Place>节点中 XmlElement poi = xmlDoc.CreateElement("Point"); pl.AppendChild(poi); XmlElement coor = xmlDoc.CreateElement("coordinates"); coor.InnerText = xx.ToString() + "," + yy.ToString() + " "; poi.AppendChild(coor); xmlDoc.Save(path); xx += 0.003; yy += 0.002;汗 都没人来帮忙 自己找到了 谁来回个帖 分还有人要不咯 关于C/S结构的监控系统心得交流 如何实现:向二进制文件中追加内容? c#webform页面动态控件 c# 点按钮弹出下载框 datagridview打印问题 关于DataGrid的一个奇怪的问题! toolbar 为什么不能放到coolbar里面去? 鼠标经过Treeview的各节点时或点击节点时都不能在状态栏显示其指向的超链?(framset里) 没人帮我吗呜呜,到底怎么才能将一个上下文菜单和一个listview里的item联系? 各C#大虾, 说说VC.NET && VC6.0的区别???? c# code里面调用c++ dll,怎样调试? Ado.net
string path = @"E:\niu.kml";
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(path);
XmlNode xn = xmlDoc.SelectSingleNode("kml/Document"); XmlElement pl = xmlDoc.CreateElement("Place");
xn.AppendChild(pl); XmlElement des = xmlDoc.CreateElement("description");
des.InnerText = "Time:" + System.DateTime.Now.ToString() + " Coord:" + xx.ToString() + "," + yy.ToString() + " Speed:" + "23km/h";//设置节点文本
pl.AppendChild(des);//添加到<Place>节点中 XmlElement poi = xmlDoc.CreateElement("Point");
pl.AppendChild(poi); XmlElement coor = xmlDoc.CreateElement("coordinates");
coor.InnerText = xx.ToString() + "," + yy.ToString() + " ";
poi.AppendChild(coor); xmlDoc.Save(path);
xx += 0.003;
yy += 0.002;汗 都没人来帮忙
自己找到了 谁来回个帖 分还有人要不咯