public static void saveTracksWaypoints(string filename, string name, ArrayList tracks, bool saveTracks, ArrayList wpts, bool saveWaypoints, out int waypointCount, out int trkpointCount) { waypointCount = 0; trkpointCount = 0; KmlDocument kmlDoc = new KmlDocument(name, 1); if (saveWaypoints) { KmlFolder waypointsFolder = kmlDoc.CreateFolder("Waypoints"); foreach (Waypoint wpt in wpts) { waypointCount++; KmlWaypoint kWaypoint = new KmlWaypoint(waypointsFolder, wpt); } } if (saveTracks) { KmlFolder tracksFolder = kmlDoc.CreateFolder("Tracks"); foreach (Track trk in tracks) { trkpointCount += trk.Trackpoints.Count; KmlTrack kTrack = new KmlTrack(tracksFolder, trk); } } kmlDoc.CreateAbout(); kmlDoc.SaveToKmz(filename, false); }
public static KmlDocument createKmlTrack(Track trk) { KmlDocument kmlDoc = new KmlDocument(trk.Name, 1); KmlFolder waypointsFolder = kmlDoc.CreateFolder("Waypoints"); KmlFolder tracksFolder = kmlDoc.CreateFolder("Tracks"); KmlTrack kTrack = new KmlTrack(tracksFolder, trk); kmlDoc.CreateAbout(); return(kmlDoc); }
public static KmlDocument createKmlTracks(ArrayList trks) { KmlDocument kmlDoc = new KmlDocument("Selected Track" + (trks.Count > 1 ? "s" : (": " + ((Track)trks[0]).Name)), 1); KmlFolder waypointsFolder = kmlDoc.CreateFolder("Waypoints"); KmlFolder tracksFolder = kmlDoc.CreateFolder("Tracks"); foreach (Track trk in trks) { KmlTrack kTrack = new KmlTrack(tracksFolder, trk); } kmlDoc.CreateAbout(); return(kmlDoc); }
public static KmlDocument createKmlAreaWithObjects(ArrayList wpts, ArrayList eqs, ArrayList trks) { KmlDocument kmlDoc = new KmlDocument("Selected Area", 1); if (wpts.Count > 0) { KmlFolder waypointsFolder = kmlDoc.CreateFolder("Waypoints"); foreach (Waypoint wpt in wpts) { KmlWaypoint kWpt = new KmlWaypoint(waypointsFolder, wpt); } } if (eqs.Count > 0) { KmlFolder earthquakesFolder = kmlDoc.CreateFolder("Earthquakes"); foreach (Earthquake eq in eqs) { KmlEarthquake kEq = new KmlEarthquake(earthquakesFolder, eq); } } if (trks.Count > 0) { KmlFolder tracksFolder = kmlDoc.CreateFolder("Tracks"); foreach (Track trk in trks) { KmlTrack kTrack = new KmlTrack(tracksFolder, trk); } } kmlDoc.CreateAbout(); return(kmlDoc); }
public static KmlDocument createKmlAreaWithObjects(ArrayList wpts, ArrayList eqs, ArrayList trks) { KmlDocument kmlDoc = new KmlDocument("Selected Area", 1); if(wpts.Count > 0) { KmlFolder waypointsFolder = kmlDoc.CreateFolder("Waypoints"); foreach(Waypoint wpt in wpts) { KmlWaypoint kWpt = new KmlWaypoint(waypointsFolder, wpt); } } if(eqs.Count > 0) { KmlFolder earthquakesFolder = kmlDoc.CreateFolder("Earthquakes"); foreach(Earthquake eq in eqs) { KmlEarthquake kEq = new KmlEarthquake(earthquakesFolder, eq); } } if(trks.Count > 0) { KmlFolder tracksFolder = kmlDoc.CreateFolder("Tracks"); foreach(Track trk in trks) { KmlTrack kTrack = new KmlTrack(tracksFolder, trk); } } kmlDoc.CreateAbout(); return kmlDoc; }
public static KmlDocument createKmlEarthquakes(ArrayList eqs) { KmlDocument kmlDoc = new KmlDocument("Selected Earthquake" + (eqs.Count > 1 ? "s" : (": " + ((Earthquake)eqs[0]).NameDisplayed)), 1); KmlFolder earthquakesFolder = kmlDoc.CreateFolder("Earthquakes"); foreach (Earthquake eq in eqs) { KmlEarthquake kEq = new KmlEarthquake(earthquakesFolder, eq); } kmlDoc.CreateAbout(); return(kmlDoc); }
public static KmlDocument createKmlWaypoints(ArrayList wpts) { KmlDocument kmlDoc = new KmlDocument("Selected Waypoint" + (wpts.Count > 1 ? "s" : (": " + ((Waypoint)wpts[0]).NameDisplayed)), 1); KmlFolder waypointsFolder = kmlDoc.CreateFolder("Waypoints"); foreach (Waypoint wpt in wpts) { KmlWaypoint kWpt = new KmlWaypoint(waypointsFolder, wpt); } kmlDoc.CreateAbout(); return(kmlDoc); }
public static void saveTracksWaypoints(string filename, string name, ArrayList tracks, bool saveTracks, ArrayList wpts, bool saveWaypoints, out int waypointCount, out int trkpointCount) { waypointCount = 0; trkpointCount = 0; KmlDocument kmlDoc = new KmlDocument(name, 1); if(saveWaypoints) { KmlFolder waypointsFolder = kmlDoc.CreateFolder("Waypoints"); foreach(Waypoint wpt in wpts) { waypointCount++; KmlWaypoint kWaypoint = new KmlWaypoint(waypointsFolder, wpt); } } if(saveTracks) { KmlFolder tracksFolder = kmlDoc.CreateFolder("Tracks"); foreach(Track trk in tracks) { trkpointCount += trk.Trackpoints.Count; KmlTrack kTrack = new KmlTrack(tracksFolder, trk); } } kmlDoc.CreateAbout(); kmlDoc.SaveToKmz(filename, false); }
public static KmlDocument createKmlWaypoints(ArrayList wpts) { KmlDocument kmlDoc = new KmlDocument("Selected Waypoint" + (wpts.Count > 1 ? "s" : (": " + ((Waypoint)wpts[0]).NameDisplayed)), 1); KmlFolder waypointsFolder = kmlDoc.CreateFolder("Waypoints"); foreach(Waypoint wpt in wpts) { KmlWaypoint kWpt = new KmlWaypoint(waypointsFolder, wpt); } kmlDoc.CreateAbout(); return kmlDoc; }
public static KmlDocument createKmlTracks(ArrayList trks) { KmlDocument kmlDoc = new KmlDocument("Selected Track" + (trks.Count > 1 ? "s" : (": " + ((Track)trks[0]).Name)), 1); KmlFolder waypointsFolder = kmlDoc.CreateFolder("Waypoints"); KmlFolder tracksFolder = kmlDoc.CreateFolder("Tracks"); foreach(Track trk in trks) { KmlTrack kTrack = new KmlTrack(tracksFolder, trk); } kmlDoc.CreateAbout(); return kmlDoc; }
public static KmlDocument createKmlTrack(Track trk) { KmlDocument kmlDoc = new KmlDocument(trk.Name, 1); KmlFolder waypointsFolder = kmlDoc.CreateFolder("Waypoints"); KmlFolder tracksFolder = kmlDoc.CreateFolder("Tracks"); KmlTrack kTrack = new KmlTrack(tracksFolder, trk); kmlDoc.CreateAbout(); return kmlDoc; }
public static KmlDocument createKmlEarthquakes(ArrayList eqs) { KmlDocument kmlDoc = new KmlDocument("Selected Earthquake" + (eqs.Count > 1 ? "s" : (": " + ((Earthquake)eqs[0]).NameDisplayed)), 1); KmlFolder earthquakesFolder = kmlDoc.CreateFolder("Earthquakes"); foreach(Earthquake eq in eqs) { KmlEarthquake kEq = new KmlEarthquake(earthquakesFolder, eq); } kmlDoc.CreateAbout(); return kmlDoc; }