Get 2 letter country / region code from Bing Maps RRS feed

  • Question

  • Hi,

    is there a way to get the 2 letter iso country code from bing maps when geocoding? I want to check addresses and get their geo coordinates and additionally i would like to get the country code. The geocoderesult contains a field that delivers the country/region but it's dependent on the culture specified for the request. I could map the country/region field to the country code but that seems to be a not maintainable solution.

    Any ideas? Thanks for replies in advance!


    • Moved by Ricky_Brundritt Friday, March 9, 2012 6:24 PM (From:Bing Maps: Map Control and Web services Development)
    Saturday, June 25, 2011 2:57 PM


  • You can not get this from Bing Maps all the time as the data comes from multiple sources and can potentially change in format. Some locations may return the 2 letter country code while other return the full name. To do what you want you can get the boundaries of all the countries/regions, store in a spatial database (i.e. SQL 2008) and then perform a spatial search on them to figure out which boundary your point falls in. Then return the appropriate information.
    Windows Live Developer MVP - |
    Friday, July 1, 2011 4:06 PM