'Creator file GPX.
'Initializes an empty location object. You can add parameters to this method if needed.
'path: specified Dir.
'filename: specified FileName. See: (Initialize the Globals_Type.SavedFileName).
'Fix_altitude: initialize the fix altitude (meters).
'Fix_accuracy: initialize the fix accuracy (meters).
'Fix_wpts: initialize the fix waypoit's.
'Fix_time: initialize the fix time (HH:mm:ss).
'Fix_trkname: initialize the specified track name.
'Chr_pattern: splits the given text around matches of the pattern (default: "?").
Dim path As String = File.DirRootExternal
Dim Fix_time, Fix_accuracy, Fix_altitude, Fix_wpts As List
Dim Chr_pattern As String = ","
Dim init_boolean As Boolean
Dim Fix_trkname As String = "TRACK-01"
Dim DisplayColor As String = "Blue" 'see: <gpxx:DisplayColor>Blue</gpxx:DisplayColor>
Dim html_schemas As String = "http://www.garmin.com/xmlschemas/GpxExtensions/v3" 'see: <gpxx:WaypointExtension xmlns:gpxx="...">
Dim Fix_trkcmt As String = "Gefahrener Weg" 'see: <cmt>Gefahrener Weg</cmt>
'Initializes the object. You can add parameters to this method if needed.
init_boolean = CRGpx.Initialize(path, Fix_trkname, Fix_time, Fix_accuracy, Fix_altitude, Fix_wpts, Chr_pattern)
If init_boolean Then
...
'IV. Source: RTE-1-topografix.GPX
Dim path As String = CRGpx.Globals_Type.SavedFilePath
Dim filename As String = "RTE-2-topografix.GPX" ' or CRGpx.Globals_Type.SavedFileName
Dim Fix_rtes As List
'<bounds maxlat="51.8661866" maxlon="7.4931479" minlat="51.6139841" minlon="7.3194265"/>
CRGpx.SetBounds("51.8661866","7.4931479","51.6139841","7.3194265")
'Fill out the segment RTE.
'<rte>
' <name>Hinweg</name>
' <cmt>Zum Schiffshebewerk Henrichenburg</cmt>
' <extensions>
' <gpxx:RouteExtension xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3">
' <gpxx:IsAutoNamed>True</gpxx:IsAutoNamed>
' </gpxx:RouteExtension>
' </extensions>
' <rtept lat="51.8660035" lon="7.4800899">
' <time>2007-03-31T18:52:54Z</time>
' <name>Erlengrund3611</name>
' <cmt>Erlengrund 361</cmt>
' <desc>Erlengrund 361</desc>
' <sym>Residence</sym>
' <extensions>
' <gpxx:RoutePointExtension xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3">
Fix_rtes.Initialize
Fix_rtes.AddAll(Array As String("Hinweg","Zum Schiffshebewerk Henrichenburg","true","51.8660035","7.4800899","2007-03-31 18:52:54","Erlengrund3611","Erlengrund 3611","Erlengrund 3611","Residence"))
' <gpxx:Subclass>000000000000ffffffffffffffffffffffff</gpxx:Subclass>
CRGpx.gpxx_subclass("000000000000ffffffffffffffffffffffff")
' <gpxx:rpt lat="51.8652534" lon="7.4795437">
' <gpxx:Subclass>06000f544d00163811001f062900aef12800</gpxx:Subclass>
' </gpxx:rpt>
Dim gpxx_rpt As Map
gpxx_rpt.Initialize
gpxx_rpt.Put("lat","51.8657684")
gpxx_rpt.Put("lon","7.4800587")
gpxx_rpt.Put("sub","06000f544d00163811001f062900aef12800")
CRGpx.gpxx_rptsubclass(gpxx_rpt)
' <gpxx:rpt lat="51.8657684" lon="7.4800587"/>
Dim gpxx_rpt As Map
gpxx_rpt.Initialize
gpxx_rpt.Put("lat","51.8657684")
gpxx_rpt.Put("lon","7.4800587")
CRGpx.gpxx_rpt(gpxx_rpt)
' ...
' </gpxx:RoutePointExtension>
' </extensions>
' </rtept>
If CRGpx.CreateFileRoutes(path, filename, Fix_trkname, DisplayColor, Fix_trkcmt, Fix_time, Fix_accuracy, Fix_altitude, Fix_wpts, Fix_rtes, html_schemas) Then
'Save to a file trail GPS which the move, ex.format: "RTE-2-topografix.GPX"
'Of course - in the example of coordinates GPS will not be in the section <trkseg> and <wps> and <rte>
Msgbox("C R E A T E" & CRLF & filename, "IV. Message")
Else
'Notification: "E R R O R"
Msgbox("E R R O R" & CRLF & LastException.Message, "IV. Message")
End If
End If