public KMLPoint(KMLLocation loc, bool isExtrude, bool isTessellate) { base.Extrude = isExtrude; base.Tessellate = isTessellate; base.coordinates = new List <KMLLocation>(); base.coordinates.Add(loc); }
private static KMLPlacemarkItem ReadPlacemarkItem(XmlReader reader) { bool isExtrude = false; bool isTessallate = true; List <KMLLocation> coordinates = null; while (reader.Read()) { if (reader.NodeType == XmlNodeType.Element) { switch (reader.Name.ToUpper()) { case "EXTRUDE": { isExtrude = Convert.ToBoolean(TinyKML.ReadInt(reader)); break; } case "TESSALLATE": { isTessallate = Convert.ToBoolean(TinyKML.ReadInt(reader)); break; } case "COORDINATES": { coordinates = KMLLocation.Parse(TinyKML.ReadString(reader)); if (coordinates == null) { throw new FormatException(); } if (coordinates.Count == 1) { return(new KMLPoint(coordinates[0], isExtrude, isTessallate)); } else { return(new KMLLineString(isExtrude, isTessallate, coordinates.ToArray())); } } } } } throw new FormatException(); }
public KMLPlacemark(string name, string description, bool extrude, bool tessellate, KMLLocation point) { Name = name; Description = description; PlacemarkItem = new KMLPoint(point, extrude, tessellate); }