private void PinDragEnd(PinDragEventArgs args) { SelectedPinNewLoc = args.Pin; PinNewLocation = new Location() { Latitude = args.Pin.Position.Latitude, Longitude = args.Pin.Position.Longitude }; var movedHive = new Hive() { HiveName = SelectedPinNewLoc.Label, HiveLocation = new Location() { Latitude = SelectedPinNewLoc.Position.Latitude, Longitude = SelectedPinNewLoc.Position.Longitude } }; if (PinDragged) { _dialogService.ShowDialog("MoveHivePage", new DialogParameters() { { "movedHive", movedHive } }, OnMoveDialogClosed); PinDragged = false; IsMapTapEnabled = true; } }
private void PinDragStart(PinDragEventArgs args) { IsMapTapEnabled = false; // SelectedPinOrigLoc = args.Pin; OriginalPinLocation = new Location() { Latitude = args.Pin.Position.Latitude, Longitude = args.Pin.Position.Longitude, }; }
public async Task MapTappedToCreatePin(MapClickedEventArgs args) { if (IsMapTapEnabled) { var newHiveLocation = new Location() { Latitude = args.Point.Latitude, Longitude = args.Point.Longitude }; _dialogService.ShowDialog("CreateNewHivePage", new DialogParameters() { { "map_clicked", newHiveLocation } }, OnDialogClosed); } else { } }
public void OnDialogOpened(IDialogParameters parameters) { NewHiveLocation = parameters.GetValue <Location>("map_clicked"); }