Bing Bird's eye view gives me error 400 for some directions while it works with the manual method

46179853 21 Reputation points
2022-02-04T01:06:16.547+00:00

Hello,

I'm trying to create a code to automatically capture images related to some "Bing Bird View". Although I was able to do this correctly, for some unknown reason images related to certain directions are NOT available ONLY if I'm through the API (not if I'm doing it manually).

For example, for the coordinate: (30.217493227048266,-97.77467547106379)

Only the direction (0, 180) degrees works on the API, but I get them all if I do it manually.

API (simple code made in Python that simply save the image at a specific URL OR just enter this URL manually), got error 400 "Bad Request":
https://dev.virtualearth.net/REST/V1/Imagery/Map/Birdseye/30.217493227048266,-97.77467547106379/21?dir=90&ms=1920,1080&key=Bing_key"

Manually, work perfectly fine:
https://www.bing.com/maps?cp=30.21740578475406~-97.77651467398526&lvl=21&dir=90&style=g&v=2&sV=2&form=S00027

I have also tried using other close angles like [89, 269] degrees instead of [90, 270] degrees but it only gives me [0, 180] degrees which are the only ones that work and I don't don't understand why.

Strangely, I don't have any trouble with some other coordinate like: 51.52729557,-0.1004498
But all others coordinates in the same city as the previous one have the same trouble of missing orientation while it's work perfectly well when use the manual method.

Alternatively, I could just make my code only use the "manual URL" instead of the one with the Bing_key, but I'll probably have problems later with too many requests to Bing with an automatic script

Does anyone know a solution to this problem ?


Edit: I just found that actually the reason seems that when I enter it manually, Bing will automatically change the exact numbers of the coordinates used while it won't with the API, and so it doesn't work only for him. However, I don't know how I can make this correction automatically (is it for example related to roads?)

The only solution currently found is to reduce the number of decimal digits used in the coordinate to just 4 digits, but that changes a bit the view when I use the "lvl=22" (doesn't change much if at 21 or +low).
However, this solution only worked for 90 degree but not 270 degree (for the previous coordinate).

Note: This question was asked on this other website and got the final answer there

Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
587 questions
{count} votes

Accepted answer
  1. IoTGirl 2,976 Reputation points Microsoft Employee
    2022-02-08T18:30:00.983+00:00

    Hi @46179853 ,

    I might recommend you take a different tactic here that will help you understand the different experiences you are seeing. Both are powered by a tile service that only have tiles for specific levels. In the case of the static map, it stitches something together for you. In the case of the Bing Maps control, it builds a movable panorama to give an interactive experience. Please start with https://learn.microsoft.com/en-us/bingmaps/articles/bing-maps-tile-system and then https://learn.microsoft.com/en-us/bingmaps/articles/understanding-scale-and-resolution to see how zoom levels are managed. Lastly, imagery is different than vector maps so levels are only available from the height / density they are collected. For example Streetside is particularly quirky as it is essentially a travelling box at a single level https://learn.microsoft.com/en-us/bingmaps/articles/getting-streetside-tiles-from-imagery-metadata.

    Once you understand that tiles power all of these experiences you can see how different APIs use them to get different experiences and that should clarify what you are seeing.

    Sincerely,
    IoTGirl

    PS As you state you are "Capturing" our imagery, please note that our TOU prohibits caching our imagery or doing derivative works without a custom license (You can reach out to our licensing team through the Microsoft.com/maps). Please review these restrictions at https://www.microsoft.com/en-us/maps/product and should you need this data you can also license it directly from Vexcel ((Vexcel Imaging - Home of the UltraCam (vexcel-imaging.com)) without our restrictions.


0 additional answers

Sort by: Most helpful