private void Map_PinDragEnd(object sender, PinDragEventArgs e)
 {
     if (e.Pin.Tag.ToString() == MapTags.CurrentLocation)
     {
         _eventAggregator.GetEvent <MapDragPinNewLocationEvent>().Publish(new MapPositionModel(e.Pin.Position.Latitude, e.Pin.Position.Longitude));
     }
 }
Esempio n. 2
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;
            }
        }
Esempio n. 3
0
        private void map_PinDragEnd(object sender, PinDragEventArgs e)
        {
            var positions = new Position(e.Pin.Position.Latitude, e.Pin.Position.Longitude);

            map.MoveToRegion(MapSpan.FromCenterAndRadius(positions, Distance.FromMeters(500)));
            GenerateCircle(positions, 100);
        }
Esempio n. 4
0
        private void PinDragStart(PinDragEventArgs args)
        {
            IsMapTapEnabled = false;

            // SelectedPinOrigLoc = args.Pin;

            OriginalPinLocation = new Location()
            {
                Latitude  = args.Pin.Position.Latitude,
                Longitude = args.Pin.Position.Longitude,
            };
        }
Esempio n. 5
0
        private async void Map_PinDragEnd(object sender, PinDragEventArgs e)
        {
            if (e.Pin.Label == Constants.ORIGEN_LABEL)
            {
                Start  = new Geocode(e.Pin.Position.Latitude, e.Pin.Position.Longitude);
                Origin = await googleMapsApi.GetAddress(Start.StringLat(), Start.StringLng());

                SetOneDirection();
            }
            else
            {
                End         = new Geocode(e.Pin.Position.Latitude, e.Pin.Position.Longitude);
                Destination = await googleMapsApi.GetAddress(End.StringLat(), End.StringLng());
            }
            DrawRoute();
        }
Esempio n. 6
0
        async private void map_PinDragEnd(Object sender, PinDragEventArgs e)
        {
            if (await DisplayAlert(e.Pin.Label, "Confirma Alteração na Posição do(a) " + e.Pin.Label, "Sim", "Não"))
            {
                switch (e.Pin.Tag)
                {
                case "DESTINO":
                    destino = e.Pin;
                    break;
                }
            }
            else
            {
                switch (e.Pin.Tag)
                {
                case "DESTINO":
                    destino = generate_pin(-25.4360807, -49.2743035, "DESTINO", "Praça Rui Barbosa", Color.Red);
                    break;
                }
            }

            updateRoute();
        }
Esempio n. 7
0
 private void OnPinDragging(object sender, PinDragEventArgs args)
 {
     Command?.Execute(args);
 }
Esempio n. 8
0
 private void PinDragging(PinDragEventArgs args)
 {
     PinDragged = true;
 }
 void Map_PinDragEnd(object sender, PinDragEventArgs e)
 {
 }
 void Map_PinDragStart(object sender, PinDragEventArgs e)
 {
 }
Esempio n. 11
0
 private void map_PinDragStart(object sender, PinDragEventArgs e)
 {
 }