public MainMapPage() { InitializeComponent(); ViewModel = new MapPageVM(); BindingContext = ViewModel; GetUserLocation(); // hide nav-bar // NavigationPage.SetHasNavigationBar(this, false); MainMap.Tap += MainMap_LongTouch; MainMap.PinTap += MainMap_PinTap; }
/// <summary> /// Initialise the map and listen for geometry selection /// </summary> public MapPage() { InitializeComponent(); ViewModel = new MapPageVM(MapsuiMapView, GPSButton, AddMapGeometryButton, Navigation); BindingContext = ViewModel; MessagingCenter.Subscribe <MapPageVM>(this, "SelectGeometryType", (sender) => { Device.BeginInvokeOnMainThread(() => { ShowGeometryChoice(); }); }); MessagingCenter.Subscribe <MapPageVM, string>(this, "RequestGeometryName", (sender, arg) => { Device.BeginInvokeOnMainThread(() => { RequestGeometryName(arg); }); }); }