Ejemplo n.º 1
0
        private async Task NativeSaveMapPoint()
        {
            if (_changedNetworkAccess == false)
            {
                _alertService.ShowAlert(_networkAccessAlert);
                return;
            }
            if (LalitudeMarker == 0 & LongitudeMarker == 0)
            {
                _alertService.ShowAlert(_putMarkerGoogleMapAlert);
                return;
            }
            if (LalitudeMarker != 0 & LongitudeMarker != 0)
            {
                await _navigationService.Navigate <TaskViewModel>();

                var message = new MapMessenger(this,
                                               _idTask,
                                               LalitudeMarker,
                                               LongitudeMarker,
                                               _nameTaskBackResult,
                                               _descriptionTaskBackResult,
                                               _statusTaskBackResult
                                               );
                _messenger.Publish(message);
                _messenger.Unsubscribe <MapMessenger>(_token);
            }
        }
Ejemplo n.º 2
0
        private async Task BackMap()
        {
            await _navigationService.Navigate <TaskViewModel>();

            LalitudeMarker  = _lalitudeMarkerBack;
            LongitudeMarker = _longlitudeMarkerBack;
            var message = new MapMessenger(this,
                                           _idTask,
                                           LalitudeMarker,
                                           LongitudeMarker,
                                           _nameTaskBackResult,
                                           _descriptionTaskBackResult,
                                           _statusTaskBackResult
                                           );

            _messenger.Publish(message);
            _messenger.Unsubscribe <MapMessenger>(_token);
        }
Ejemplo n.º 3
0
        private void OnLocationMessage(MapMessenger mapMesseger)
        {
            _idTask                    = mapMesseger.IdTask;
            LalitudeMarker             = mapMesseger.LalitudeMarkerResult;
            LongitudeMarker            = mapMesseger.LongitudeMarkerResult;
            _nameTaskBackResult        = mapMesseger.NameTaskResult;
            _descriptionTaskBackResult = mapMesseger.DescriptionTaskResult;
            _statusTaskBackResult      = mapMesseger.StatusTaskResult;
            _lalitudeMarkerBack        = mapMesseger.LalitudeMarkerResult;
            _longlitudeMarkerBack      = mapMesseger.LongitudeMarkerResult;

            var request = new CoordinateAction
            {
                LalitudePin  = LalitudeMarker,
                LongitudePin = LongitudeMarker
            };

            Interaction.Raise(request);
        }