|
@@ -1,5 +1,6 @@
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
+using System.Collections.ObjectModel;
|
|
|
using System.Globalization;
|
|
|
using System.Linq;
|
|
|
using System.Text;
|
|
@@ -18,8 +19,11 @@ namespace PRS.Mobile
|
|
|
InitializeComponent();
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
public override void Refresh()
|
|
|
{
|
|
|
+
|
|
|
if (ViewModel.Coordinates.Equals(Point.Zero))
|
|
|
{
|
|
|
NoMap.IsVisible = true;
|
|
@@ -29,32 +33,17 @@ namespace PRS.Mobile
|
|
|
|
|
|
NoMap.IsVisible = false;
|
|
|
Map.IsVisible = true;
|
|
|
-
|
|
|
|
|
|
-
|
|
|
- if (Device.RuntimePlatform.Equals(Device.iOS))
|
|
|
- {
|
|
|
- Layer.MarkerSettings.MarkerIcon = MapMarkerIcon.Circle;
|
|
|
- Layer.MarkerSettings.IconColor = Color.DarkBlue;
|
|
|
- Layer.MarkerSettings.IconSize = 15;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- Layer.MarkerSettings.MarkerIcon = MapMarkerIcon.Image;
|
|
|
- Layer.MarkerSettings.ImageSource = "mapmarker";
|
|
|
- Layer.MarkerSettings.IconSize = 35;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- Layer.MarkerSettings.FontAttributes = FontAttributes.Bold;
|
|
|
- Layer.MarkerSettings.LabelSize = 20;
|
|
|
- Layer.MarkerSettings.LabelColor = Color.DarkBlue;
|
|
|
+ Layer.Markers = new ObservableCollection<MapMarker>()
|
|
|
+ {
|
|
|
+ new MapMarker()
|
|
|
+ {
|
|
|
+ Label = ViewModel.Item.Code,
|
|
|
+ Latitude = ViewModel.Coordinates.X.ToString(CultureInfo.CurrentCulture),
|
|
|
+ Longitude = ViewModel.Coordinates.Y.ToString(CultureInfo.CurrentCulture)
|
|
|
+ }
|
|
|
+ };
|
|
|
|
|
|
- MapMarker marker = new MapMarker();
|
|
|
- marker.Label = "";
|
|
|
- marker.Latitude = ViewModel.Coordinates.X.ToString(CultureInfo.InvariantCulture);
|
|
|
- marker.Longitude = ViewModel.Coordinates.Y.ToString(CultureInfo.InvariantCulture);
|
|
|
- Layer.Markers.Add(marker);
|
|
|
Layer.GeoCoordinates = ViewModel.Coordinates;
|
|
|
Map.ZoomLevel = 14;
|
|
|
}
|