Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > Map > Color coding places in Map

Answered Color coding places in Map

Feed from this thread
  • Dipti avatar

    Posted on Dec 28, 2011 (permalink)

    Hi,

    I am trying to use the RadMap control to show the sales summary of a company such that every country is displayed in a different color to show the sales data. I will be getting the sales data (according to  which the map needs to be colored dynamically).

    The requirements are as follows:
    Customizing RadMap control for providing
    a)Place selection on the map to view reports in a grid
    b)Setting place's color based on parameter
    c)color coding the places

    Please redirect me to samples which have this kind of implementation.

    Thanks.
    ~Dipti

    Reply

  • Giuseppe Giuseppe admin's avatar

    Posted on Dec 29, 2011 (permalink)

    Hello Dipti,

    We have attached a sample application that demonstrates how you can achieve the following functionality:
    • Use MapShape.CaptionTemplate / CaptionLocation to specify the country name.
    • Use GraphColorizer to color-code the various countries.

    You can also review the Theatre Hall online example here that demonstrates how you can manipulate the map shapes (the seats) programatically to enable selection, and also how to colorize the map shapes (the seats) based on some business condition.

    Hope this helps.


    Greetings,
    Giuseppe
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

  • Dipti avatar

    Posted on Dec 29, 2011 (permalink)

    Thanks for the reply Giuseppe. Your sample works well for static data.

    Since my sales data is dynamic, I will have to reload the map with new color-coded map.
    In this sample and other InformationLayer samples, the data used in Colorizer is static and doesn't change. It is either loaded from dbf file (like population) or kml file.

    How can we color-code a map with dynamic data?
    If we try to write informationLayer.Reader.PreviewReadCompleted event, how can we compare with each country?

    Please help.

    Thanks
    ~Dipti

    Reply

  • Answer Giuseppe Giuseppe admin's avatar

    Posted on Dec 29, 2011 (permalink)

    Hello Dipti,

    You can retrieve all loaded map shapes (countries) from the second argument of the PreviewReadCompleted event handler via PreviewReadShapesCompletedEventArgs.Items property.

    Also, you will probably need to color-code the map shapes manually and not through the built-in colorizer due to the specifics of your dynamic data scenario. We have attached a modified sample application that demonstrates how you can manually colorize the map shapes (countries) based on some business condition in the MapShapeReader.ReadCompleted event handler.

    Hope this helps.


    Greetings,
    Giuseppe
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

  • Dipti avatar

    Posted on Dec 30, 2011 (permalink)

    Thanks Giuseppe. This looks like what I need.

    Another question, this map has to be placed in a SharePoint site inside an accordian view. It needs to have a fixed width and height. Is it possible to specify fixed width and height to the map?

    If we use the .shp/.dbf files shipped with the Telerik Silverlight Demos, do we have licensing issues to worry about?

    Thanks.
    ~Dipti

    Reply

  • Answer Giuseppe Giuseppe admin's avatar

    Posted on Dec 31, 2011 (permalink)

    Hello Dipti,

    You can use RadMap.Height / Width properties to set fixed dimensions for the control.

    As for the shapefiles -- all shp/dbf files are used for demonstration purposes only and are not included in the Telerik licensing agreement for commercial use as they are not part of the RadMap control itself.


    All the best,
    Giuseppe
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

  • Dipti avatar

    Posted on Jan 1, 2012 (permalink)

    Hi Giuseppe,

    Please let me know from where we can get shp/dbf files which we can use in my application without any licensing issues, this is very urgent.

    Thanks again!
    ~Dipti

    Reply

  • Answer Giuseppe Giuseppe admin's avatar

    Posted on Jan 3, 2012 (permalink)

    Hello Dipti,

    RadMap provides built-in shapefile support but we are not content provider and do not sell geospatial imagery data. Also, we do not have any agreements with ESRI content providers that we can recommend so you will probably need to check some website online either for open-source or paid shapefile geo imagery that suits your needs (possible starting point could be e.g. http://geocommons.com/).


    Kind regards,
    Giuseppe
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

  • Dipti avatar

    Posted on Jan 3, 2012 (permalink)

    Thanks Giuseppe.

    ~Dipti

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > Map > Color coding places in Map