|
@@ -8,6 +8,7 @@ |
8 |
8 |
|
using System.Text.RegularExpressions; |
9 |
9 |
|
using System.Threading; |
10 |
10 |
|
using System.Threading.Tasks; |
|
11 |
+ |
using Windows.ApplicationModel.Resources; |
11 |
12 |
|
using Windows.Devices.Geolocation; |
12 |
13 |
|
using Windows.Foundation; |
13 |
14 |
|
using Windows.Foundation.Collections; |
|
@@ -32,6 +33,7 @@ |
32 |
33 |
|
private DispatcherTimer townTextBoxTimer = new DispatcherTimer(); |
33 |
34 |
|
private DispatcherTimer addressTextBoxTimer = new DispatcherTimer(); |
34 |
35 |
|
public MapLocation siteLocation { get; private set; } |
|
36 |
+ |
private ResourceLoader resourceLoader; |
35 |
37 |
|
public string addressString |
36 |
38 |
|
{ |
37 |
39 |
|
get { return this.AddressTextbox.Text; } |
|
@@ -54,6 +56,7 @@ |
54 |
56 |
|
addressTextBoxTimer.Interval = new TimeSpan(0, 0, 0, 2); |
55 |
57 |
|
this.GridContainer.DataContext = this; |
56 |
58 |
|
this.AddressTextbox.DataContext = this; |
|
59 |
+ |
resourceLoader = ResourceLoader.GetForCurrentView("Resources"); |
57 |
60 |
|
|
58 |
61 |
|
} |
59 |
62 |
|
|
|
@@ -82,15 +85,24 @@ |
82 |
85 |
|
MapLocation mapLocation = ((sender as Control).DataContext as MapLocation); |
83 |
86 |
|
this.siteLocation = mapLocation; |
84 |
87 |
|
|
85 |
|
- |
this.addMapIcon(mapLocation.Point); |
|
88 |
+ |
|
86 |
89 |
|
MapControl.Center = mapLocation.Point; |
87 |
90 |
|
MapControl.ZoomLevel = 15; |
|
91 |
+ |
this.addMapIcon(mapLocation.Point); |
88 |
92 |
|
} |
89 |
93 |
|
|
90 |
94 |
|
private void addMapIcon(Geopoint point){ |
|
95 |
+ |
|
|
96 |
+ |
|
|
97 |
+ |
|
|
98 |
+ |
|
|
99 |
+ |
|
|
100 |
+ |
|
|
101 |
+ |
|
91 |
102 |
|
MapIcon MapIcon1 = new MapIcon(); |
92 |
103 |
|
MapIcon1.Location = point; |
93 |
|
- |
MapIcon1.NormalizedAnchorPoint = new Point(1.0, 0.5); |
|
104 |
+ |
MapIcon1.NormalizedAnchorPoint = new Point(0.5, 1); |
|
105 |
+ |
MapIcon1.Title = resourceLoader.GetString("YourPositionMessage"); |
94 |
106 |
|
MapIcon1.Visible = true; |
95 |
107 |
|
MapIcon1.ZIndex = int.MaxValue; |
96 |
108 |
|
MapIcon1.Image = RandomAccessStreamReference.CreateFromUri(new Uri("ms-appx:///Assets/position.png")); |
|
@@ -211,9 +223,10 @@ |
211 |
223 |
|
this.TownTextBox.Text =ml.Address.Town + ", " + ml.Address.Country; |
212 |
224 |
|
this.AddressTextbox.Text = (string)aTsC.Convert(ml.Address, null, null, null); |
213 |
225 |
|
this.AddressTextbox.IsEnabled = true; |
214 |
|
- |
this.addMapIcon(ml.Point); |
|
226 |
+ |
|
215 |
227 |
|
MapControl.Center = ml.Point; |
216 |
228 |
|
MapControl.ZoomLevel = 15; |
|
229 |
+ |
this.addMapIcon(ml.Point); |
217 |
230 |
|
} |
218 |
231 |
|
} |
219 |
232 |
|
|