Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this problem, I need to paint each polygon with a distinct color based on an atribute value using .NET, for example:

Polygon    value
1        10
2        10
3        5
4        5
5        1

Polygon 1 and 2 will be painted blue, polygon 3 and 4 will be green, and polygon 5 will be painted red

Does anyone knows how to do this? Thanks for the help.

share|improve this question
Will you be doing this in ArcMap? Also, why did you select the ASP.Net tag? Is this a web-based application? If so, are you using any of ESRI's APIs? – Michael Todd Oct 20 '10 at 22:27
hi michael, I'm not using arcmap, I have to do this in beacuse I'll be consuming an arcgis server service and I'm using the components installed in visual studio, got any tip? – eiefai Oct 21 '10 at 1:33
So you're trying to consume an ArcGIS Server service using Visual Studio. Do you plan on using the SOAP API, Javascript API, or Silverlight API? And are these polygons already available in the service that you're consuming or are you adding them yourself? – Michael Todd Oct 21 '10 at 2:49
I'll be using the javascript API mostly, the polygons are available in the service, I just have to paint them based on a value, also, I'm thinking on using flex to do this, wich way is easier? .NET or Flex? – eiefai Oct 21 '10 at 15:12

The .NET framework exposes GDI+ to you which in my opinion is a super easy way to do some simple drawing. The newer versions of .NET (3+) has some more features in the System.Windows.Media namespace. If your problem leans more towards needing GIS capabilities to parse the data there are some projects you can use such as SharpMap.

share|improve this answer
thanks for the answer, but this doesn't help me at all, I have to use Arcgis Server only, with the tools they provide, thanks anyway – eiefai Oct 22 '10 at 0:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.