Actually my requirement is to color the country based on some numeric values. For example am having the numeric values corresponding to all the countries in the world and i have some range to color the country based on values. how can we achieve this in the simple and best way. I have achived this using Color based on values feature in our websamples. Is this the best way?
If you have multiple countries in your shapefile and want to set the color of one specifically you will need to use our ValueStyle as demonstrated in the Samples - Styles - Draw Features Based on a Value sample. In this sample you will see a ValueStyle.ColumnValue. This ColumnValue is found in the dbf of your shapefile and the ValueStyle searches this column for a the value you specify and colors as necessary.
I need to color the countries (multiple countries) based on my own numerical values i.e i have values corresponding to countries.
In this Scenario shall we add our own new column in the dbf of our shape file so that ValueStyle searches this column (newly added column) for the value we specify and colors as necessary.
Yes, that’s a good way if you can process all the data before you will use it. Also there is another way, you can refer–>HowDoISamples–>DataProviders–>LoadAHeatLayer, in this sample, we use CustomColumnFetch which is a temporary column.