-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMapControl.xaml.cs
More file actions
31 lines (24 loc) · 748 Bytes
/
Copy pathMapControl.xaml.cs
File metadata and controls
31 lines (24 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System;
using Tracked.Screens;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace Tracked.Controls {
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class MapControl : ContentView {
private bool isInitialized;
public MapControl() {
InitializeComponent();
}
public MapViewModelBase ViewModel => BindingContext as MapViewModelBase;
public void CreateMap() {
if (isInitialized) {
return;
}
mapContainer.Children.Add(ViewModel.CreateMap());
isInitialized = true;
}
private void ChangeLayer_Pressed(object sender, EventArgs e) {
picker.Focus();
}
}
}