Is it possible to colorize the MapShape objects on the basis of some string condition?
For example, how to fill shape with color depending on the name of shape: "if Country == 'United States' fill it with green"?
Thanks.
We need to paint the shapes based on some properties outside of the shapefile. The values, determining the colors, change frequently; so we can't place them into the shapefile. For example, I need to show the today's temperature in every country. How could we do it?
0
Andrey
Telerik team
answered on 10 Aug 2011, 03:41 PM
Hi Alexander,
You can handle the PreviewReadCompleted event of the MapShapeReader to set color for map shape. Data from dbf-file will be available in the ExtendedData property of map shape. You can get it using the ExtendedData.GetValue method.
The sample code is below.