State Map generation

3 posts, 0 answers
  1. Aktzc
    Aktzc avatar
    6 posts
    Member since:
    Jul 2012

    Posted 13 Jul 2012 Link to this post

    I can get the united states map in my application (C#). I am eager to find out whether there is any onclick event for telerik map control, so that when we click on a state, we get the state map in a pop up window????
  2. Lancelot
    Lancelot avatar
    251 posts
    Member since:
    Jul 2012

    Posted 17 Jul 2012 Link to this post

    Hi Aktzc,

    Here is a list of the events RadMap exposes. There are a couple ways to approach this.

    This help document will show you how to be able to use a left mouse click event. The following code is used to change the styling of a RadMap line using mouse input from the user.

    private void line_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
             MapLine line = sender as MapLine;
             if (line != null)
                 if (this.selectedLine != null)
                 if (this.selectedPolyline != null)
                 this.selectedLine = line;
                 this.selectedPolyline = line.Tag as MapPolyline;

    You can adapt this to open a new window and load the state the user picked.

    Or another option is the "DrillDown" behavior. RadMap allows you to drill down into lower shapefiles, for instance a state map. The RadMap demo shows you this in action. The Telerik admin will probably point you to the demo, if you look up to the right corner you can toggle the view to "Code" and see how they did it. If it isn't clear by looking at it there, go to C:\Program Files (x86)\Telerik\RadControls for Silverlight Q2 2012\Demos on your machine and load the demo into Visual Studio to see it for youself.

    Good Luck,
  3. Andrey
    Andrey avatar
    1681 posts

    Posted 18 Jul 2012 Link to this post

    Hi Aktzc,

    I would recommend you to take a look into the following example:

    Andrey Murzov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top