예제 #1
0
        private List <GeocodeResult> BingGeocodeCountryRegionQuery(Country country, string locality)
        {
            string countryRegionISO2 = AppLookups.CountryIso2(country.ID).ToUpper();
            string url = string.Format("http://dev.virtualearth.net/REST/v1/Locations?CountryRegion={0}&locality={1}&key={2}&output=xml",
                                       countryRegionISO2, locality, BingMapsApiKey);
            string xml = new Uri(url).ExecuteRestCall();

            return(ParseBingXmlResponse(xml));
        }