Radmap auto connection

3 posts, 0 answers
  1. Civelle
    Civelle avatar
    29 posts
    Member since:
    Dec 2009

    Posted 18 Oct 2010 Link to this post


    We have implemented the radmap control in our application. Everything is fine except for we would like to prevent the control to automatically connect to Bing when loading the page. We built our code base on the example provided on your site and the XAML look like this:

             <telerik:RadMap x:Name="rmMap" Grid.Column="0" ZoomLevel="3" Center="62.832999, -95.9139999"  ZoomChanged="rmMap_ZoomChanged" CenterChanged="rmMap_CenterChanged" Visibility="Collapsed" Canvas.ZIndex="1">
                 <telerikMap:InformationLayer Name="informationLayer">
                             <Border Background="#7FFFFFFF" BorderThickness="1" Padding="2,2,2,2">
                                     <ToolTip Content="{Binding Path=Title}" />
                                     <telerikMap:HotSpot X="0.5" Y="0.5" />
                                         <ColumnDefinition Width="14" />
                                         <ColumnDefinition Width="Auto" />
                                     <Path Fill="Red">
                                                 <EllipseGeometry Center="7,7" RadiusX="3" RadiusY="3" />
                                                 <EllipseGeometry Center="7,7" RadiusX="7" RadiusY="7" />
                 <telerikMap:InformationLayer Name="informationLayer2" />

    So when we load the UserControl that contains RadMap, it automatically connects to BING Map Provider (this is my understanding) to provide the map as per the specifications above. Is there a way to still include the radmap in our UserControl and have it connect to BING only at the time of calling the 'SearchProvider.SearchAsync(request)' for the first time in our code?

    The reason we want to do this is to limit the number of 'hits' to BING

  2. Andrey
    Andrey avatar
    1681 posts

    Posted 20 Oct 2010 Link to this post

    Hi Civelle,

    If I understand your question correctly, you would like to have map region empty when your application starts (don’t show any map tiles). When user performs some operation (search something) map should start show tiles from Bing. Is it correct? If it is so, then you can use EmptyProvider when your application starts and then replace it with BingMapProvider when necessary. For example:

    <telerik:RadMap x:Name="radMap" 
            Center="37.7847107699891, -122.421295514088"
            <telerik:EmptyProvider />

    private void DoSearch(object sender, RoutedEventArgs e)
        this.bingProvider = new BingMapProvider("You_Bing_Map_ID");
        this.radMap.Provider = bingProvider;            
        // Do other things

    Sincerely yours,
    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
  4. Civelle
    Civelle avatar
    29 posts
    Member since:
    Dec 2009

    Posted 20 Oct 2010 Link to this post

    Hi Andrey.

    Thanks for your suggestion: I think that this is exactly what we are looking for. I will try this as soon as I get a chance to get back working on the maps.

Back to Top