Best way to display data-determined color regions on map?

cdakz used Ask the Experts™
I need to display different colors for various regions on a US Map, where the colors represent data from a key.

For example, if precipitation > 10 inches display red, if <= 10 inches, display blue.

I'm drawing a blank on the best way to do this using ASP.NET. Suggestions?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Scott FellDeveloper & EE Moderator
Fellow 2018
Most Valuable Expert 2013

It depends on how you are doing this.

Usually this is best to be done in js .  If you don't have a mapping system, fusion tables may be an answer.  

Are you using geographical polygons? images? imagemap?


I can use whatever I need to. I'm not a designer, so not quite sure what would be easiest.

BTW, this is essentially a static image for every month of the year, and no interaction needed between the user and the image, so wanted to use server code.

I'm thinking that maybe I just need to know how this would be assembled with plain ol' HTML, and then I can use ASP.NET to provide the specifics (e.g. "color" attributes)???
greetings cdakz, , you do not give any information about HOW you are to make a US Map, and HOW you are to place the areas-regions on this unknown map type. You do say - "how this would be assembled with plain ol' HTML", however in your "plain ol' HTML" there is not very useful complex-shape methods that I know of. . .

Using a first concept of a "State" area, you will need to create 48 state Shapes of complex boundaries (as compared to simple boundaries like a square), and place each on your map. and then using an if test [ if (precipitation > 10) ] produce the color to fill that state shape. OR get a raster image (bmp, png, jpg) of US and move your fill point to the state area and fill to line boundaries with that color.
It is my opinion , that No matter what you may do for this, it will not be easy, and may be more than difficult.
If I was required to do this, I feel that I would get a pre-made SVG image map of the US, you can find some at -

One you may consider (it is a simple one ) is -

this svg image was produced in the Inkscape vector program at

In an svg image, you can do XML text changes in the svg image text, to get the path areas for states, to fill with different colors. but this is not a simple thing to do, even with experience in writing SVG image drawing code. I do not have time to even try and show you how to do SVG image code for drawing, and the operations you say you need for this would take me time I do not have. But I give you this suggestion for something to consider, and have you re-evaluate the effort it may take to do this.


Looks like SVG is what I was looking for. Thanks!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial