コード例 #1
0
ファイル: KmlExporter.cs プロジェクト: matstroeng/quickroute
 public KmlProperties()
 {
     MapType = KmlExportMapType.MapAndRoute;
       RouteType = KmlExportRouteType.None;
       ReplayType = KmlExportReplayType.None;
       ReplayTimeInterval = new TimeSpan(0, 0, 5);
       RouteLineStyle = new KmlLineStyle();
       ReplayMarkerStyle = new KmlMarkerStyle();
       ReplayTails = new List<KmlReplayTail>() { new KmlReplayTail() { StartVisible = new TimeSpan(0), EndVisible = new TimeSpan(0, 0, 60) } };
 }
コード例 #2
0
ファイル: KmlExporter.cs プロジェクト: matstroeng/quickroute
 public bool Equals(KmlMarkerStyle obj)
 {
     if (ReferenceEquals(null, obj)) return false;
       if (ReferenceEquals(this, obj)) return true;
       return obj.Color.Equals(Color) && obj.Size == Size;
 }
コード例 #3
0
ファイル: KmlExporter.cs プロジェクト: matstroeng/quickroute
 private void CreateReplayPlacemark(Waypoint waypoint, KmlMarkerStyle style, DateTime? appearTime, DateTime? disappearTime, XmlWriter writer, IFormatProvider formatProvider)
 {
     writer.WriteStartElement("Placemark");
       writer.WriteElementString("styleUrl", "#" + GetMarkerStyleId(style));
       if (appearTime.HasValue || disappearTime.HasValue)
       {
     writer.WriteStartElement("TimeSpan");
     if (appearTime.HasValue) writer.WriteElementString("begin", FormatTime(appearTime.Value.ToUniversalTime()));
     if (disappearTime.HasValue) writer.WriteElementString("end", FormatTime(disappearTime.Value.ToUniversalTime()));
     writer.WriteEndElement(); // TimeSpan
       }
       else
       {
     writer.WriteStartElement("TimeStamp");
     writer.WriteElementString("when", FormatTime(waypoint.Time.ToUniversalTime()));
     writer.WriteEndElement(); // TimeStamp
       }
       writer.WriteStartElement("Point");
       writer.WriteElementString("coordinates",
     waypoint.LongLat.Longitude.ToString(formatProvider) + "," +
     waypoint.LongLat.Latitude.ToString(formatProvider));
       writer.WriteEndElement(); // Point
       writer.WriteEndElement(); // Placemark
 }
コード例 #4
0
ファイル: KmlExporter.cs プロジェクト: matstroeng/quickroute
 private string GetMarkerStyleId(KmlMarkerStyle style)
 {
     if (!markerStyles.ContainsKey(style)) markerStyles.Add(style, "m" + markerStyles.Count);
       return markerStyles[style];
 }
コード例 #5
0
ファイル: KmlExporter.cs プロジェクト: matstroeng/quickroute
 private void CreateReplayPlacemark(Waypoint waypoint, KmlMarkerStyle style, XmlWriter writer, IFormatProvider formatProvider)
 {
     CreateReplayPlacemark(waypoint, style, null, null, writer, formatProvider);
 }