public ShiftPointMapView() { InitializeComponent(); _tool = ((App)Application.Current).GeoLayoutBuildingService.ShiftModifier; _model = (GeoLocationViewModel)CoordinatesView.DataContext; _tool.PropertyChanged += _tool_PropertyChanged; }
public AddPointMapView() { InitializeComponent(); _tool = ((App)Application.Current).GeoLayoutBuildingService.WaypointBuilder; DataContext = _tool; _locationModel = (GeoLocationViewModel)CoordinatesView.DataContext; _tool.PropertyChanged += _tool_PropertyChanged; _locationModel.PropertyChanged += _locationModel_PropertyChanged; }
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)); }
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); }
public CoordinatesReadOnlyView() { InitializeComponent(); DataContext = new GeoLocationViewModel(); }