Code Monkey home page Code Monkey logo

Comments (3)

cschotte avatar cschotte commented on August 23, 2024

We offer a Get Polygon API and a Get Search Polygon feature that you can use to create a Choropleth Map without having to draw it manually. This functionality is also available in Power BI through the Azure Maps visual (this we call Filled Map), allowing you to simply import your data without any additional development. To render the map as a static image you need the Get Map Static Image API, where you add the polygons for your map, see here additional documentation.

from azuremapscodesamples.

rbrundritt avatar rbrundritt commented on August 23, 2024

To be fair, Google Maps doesn't have this either, likely due to them not having enough of a business case to include this in their platform. The Google Chart team deprecated the static image map chart in 2019 and uses an interactive map control now. When it used static images, it was free (hard to justify building a competing solution when the competitor is free). In the 17 years I've worked with the map community, I've most either wanted an interactive map experience that could export a static image, or they wanted to use custom boundaries (Azure Maps web SDK can export a static image). All in all, there are many open-source solutions that achieve this capability, and running one of those in Azure would be significantly cheaper than calling into any map platform.

There are several options to achieve your desired experience depending on what capabilities you need. As Clemens mentioned, the Azure Maps static image service could be used if you pass in the polygon boundaries. However, since that API is a "GET" request, you won't be able to put all the polygons in the URL.

A custom solution can be created and would have a ton of benefits, the main one being that it would cost a lot less than using any major map platform. Here are some capabilities to consider that would dictate which path you take in creating a custom solution:

  • Need for global support. Do you need this to work for users anywhere in the world or are all your users in a single country like the USA? There is a lot of disputed borders and names in the world and a lot of regulations around maps in different countries. If you need something that works everywhere, then you would be limited to working with a major map platform that handle the disputed borders and names for you as that is a lot of work, and in certain countries where maps are heavily regulated you will unlikely want to have to go through their certification process for a custom solution. If you plan to only support this for a subset of countries, such as UN countries in North America and Western Europe, a single set of polygons of admin boundaries could be used globally. There are free admin boundaries available globally that have a "UN" view. Storing these locally with your app and using these could significantly reduce costs and provide really good performance.
  • Do you need place names or just boundaries? If you only need boundaries, then a custom solution isn't overly difficult to achieve, and there are lots of open-source solutions for this. If you need placenames, then disputed names becomes a potential issue, then there may also be a need for multi-language support which can complicate things. A custom solution could still be achieved but would be a bit more work.
  • What kind of background do you need? If it is a flat color (e.g. white, black,...) then a custom solution is easy. If you want an actually map or satellite imagery, then you would either need to request a static image from a map platform and then draw your data on top (alternatively request tiles, draw those first, then your data).
  • What level of admin boundaries do you need? Country and state/province level polygon data is freely available globally. City and zip code boundaries are much more difficult to source. Census boundaries access varies by country. If you only need country or state level data, then there are many open-source options out there.

Here are some open-source projects to consider (note you can host a python app in an Azure function).

from azuremapscodesamples.

shiroyc avatar shiroyc commented on August 23, 2024

Thank you! Really appreciate the detailed answer.

My use case is simple

  • most users are in the US
  • I just need a flat map
  • I just need boundaries of the countries (no placenames or states).
  • I just need countries of the world

I will review the solutions you have shared.

from azuremapscodesamples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.