Coloring shape files

4 posts, 0 answers
  1. Mike
    Mike avatar
    3 posts
    Member since:
    Feb 2008

    Posted 13 Nov 2010 Link to this post

    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
  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 17 Nov 2010 Link to this post

    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>>
  3. DevCraft banner
  4. awni
    awni avatar
    14 posts
    Member since:
    Aug 2011

    Posted 26 Dec 2011 Link to this post

    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
  5. Bartholomeo Rocca
    Bartholomeo Rocca avatar
    247 posts
    Member since:
    May 2006

    Posted 29 Dec 2011 Link to this post

    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.
Back to Top