public KmlFolder CloneWithExcluding(IKmlElement[] elementsToExclude) { return(new KmlFolder(Name, Placemarks .Where(p => !elementsToExclude.Contains(p)) .Select(p => p.Clone()))); }
public override string ToString() { string retVal = string.Empty; if (Placemarks != null && Placemarks.Any(x => !string.IsNullOrEmpty(x.ToString()))) { StringBuilder sb = new StringBuilder(); sb.AppendLine("<kml xmlns=\'http://www.opengis.net/kml/2.2'>"); sb.AppendLine("<Document>"); foreach (KMLPlacemark placeMark in Placemarks.Where(x => x.HasData)) { sb.AppendLine(placeMark.ToString()); } sb.AppendLine("</Document>"); sb.AppendLine("</kml>"); retVal = sb.ToString(); } return(retVal); }