/// <summary> /// /// </summary> /// <param name="config"></param> public GeocodeGeoService(IOptions <GeoConfig> config) { _config = config.Value; this._apiKey = _config.APIKey; this._geocodeClient = new RestClient(GEOCODER_API_URL); }
/// <summary> /// /// </summary> /// <param name="config"></param> public GoogleGeoService(IOptions <GeoConfig> config, IMemoryCache memoryCache) { _config = config.Value; this._geocoder = new GoogleGeocoder() { ApiKey = _config.APIKey }; this._googleApiClient = new RestClient(GOOGLE_API_URL); this._cache = memoryCache; }
// private static readonly string MAPBOX_MODE_DRIVING = "driving"; // private static readonly string GOOGLE_MODE_WALKING = "walking"; // private static readonly string GOOGLE_MODE_BICYCLING = "ciclying"; /// <summary> /// /// </summary> /// <param name="config"></param> public MapboxGeoService(IOptions <GeoConfig> config) { _config = config.Value; this._mapboxApiClient = new RestClient(MAPBOX_DISTANCE_MATRIX_API); }