Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > Map > Coloring shape files

Not answered Coloring shape files

Feed from this thread
  • Mike Mike's avatar

    Posted on Nov 13, 2010 (permalink)

    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

    Reply

  • Andrey Andrey admin's avatar

    Posted on Nov 17, 2010 (permalink)

    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>>
    Attached files

    Reply

  • awni avatar

    Posted on Dec 26, 2011 (permalink)

    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

    Reply

  • Bartholomeo Rocca Master avatar

    Posted on Dec 29, 2011 (permalink)

    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.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > Map > Coloring shape files