This is a migrated thread and some comments may be shown as answers.

Map Control for WinForm Application

10 Answers 273 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Deepa Balasundaram
Top achievements
Rank 1
Deepa Balasundaram asked on 01 Sep 2010, 10:23 PM
I have to use a map control in my winform application. Any suggestions?

Thanks

10 Answers, 1 is accepted

Sort by
0
Vassil Petev
Telerik team
answered on 02 Sep 2010, 09:06 AM
Hi Deepa Balasundaram,

Since we do not have a map control for WinForms, you can use RadMap for WPF in your Windows Forms applications. There are many resources on the internet on how to use WPF controls in Windows Forms apps, so feel free to look them in Google.


Kind regards,
Vassil
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
0
Deepa Balasundaram
Top achievements
Rank 1
answered on 02 Sep 2010, 02:50 PM
So, I should probably use RadMap for Silverlight in my asp.net web application right?
0
Vassil Petev
Telerik team
answered on 02 Sep 2010, 04:18 PM
Definitely, Deepa Balasundaram.
 

Greetings,
Vassil
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
0
Deepa Balasundaram
Top achievements
Rank 1
answered on 08 Sep 2010, 05:22 PM
I have created a WPF user control with RadMap and tested it in a WPF application. It works fine. But when I add the WPF usercontrol to a winform application, the map is not displayed. The zoom control is visible and If I add a pin point on the map, I could see the pin point. But the map is not visible. I am using the code in the following website: http://www.telerik.com/help/wpf/map-create-basic-application-bing-maps.html

0
Vassil Petev
Telerik team
answered on 09 Sep 2010, 08:49 AM
Hello Deepa Balasundaram,

I am not sure how you have embedded the WPF chart in your winforms application, so I would suggest reviewing this blog on how to achieve a very similar case: Using RadGauge for WPF in a WinForms application.

If you still experience problems, please review the Microsoft resources on the subject. If you think that the problem is related to our tools (for example, the WPF chart works in a regular non-Telerik WinForms application), please write back with more specific details on your implementation in order to review what may be wrong.

 
Best wishes,
Vassil
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
0
Deepa Balasundaram
Top achievements
Rank 1
answered on 14 Sep 2010, 07:40 PM
UserControl.xaml

<UserControl x:Class="Controls.UserControl1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Height="300" Width="300" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
    <Grid>
        <telerik:RadMap Margin="31,49,34,43" Name="RadMap1" />
    </Grid>
</UserControl>

UserControl.xaml.cs

public UserControl()
        {
            InitializeComponent();
            this.RadMap1.Provider = new BingMapProvider(MapMode.Road, true, "AhtXsuoZx2_B37B8-HqRXNxDxoT7ZrIR7AYhXTlmS3IJJpMHLa9N3SO3_crgaRJS");
            RadMap1.Center = new Location(35.885797, -97.033185);
            RadMap1.ZoomLevel = 11;
        }

Form1.cs (winform)
public Form1()
        {
            InitializeComponent();
            var myMap = new Controls.UserControl1();
            this.elementHost1.Child = myMap;

        }

This is what I have. The gauge example works fine. But for the RadMap, I can see the zoom and change mode controls. But I couldnt see the map in the background.
0
Deepa Balasundaram
Top achievements
Rank 1
answered on 14 Sep 2010, 07:43 PM
Here is a screenshot.
0
Deepa Balasundaram
Top achievements
Rank 1
answered on 14 Sep 2010, 08:33 PM
>>Hi Benjamin,

>>Unfortunately RadMap for WPF can't be used from the Windows Forms application. We are using application-level functionality >>provided by WPF in RadMap to implement caching. Unfortunately this functionality is not available in the Windows Forms applications.

>>Regards,
>>Andrey Murzov
>>the Telerik team

Is this true?
0
Andrey
Telerik team
answered on 17 Sep 2010, 03:00 PM
Hello Deepa Balasundaram,

Yes, that's true for current release and the problem is logged in our public issue tracking system. You can track the progress of the fix and when it will be available using the following link:
http://www.telerik.com/support/pits.aspx#/public/silverlight/1743

Also you can vote to speed up a development of this feature. One of the major criteria for priority of the feature development is a number of the customer's votes in PITS.

Best wishes,
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
0
Deepa Balasundaram
Top achievements
Rank 1
answered on 17 Sep 2010, 07:02 PM
Well.. I found a work around. Now, I could able to use RadMap in my WinForm application. My winform application uses a WPF user control which has a RadMap. I launched my winform application from a WPF application. Thats it.. everything works fine now.

Deepa
Tags
General Discussions
Asked by
Deepa Balasundaram
Top achievements
Rank 1
Answers by
Vassil Petev
Telerik team
Deepa Balasundaram
Top achievements
Rank 1
Andrey
Telerik team
Share this question
or