Azure Maps - generate static map optimized for pushpins

Ryan Brothers 0 Reputation points
2025-02-22T03:00:36.3266667+00:00

I am looking to migrate from Bing Maps to Azure Maps to generate a static map.

In Bing Maps, I pass a list of pushpins, and Bing Maps creates an optimized map based on the pushpins I passed. Bing Maps auto-selects the best zoom level to fit all the pushpins and returns an image in the width and height I passed:

https://learn.microsoft.com/en-us/bingmaps/rest-services/imagery/get-a-static-map#get-a-map-with-pushpins-that-does-not-specify-a-center-point-or-map-area

Get a map with pushpins that does not specify a center point or map area

If you do not specify a center point or map area, the map area is chosen to optimize the display of the pushpins.

Is there a way to make an equivalent call to Azure Maps? From what I see, I need to pass Azure Maps either bbox or center, and also pass a zoom level, but with Bing Maps, it calculated all of that for me and returned an optimized map. I just had to pass it the pushpins and the width and height that I wanted. Is there a way to calculate those above parameters to match what Bing Maps was doing for me?

Thanks for your help.

Ryan

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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.