This project has moved. For the latest updates, please go here.

color theming

Jul 31, 2009 at 10:46 AM

Hi I am new to sharp map. I am implementing color theming to shape files. I want to apply different colors to a single shape file based upon the attributes( of the dbf file) of the layer.

Could any one help how to start of this task. I have an idea to use the SharpMap.Rendering.Thematics.CustomTheme.CustomTheme(SharpMap.Rendering.Thematics.CustomTheme.GetStyleMethod) .

But I think this method is helpful to apply colors when there are less number of attribute values. But what if there are large number of attribute values.

Any kind of help is appreciable.

Thanks in advance


Jul 31, 2009 at 11:30 AM

Hi ram282 CustomTheme is what you are looking for see example @ It doesn't matter how many attributes you have.. hth jd

Jul 31, 2009 at 11:39 AM

Thank you very much John. I found the answer useful for me. I will get back to you again incase of any other problems. Thanks once again



Aug 3, 2009 at 7:22 AM

Hi Johndiss,

The solution that you send me last time about colour theming is not dynamic. I mean, how can we apply colour theming dynamically at run time ? Suppose If I want to apply colours to a map by picking colors at runtime and I want to apply those colors only, is it possible ?  Do you have any ideas on this context ?


Aug 3, 2009 at 10:17 AM
Hi Ram, there are several options - remeber the style method can be an instance member of a styling class. It can calculate a color value or look it up in shared state or database hth jd