public ShiftPointMapView()
        {
            InitializeComponent();

            _tool  = ((App)Application.Current).GeoLayoutBuildingService.ShiftModifier;
            _model = (GeoLocationViewModel)CoordinatesView.DataContext;

            _tool.PropertyChanged += _tool_PropertyChanged;
        }
Пример #2
0
        public AddPointMapView()
        {
            InitializeComponent();

            _tool       = ((App)Application.Current).GeoLayoutBuildingService.WaypointBuilder;
            DataContext = _tool;

            _locationModel = (GeoLocationViewModel)CoordinatesView.DataContext;

            _tool.PropertyChanged          += _tool_PropertyChanged;
            _locationModel.PropertyChanged += _locationModel_PropertyChanged;
        }
Пример #3
0
        public async Task <JsonResult> SetLocation(GeoLocationViewModel geoLocation)
        {
            bool result = false;

            if (User.Identity.IsAuthenticated)
            {
                var UserName = User.Identity.Name;
                result = await userManager.SetCurrentUserLocation(UserName, geoLocation.latitude, geoLocation.longitude);
            }


            return(Json(geoLocation));
        }
Пример #4
0
        public static GeoLocation getGeoLocationModelFromViewModel(GeoLocationViewModel geoView)
        {
            GeoLocation geoModel = null;

            if (geoView != null && !geoView.isEmpty())
            {
                geoModel = new GeoLocation()
                {
                    CAP      = geoView.CAP,
                    City     = geoView.City,
                    Lat      = geoView.Lat,
                    Lng      = geoView.Lng,
                    Nation   = geoView.Nation,
                    Number   = geoView.Number,
                    Province = geoView.Province,
                    Region   = geoView.Region,
                    Street   = geoView.Street
                };
            }

            return(geoModel);
        }
Пример #5
0
        public CoordinatesReadOnlyView()
        {
            InitializeComponent();

            DataContext = new GeoLocationViewModel();
        }