| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- using System;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.Globalization;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Syncfusion.SfMaps.XForms;
- using Xamarin.Forms;
- using Xamarin.Forms.Xaml;
- namespace PRS.Mobile
- {
- [XamlCompilation(XamlCompilationOptions.Compile)]
- public partial class EquipmentEditMapView
- {
- public EquipmentEditMapView()
- {
- InitializeComponent();
- }
-
-
- public override void Refresh()
- {
-
- if (ViewModel.Coordinates.Equals(Point.Zero))
- {
- NoMap.IsVisible = true;
- Map.IsVisible = false;
- return;
- }
-
- NoMap.IsVisible = false;
- Map.IsVisible = true;
-
- 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)
- }
- };
-
- Layer.GeoCoordinates = ViewModel.Coordinates;
- Map.ZoomLevel = 14;
- }
- }
- }
|