internal GeocodeRequest(MapService service, PlaceAddress address) : this(service, ServiceRequestType.GeocodeByStructuredAddress) { startExecutionAction = new Action(() => { int requestID; errMessage = $"Failed to get coordinates for given address {address}"; errorCode = _service.handle.GeocodeByStructuredAddress(address.handle, _service.Preferences.handle, _geocodeCallback, IntPtr.Zero, out requestID); if (errorCode.IsFailed() && errorCode != Interop.ErrorCode.Canceled) { _requestTask?.TrySetException(errorCode.GetException(errMessage)); } _requestID = requestID; }); }
/// <summary> /// Creates a geocode search request for the given structured address. /// </summary> /// <since_tizen> 3 </since_tizen> /// <param name="address">A string representing the address of interest.</param> /// <returns>Returns a GeocodeRequest object created with a structured address.</returns> public GeocodeRequest CreateGeocodeRequest(PlaceAddress address) { return(new GeocodeRequest(this, address)); }