waypoint.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. using System;
  2. using System.Collections.Generic;
  3. using Windows.Devices.Geolocation;
  4. namespace Breda_Tour.Data
  5. {
  6. public class Waypoint
  7. {
  8. private Geopoint _position;
  9. public Geopoint Position
  10. {
  11. get { return _position; }
  12. }
  13. public String Title { get; private set; }
  14. public String Description { get; private set; }
  15. public List<Picture> Pictures { get; private set; }
  16. public bool FromPreview { get; set; }
  17. public Waypoint(double Lat, double Long, String Title, String Description, List<string> pictures)
  18. {
  19. this._position = new Geopoint(new BasicGeoposition() { Altitude = 0, Latitude = Lat, Longitude = Long });
  20. this.Title = Title;
  21. this.Description = Description;
  22. this.Pictures = new List<Picture>();
  23. if (pictures != null)
  24. {
  25. foreach (var imageSource in pictures)
  26. {
  27. string newSource = "ms-appx:///Storage/Images/" + imageSource;
  28. Pictures.Add(new Picture(newSource));
  29. }
  30. }
  31. }
  32. }
  33. }