temp
This commit is contained in:
@@ -42,7 +42,7 @@ namespace BeWo.Service.ServiceUtils.DistanceCalculator
|
||||
}
|
||||
|
||||
private string Key { get; set; }
|
||||
private string GeoKey { get; set; }
|
||||
private string GeoUrl { get; set; }
|
||||
private string Url { get; set; }
|
||||
|
||||
private AddressRouteMatrix Matrix { get; set; }
|
||||
@@ -63,11 +63,11 @@ namespace BeWo.Service.ServiceUtils.DistanceCalculator
|
||||
Key = MergedConfig.GetSecretSetting("OpenrouteServiceApiKey");
|
||||
if (string.IsNullOrEmpty(Key))
|
||||
{
|
||||
throw new Exception("OpenrouteServiceApiKey is not set in AppSettings.");
|
||||
throw new Exception("OpenrouteServiceApiKey is not set.");
|
||||
}
|
||||
|
||||
GeoKey = appSettings["OpenrouteServiceApiUrlGeocode"];
|
||||
if (string.IsNullOrEmpty(GeoKey))
|
||||
GeoUrl = appSettings["OpenrouteServiceApiUrlGeocode"];
|
||||
if (string.IsNullOrEmpty(GeoUrl))
|
||||
{
|
||||
throw new Exception("OpenrouteServiceApiUrlGeocode is not set in AppSettings.");
|
||||
}
|
||||
@@ -208,7 +208,7 @@ namespace BeWo.Service.ServiceUtils.DistanceCalculator
|
||||
private string GetGeocodeUrl(Address address)
|
||||
{
|
||||
var html = HttpUtility.UrlEncode(AddressRouteManager.AddressToString(address));
|
||||
return $"{GeoKey}?api_key={Key}&text={html}&sources=openstreetmap&size=1";
|
||||
return $"{GeoUrl}?api_key={Key}&text={html}&sources=openstreetmap&size=1";
|
||||
}
|
||||
|
||||
private string GetMatrixBodyContentString()
|
||||
|
||||
@@ -9,7 +9,6 @@ using System.ServiceModel.Channels;
|
||||
using System.ServiceModel.Dispatcher;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using BeWo.Service.ServiceContracts;
|
||||
using BS.Shared.Attributes;
|
||||
using BS.Shared.Extensions;
|
||||
using NHibernate.Hql.Ast.ANTLR.Tree;
|
||||
|
||||
Reference in New Issue
Block a user