public GeoResultDTO GetLocation(GeoDTO geoDTO) { string errorString; var result = this.GeoModel.GetLocation(geoDTO, out errorString); if (result != null) { return(result); } if (!string.IsNullOrWhiteSpace(geoDTO.country)) { result = this.GeoModel.GetLocation(new GeoDTO { country = geoDTO.country }, out errorString); } if (result == null) { var error = new Error(Errors.CODE_ERRORTYPE_GENERIC_ERROR, "Location Server Error", errorString); this.LogError("Lookup.GetLocation", error); throw new FaultException <Error>(error, error.errorMessage); } return(result); }
/// <summary> /// The get nominatim result. /// </summary> /// <param name="geoDTO"> /// The geo dto. /// </param> /// <param name="error"> /// The error. /// </param> /// <returns> /// The <see cref="GeoResultDTO"/>. /// </returns> public GeoResultDTO GetLocation(GeoDTO geoDTO, out string error) { GeoResultDTO result = null; error = null; NameValueCollection geoNameValue = geoDTO.GetNameValueCollection(); if (geoNameValue != null) { result = this.ParseNominatimResult(geoNameValue, out error); } return(result); }