Example #1
0
        private async Task PopulateGeolocation(GetARyderAddress address, GetARyderLatitudeLongitude geolocation)
        {
            var geoRequest = new GeolocatorRequest {
                Address = address
            };
            var geoResponse = await GeolocatorGateway.GetGeolocationFromAddress(geoRequest);

            geolocation.Latitude  = geoResponse.LatitudeLongitude.Latitude;
            geolocation.Longitude = geoResponse.LatitudeLongitude.Longitude;
        }
Example #2
0
 public async Task <GeolocatorResponse> GetGeolocationFromAddress(GeolocatorRequest geolocatorRequest)
 => await GetGeolocationFromAddressCore(geolocatorRequest);
Example #3
0
 protected abstract Task <GeolocatorResponse> GetGeolocationFromAddressCore(GeolocatorRequest geolocatorRequest);
        protected override async Task <GeolocatorResponse> GetGeolocationFromAddressCore(GeolocatorRequest geolocatorRequest)
        {
            var mapquestUrl      = GetFullMapquestUrl(geolocatorRequest.Address);
            var mapquestResponse = await QueryMapquestForGeolocation(mapquestUrl);

            return(CreateGeolocationResponse(mapquestResponse));
        }