This is a migrated thread and some comments may be shown as answers.

Coloring shape files

3 Answers 103 Views
Map
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 13 Nov 2010, 06:00 PM
Hi

This is probably just a continuation of a previous question on here, but I'm not sure if I get it yet! 

I want to load a .SHP or .KML file representing a geography and then have my program supply the values and color the shapes based on information from a database. 

For example I would like to load the shape file, color it using a value I have calculated from the database and then overlay an abitrary piece of XAML (which would be a series of other representations of the information for that geographical area). So I would shade the regions based on the number of customers in that region that have some particular characteristic and then overlay a range of other statistics for the region (split by gender as a chart for example).

Is this possible without producing a DBF file?  I've no idea how I would do that in these circumstances - I guess I'd have to dynamically serve it but that sounds pretty complex.

Regards

Mike

3 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 17 Nov 2010, 10:33 AM
Hi Mike,

The Colorizer requires an extended data property.
You can set it up from a code for each read shape using the PreviewReadCompleted event. You should specify the MapShapeReader.ExtendedPropertySet property to register necessary property of extended data.
I have attached a sample solution. I hope it helps.

Sincerely yours,
Andrey Murzov
the Telerik team
See What's New in RadControls for Silverlight in Q3 2010 on Tuesday, November 16, 2010 11:00 AM - 12:00 PM EST or 10:00 PM - 11:00 PM EST: Register here>>
0
awni
Top achievements
Rank 1
answered on 27 Dec 2011, 03:02 AM
Hi, 
I'm trying to apply colorization in the same way you did in the example, but I need it for states and counties in the US. Any help is appreciated.

Thank you, best regards and Merry Christmas :) 
awni
0
Bartholomeo Rocca
Top achievements
Rank 1
answered on 29 Dec 2011, 02:15 PM
Hello awni,

I think the principle of colorization would be the same for any shapefile no matter whether it is a map of Europe, or the US. You can also check this online example here http://demos.telerik.com/silverlight/#Map/DrillDown that demonstrates something similar to your requirement.


Greetings,
Bart.
Tags
Map
Asked by
Mike
Top achievements
Rank 1
Answers by
Andrey
Telerik team
awni
Top achievements
Rank 1
Bartholomeo Rocca
Top achievements
Rank 1
Share this question
or