Implemented landmark
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
using System;
|
using NavCityBreda.Helpers;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -7,11 +9,29 @@ using Windows.Devices.Geolocation;
|
|||||||
|
|
||||||
namespace NavCityBreda.Model
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,6 @@
|
|||||||
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<map:MapControl Grid.Row="0" Name="Map" ZoomInteractionMode="GestureAndControl" PanInteractionMode="Auto" TiltInteractionMode="ControlOnly" RotateInteractionMode="GestureAndControl" MapServiceToken="74Y70e71HVjjN7lnx4Eh~3wugTlBDe2DbPGuR_AM2aA~AjMbg-pU2qn4gYf97oH0GZI1oY9Jc4vH-4WyIRyoYQM0Q71CnfbWalEN37bdSgms" />
|
<map:MapControl Grid.Row="0" Name="Map" MapElementClick="Map_MapElementClick" ZoomInteractionMode="GestureAndControl" PanInteractionMode="Auto" TiltInteractionMode="ControlOnly" RotateInteractionMode="GestureAndControl" MapServiceToken="74Y70e71HVjjN7lnx4Eh~3wugTlBDe2DbPGuR_AM2aA~AjMbg-pU2qn4gYf97oH0GZI1oY9Jc4vH-4WyIRyoYQM0Q71CnfbWalEN37bdSgms" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Page>
|
</Page>
|
||||||
|
|||||||
Reference in New Issue
Block a user