Example #1
0
        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;
            }
        }
Example #2
0
        private void PinDragStart(PinDragEventArgs args)
        {
            IsMapTapEnabled = false;

            // SelectedPinOrigLoc = args.Pin;

            OriginalPinLocation = new Location()
            {
                Latitude  = args.Pin.Position.Latitude,
                Longitude = args.Pin.Position.Longitude,
            };
        }
Example #3
0
        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
            {
            }
        }
Example #4
0
 public void OnDialogOpened(IDialogParameters parameters)
 {
     NewHiveLocation = parameters.GetValue <Location>("map_clicked");
 }