Color coding places in Map

9 posts, 3 answers
  1. Dipti
    Dipti avatar
    37 posts
    Member since:
    Dec 2011

    Posted 28 Dec 2011 Link to this post

    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
  2. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 29 Dec 2011 Link to this post

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

  3. DevCraft banner
  4. Dipti
    Dipti avatar
    37 posts
    Member since:
    Dec 2011

    Posted 29 Dec 2011 Link to this post

    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
  5. Answer
    Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 29 Dec 2011 Link to this post

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

  6. Dipti
    Dipti avatar
    37 posts
    Member since:
    Dec 2011

    Posted 30 Dec 2011 Link to this post

    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
  7. Answer
    Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 31 Dec 2011 Link to this post

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

  8. Dipti
    Dipti avatar
    37 posts
    Member since:
    Dec 2011

    Posted 01 Jan 2012 Link to this post

    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
  9. Answer
    Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 03 Jan 2012 Link to this post

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

  10. Dipti
    Dipti avatar
    37 posts
    Member since:
    Dec 2011

    Posted 03 Jan 2012 Link to this post

    Thanks Giuseppe.

    ~Dipti
Back to Top
DevCraft banner