Color MapShapes with country code

2 posts, 0 answers
  1. Olivier
    Olivier avatar
    1 posts
    Member since:
    Apr 2011

    Posted 21 Apr 2011 Link to this post

    Hello !

    I have a little problem with the radmap component,
    I'm explain :

    I would like to color each country of a europe shape files with one conditions (if the country is available (green) or not(red) for our salesboard)

    I try to do that with the extendedproperty and the event "PreviewReadCompleted"

    but when i implement there :
    private void PreviewReadCompleted(object sender, PreviewReadShapesCompletedEventArgs eventArgs)
        if (eventArgs.Error == null)
            foreach (FrameworkElement element in eventArgs.Items)
                var shape = element as IExtendedData;
                if (shape != null)
                    // setup the property value
    /// <summary>
    /// Emulates setting a value from database to extended data.
    /// </summary>
    private void SetExtendedPropertyFromDatabase(IExtendedData shape)
        // setup the property value
        shape.ExtendedData.SetValue(this.extendedPropertyName, true);

    What the best way to determine the country is ratached to the shape actually process ?

    Thans for you work and your anwser, if you need more details, just ask me =)

    (Sorry for my english ^^)

    Best regards
  2. Andrey
    Andrey avatar
    1681 posts

    Posted 26 Apr 2011 Link to this post

    Hello Olivier,

    I am not sure I understand your question completely. The extended data by itself does not concern  the coloring of the shapes. It is just data. Extended data can be used by ColorMeasureScale colorizer to set color to the shape if it is specified for the information layer. You can find an example here:

    You can set fill for the shape object using its properties: Fill, Stroke, StrokeThikness and so on.

    Kind regards,
    Andrey Murzov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top