예제 #1
0
        public void GeocodingQueryTest()
        {
            var geocodingService = new STFGeocodingService();

            var queryDictionary = new Dictionary <string, string>();

            queryDictionary.Add(STFConstants.KAddressKeyString, "83 Jessore Road, Srijan Midlands, Kolkata-700132");
            queryDictionary.Add(STFConstants.KApiKeyString, STFConstants.KApiValueString);

            geocodingService = geocodingService.Query(queryDictionary) as STFGeocodingService;
            geocodingService = geocodingService.Build() as STFGeocodingService;
            Assert.That(queryDictionary.Count > 0);
        }
        private async Task <STFLocationModel> GetGeocodingAsync(string storeAddressString)
        {
            var geocodingService = new STFGeocodingService();

            var queryDictionary = new Dictionary <string, string>();

            queryDictionary.Add(STFConstants.KAddressKeyString, storeAddressString);
            queryDictionary.Add(STFConstants.KApiKeyString, STFConstants.KApiValueString);

            geocodingService = geocodingService.Query(queryDictionary).Build() as STFGeocodingService;

            var   geocodingAdapter = new STFGeocodingAdapter(geocodingService);
            var   geocodingTask    = geocodingAdapter.GetStoreGeocodingAsync();
            await geocodingTask;

            return(geocodingTask.Result);
        }
예제 #3
0
 public STFGeocodingAdapter(STFGeocodingService geocodingService)
 {
     _storeDataService = geocodingService;
 }