Bing Static Maps API

vfg_uy 1 Reputation point
2021-09-02T16:06:43.39+00:00

Hello,

I'm building a PDF report system in which I need to include maps with an overlay of polygons on top of them. I'm currently using the "dc" parameter in order to specify the coordinates of these polygons, and this data goes on the body of a POST request. The problem I'm currently having is that I can only send up to 5 polygons (only up to 5 "dc" parameters) on the body of the POST request.

Is it possible to send more than 5 polygons per request? Because for some maps I need up to 20 or 25 polygons drawn.

I'm using a dev key to hit the API, but I don't know if that has any effect on the amount of data that I can send, because the documentation doesn't provide information about that.

Thanks!

Windows Maps
Windows Maps
A Microsoft app that provides voice navigation and turn-by-turn driving, transit, and walking directions.
245 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. IoTGirl 2,976 Reputation points Microsoft Employee
    2021-09-03T17:49:55.167+00:00

    Hi @vfg_uy ,

    I have answered you in the Bing Maps forum as well. The static map API calls other APIs behind the scene so the basic/trial key limitation may be in one of those subsequent calls or it could be just a size limit on the call itself. The doc calls out a pushpin limit of 18 Get a Static Map - Bing Maps | Microsoft Learn so it seems reasonable to assume that a multisided polygon could easily exceed the 18 point limit. I am not saying that is what is happening but I am saying that the API does have limits and likely you will not be able to display 20 or 25 polygons using this API.

    UPDATE: I have confirmed with the team that this API does have a 5 polygon limit. To go higher you will need to use a different API / dynamic rather than static map.

    Sincerely,

    IoTGirl

    0 comments No comments