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

zooming/panning control location

1 Answer 104 Views
Map
This is a migrated thread and some comments may be shown as answers.
Christopher
Top achievements
Rank 1
Christopher asked on 27 Aug 2010, 06:24 PM
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.

1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 01 Sep 2010, 09:41 AM
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
Tags
Map
Asked by
Christopher
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or