public Favorite(GpsData data) { Name = data.Metadata["name"]; Description = data.Metadata["desc"]; Symbol = data.Metadata["symbol"]; Timestamp = DateTime.Parse(data.Metadata["time"]); Location = new Geopoint(new BasicGeoposition() { Latitude = data.Waypoints[0].Coordinate.Latitude, Longitude = data.Waypoints[0].Coordinate.Longitude }); }
public GpsData ToGpsData() { GpsData data = new GpsData(); data.Metadata.Add("name", Name); data.Metadata.Add("desc", Description); data.Metadata.Add("time", Timestamp.ToString()); data.Metadata.Add("symbol", Symbol); data.Metadata.Add("author", "Cyke Maps"); Geo.Geometries.Point point = new Geo.Geometries.Point(Location.Position.Latitude, Location.Position.Longitude, Location.Position.Altitude); data.Waypoints.Add(point); return data; }