public static XmlDocument GenerateKmlDoc(List<MeasurePointInfo> measurePointList, StatValueField field, TextReader reader) { XmlDocument doc = new XmlDocument(); doc.Load(reader); doc.InitializeKmlDocument(field.IntervalList.Select(x => x.Color.ColorStringForKml)); for (int i = 0; i < measurePointList.Count(); i++) { PlacemarkKmlElement placemarkKmlElement = new PlacemarkKmlElement(doc, "测试点") { StyleUrl = "Color-" + measurePointList[i].ColorStringForKml, CoordinatesInfo = measurePointList[i].CoordinatesInfo }; XmlElement placemarkElement = placemarkKmlElement.CreateElement(); doc.AddPlacemarkElement(placemarkElement); } return doc; }
public static XmlDocument GenerateKmlDoc(List <MeasurePointInfo> measurePointList, StatValueField field, TextReader reader) { XmlDocument doc = new XmlDocument(); doc.Load(reader); doc.InitializeKmlDocument(field.IntervalList.Select(x => x.Color.ColorStringForKml)); for (int i = 0; i < measurePointList.Count(); i++) { PlacemarkKmlElement placemarkKmlElement = new PlacemarkKmlElement(doc, "测试点") { StyleUrl = "Color-" + measurePointList[i].ColorStringForKml, CoordinatesInfo = measurePointList[i].CoordinatesInfo }; XmlElement placemarkElement = placemarkKmlElement.CreateElement(); doc.AddPlacemarkElement(placemarkElement); } return(doc); }