public Coffee(int id, string name, string place, PlaceLocation location) { Id = id; Name = name; Place = place; Location = location; }
/// <summary> /// Reverse geocoding is the process of converting geographic coordinates into a /// human-readable address. /// </summary> /// <param name="location">The place for which you wish to obtain the closest, human-readable address.</param> /// <param name="language">The language in which to return results.</param> /// <param name="addressType">One or more address types to restrict results to.</param> /// <param name="locationType">One or more location types to restrict results to.</param> /// <returns>Reverse geocoding results</returns> public ReverseGeocodeResultResponse ReverseGeocode(PlaceLocation location, string language = null, AddressTypeEnum?addressType = null, GeometryLocationType?locationType = null) { // Assign query params var queryParams = new QueryParams() { ["latlng"] = Converter.Location(location) }; if (language != null) { queryParams["language"] = language; } if (addressType != null) { queryParams["result_type"] = Converter.EnumFlagsList(addressType.Value); } if (locationType != null) { queryParams["location_type"] = Converter.EnumFlagsList(locationType.Value); } // Get API response result var response = Client.APIGet <ReverseGeocodeResultResponse>("/maps/api/geocode/json", queryParams); // Return it return(response); }
public async override void Init(object initData) { base.Init(initData); if (initData != null) { ContactId = (string)initData; Contact = await StoreManager.ContactStore.GetItemAsync(ContactId); if (!String.IsNullOrEmpty(Contact.PlaceId) && !String.IsNullOrEmpty(Contact.PlaceLocation)) { //affichage adresse (si adresse saisie) var itemPl = new PlaceLocation { Id = Contact.PlaceId, Location = Contact.PlaceLocation }; await ExecutePickPlaceCommandAsync(itemPl); } } if (initData != null) { Title = "Modification Client"; } else { Title = "Nouveau Client"; } IsVisibleListView = false; await FetchCollectSources(); await FetchType(); }
public void NewLocation([FromBody] PlaceLocation newLocation) { newLocation.Id = Guid.NewGuid(); _context.Add(newLocation); _context.SaveChanges(); }
public void WeatherForecasts() { var courseInfo = new PlaceLocation() { Id = Guid.NewGuid(), Name = "Trent Lock", Address1 = "Lock Lane", PostCode = "NG10 3QB" }; _context.PlaceLocation.Add(courseInfo); _context.SaveChanges(); }
public void SpawnForegroundLayer(PlaceLocation location) { int n = Random.Range(0, foregroundLayer.Count); GameObject randomObject = foregroundLayer[n]; foregroundLayer.Remove(randomObject); activeElements.Add(randomObject); if (location == PlaceLocation.Middle) { Vector3 newPos = randomObject.transform.localPosition; newPos.x = 0; randomObject.transform.localPosition = newPos; } randomObject.SetActive(true); }
private async Task ExecutePickPlaceCommandAsync(PlaceLocation place) { SearchText = place.Location; var position = await _placeService.GetResultDetail(place.Id); _latitude = position.Result.Geometry.Location.Lat; _longitude = position.Result.Geometry.Location.Lng; _placeId = place.Id; _placeLocation = place.Location; var _addressComponents = position.Result.AddressComponents; IsVisibleListView = false; for (var i = 0; i < _addressComponents.Count; i++) { for (var j = 0; j < _addressComponents[i].Types.Count; j++) { if (_addressComponents[i].Types[j] == "street_number") { _streetNumber = _addressComponents[i].LongName; } if (_addressComponents[i].Types[j] == "route") { _street = _addressComponents[i].LongName; } if (_addressComponents[i].Types[j] == "locality") { _locality = _addressComponents[i].LongName; } if (_addressComponents[i].Types[j] == "country") { _country = _addressComponents[i].LongName; } if (_addressComponents[i].Types[j] == "postal_code") { _postalCode = _addressComponents[i].LongName; } } } }
public PlaceResult(MoveItErrorCodes error_code, RobotState trajectory_start, RobotTrajectory[] trajectory_stages, string[] trajectory_descriptions, PlaceLocation place_location, double planning_time) { this.error_code = error_code; this.trajectory_start = trajectory_start; this.trajectory_stages = trajectory_stages; this.trajectory_descriptions = trajectory_descriptions; this.place_location = place_location; this.planning_time = planning_time; }