コード例 #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;
        }
コード例 #2
0
ファイル: GeolocatorBase.cs プロジェクト: jefft22/get-a-ryder
 public async Task <GeolocatorResponse> GetGeolocationFromAddress(GeolocatorRequest geolocatorRequest)
 => await GetGeolocationFromAddressCore(geolocatorRequest);
コード例 #3
0
ファイル: GeolocatorBase.cs プロジェクト: jefft22/get-a-ryder
 protected abstract Task <GeolocatorResponse> GetGeolocationFromAddressCore(GeolocatorRequest geolocatorRequest);
コード例 #4
0
        protected override async Task <GeolocatorResponse> GetGeolocationFromAddressCore(GeolocatorRequest geolocatorRequest)
        {
            var mapquestUrl      = GetFullMapquestUrl(geolocatorRequest.Address);
            var mapquestResponse = await QueryMapquestForGeolocation(mapquestUrl);

            return(CreateGeolocationResponse(mapquestResponse));
        }