zooming/panning control location

2 posts, 0 answers
  1. Christopher
    Christopher avatar
    12 posts
    Member since:
    Jul 2008

    Posted 27 Aug 2010 Link to this post

    Is it possible to move the zooming/panning control from the bottom middle of the map to the bottom left or bottom right?

    Thanks

    Chris R.
  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 01 Sep 2010 Link to this post

    Hello Christopher,

    You can turn off default UI layout of the RadMap control and then use map UI controls in your XAML:

    <Grid x:Name="LayoutRoot" Background="White">
        <telerik:RadMap x:Name="radMap" 
            UseDefaultLayout="False">
            <telerik:RadMap.Provider>
                    <telerik:OpenStreetMapProvider />
            </telerik:RadMap.Provider>
        </telerik:RadMap>
      
        <Grid HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5">
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition />
                <RowDefinition />
            </Grid.RowDefinitions>
      
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
      
            <telerik:MapCommandBar Name="commandBar" Grid.Row="1" Grid.Column="0" Margin="6,0,6,0" />
            <telerik:MapNavigation Grid.Column="1" Grid.RowSpan="3" Name="navigation"  />
            <telerik:MapZoomBar Grid.Row="1"  Grid.Column="2" Name="zoomBar" Margin="6,0,6,0" />
        </Grid>
    </Grid>

    You also should assign RadMap control to the MapControl property of these UI controls:

    public MainPage()
    {
        InitializeComponent();
      
        this.commandBar.MapControl = this.radMap;
        this.navigation.MapControl = this.radMap;
        this.zoomBar.MapControl = this.radMap;
    }


    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. UI for WPF is Visual Studio 2017 Ready
Back to Top