diff --git a/NavCityBreda/Model/Landmark.cs b/NavCityBreda/Model/Landmark.cs index 5a2ab95..9e11a14 100644 --- a/NavCityBreda/Model/Landmark.cs +++ b/NavCityBreda/Model/Landmark.cs @@ -1,5 +1,7 @@ -using System; +using NavCityBreda.Helpers; +using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -7,11 +9,29 @@ using Windows.Devices.Geolocation; namespace NavCityBreda.Model { - class Landmark : Waypoint + public class Landmark : Waypoint { - public Landmark(Geopoint p) : base (p) - { + public string Description { get; private set; } + public string Image { get; private set; } + public bool Visited { get; set; } + + public Landmark(Geopoint p, string name, string desc, string image_loc = "default.jpg") : base (p, name) + { + Visited = false; + Description = desc; + if (image_loc == "" || !File.Exists(Util.RouteImagesFolder + image_loc)) + image_loc = "default.jpg"; + Image = Util.RouteImagesFolder + image_loc; + } + + public Landmark(double la, double lo, string name, string desc, string image_loc = "default.jpg") : base(la, lo, name) + { + Visited = false; + Description = desc; + if (image_loc == "" || !File.Exists(Util.RouteImagesFolder + image_loc)) + image_loc = "default.jpg"; + Image = Util.RouteImagesFolder + image_loc; } } } diff --git a/NavCityBreda/Views/MapView.xaml b/NavCityBreda/Views/MapView.xaml index 9138097..ad4e676 100644 --- a/NavCityBreda/Views/MapView.xaml +++ b/NavCityBreda/Views/MapView.xaml @@ -13,6 +13,6 @@ - +