none
UserRegion parameter - static imagery RRS feed

  • Question

  • Hi,

    I'm updating some code using queries of the form http://dev.virtualearth.net/REST/v1/Imagery... to retrieve static overhead images (AerialWithLabels). The 2016 version of our Bing Maps license agreement requires that we set the userRegion (ur) data correctly based on the client location. I'm testing that, but am expecting different results for certain regions. For example, I'm expecting the same behavior found in Windows Store applications as noted here:

    https://msdn.microsoft.com/en-us/library/jj670541.aspx

    Setting the user region in my query, however, does not return this image from Bing for the listed countries. It seems to work, giving the same result as "ur=US".

    Can anyone advise whether this is expected or if I'm doing something wrong?

    Thanks,

    Paul T.

    Wednesday, June 22, 2016 9:21 PM

Answers

  • You are not required to do anything with user region, but Bing Maps doesn't take responsibility if you display a map incorrectly in a disputed area. So this is guidance in the Bing Maps license agreement is more of a strong recommendation. 

    The user region primarily changes two things, disputed borders and place names. A good example is the northern borders of India which are heavily disputed (details). With the REST services lets look at a couple of examples:

    A URL with no user region will default to US settings which generally follows the views of the UN. For many disputed borders, they will appear as dashed lines. For example, look how the northern borders of India change witht he following queries:

    US view (default):

    http://dev.virtualearth.net/REST/v1/Imagery/Map/AerialWithLabels/India?&key=Your_BING_MAPS_Key

    Now setting the user region to IN for India.

    http://dev.virtualearth.net/REST/v1/Imagery/Map/AerialWithLabels/India?&key=Your _BING_MAPS_Key&ur=IN

    Now setting the user region to PKfor Pakistan.

    http://dev.virtualearth.net/REST/v1/Imagery/Map/AerialWithLabels/India?&key=Your _BING_MAPS_Key&ur=PK

    It's also worth mentioning that the new Bing Maps V8 web control (JavaScript API, not a REST service), it automatically detects user region and culture/language settings.


    [Blog] [twitter] [LinkedIn]

    Wednesday, June 22, 2016 10:43 PM

All replies

  • You are not required to do anything with user region, but Bing Maps doesn't take responsibility if you display a map incorrectly in a disputed area. So this is guidance in the Bing Maps license agreement is more of a strong recommendation. 

    The user region primarily changes two things, disputed borders and place names. A good example is the northern borders of India which are heavily disputed (details). With the REST services lets look at a couple of examples:

    A URL with no user region will default to US settings which generally follows the views of the UN. For many disputed borders, they will appear as dashed lines. For example, look how the northern borders of India change witht he following queries:

    US view (default):

    http://dev.virtualearth.net/REST/v1/Imagery/Map/AerialWithLabels/India?&key=Your_BING_MAPS_Key

    Now setting the user region to IN for India.

    http://dev.virtualearth.net/REST/v1/Imagery/Map/AerialWithLabels/India?&key=Your _BING_MAPS_Key&ur=IN

    Now setting the user region to PKfor Pakistan.

    http://dev.virtualearth.net/REST/v1/Imagery/Map/AerialWithLabels/India?&key=Your _BING_MAPS_Key&ur=PK

    It's also worth mentioning that the new Bing Maps V8 web control (JavaScript API, not a REST service), it automatically detects user region and culture/language settings.


    [Blog] [twitter] [LinkedIn]

    Wednesday, June 22, 2016 10:43 PM
  • The license/contract DOES require me to do the right thing with the region. Maybe most users don't read the legal the same way...

    Thanks for the help. I've verified that I'm setting the region correctly and that it works as expected according to your notes.

    Paul T.

    Thursday, July 7, 2016 6:36 PM