Search code examples
blazor-server-sideazure-maps

Azure Maps API - Static Tiles poor image detail


I've started to use the Azure Maps API for static images so that I can render a picture of the locale in a report.

The address I'm using at the moment is :

map/static/png?api-version={apiVersion}&subscription-key={_apiKey}&format={format}&zoom={zoom}&layer={layer}&style={style}&center={lon},{lat}&height={size}&width={size}&pins=default{additionalArgs}||{lon} {lat}

The trouble is the image is really poor, lacking in alot of road detail compared to the web control that allows you to scroll around the map. Versus the Google Maps static API the image is really, really bad.

So I'm not sure if I'm missing something. I've tried the basic layer, hybrid etc./different API versions - but I'm still lacking the road names for a lot of the roads - which is not the case at the same zoom level when using the map control and/or bing.

Any ideas? I want to keep using it but I'm concerned I'm hobbling my app with a poor imitation of what they used before (Google).

Appreciate any pointers.


Solution

  • The v1 and v2 of the static map image API only uses TomTom for rendering, while the interactive map control is using enriched data from multiple data providers that is also used in Bing. This enriched data is fairly new to the interactive control (added last summer). Since then new search API's have been added that also use the enriched data. It's possible their will be an improved static map image version in the future that may use this data but I don't have insights into the product roadmap.

    That said, if you can use the interactive map control as part of your initial user experience, you can generate a static map image from it and use that in your report. Doing that not only would resolve your issue but would significantly reduce costs. If you already have an interactive map experience, this will not generate any additional cost for the static image. If this is something new you would add, the map usually only needs 4 to 6 tiles to file the map area. It takes 15 tiles to make a transaction. So a single map would cost less than a transaction, plus, map tiles are cached, so if a user looks in the same general area, some tiles would be pulled from cached and not counted towards a transaction. So the overall cost of this approach can easily be 2 to 5 times less than using the static map image API. I've worked with many companies who ended up using this approach for cost savings but also found that it provides a lot more functionalities as well since you get to use the full rendering capabilities of Azure Maps and can easily pull in custom data sets.

    Here is a library that generates a static map image from the interactive map control: https://github.com/Azure-Samples/azure-maps-image-exporter