Zoom Level changes when screen resolution Changes

3 posts, 1 answers
  1. ishan
    ishan avatar
    5 posts
    Member since:
    Jul 2011

    Posted 03 Oct 2011 Link to this post

    Hi,

    Could anyone help me with the Rad Map Control? The problem i am facing is that, when i set zoom level to 5ml (i.e. 12  Zoom Level) under  1024 * 768 Screen Resolution, Rad Map Displays zoom level 2.5 Ml (i.e. 13  Zoom Level). I would like the zoom level to display 5mls even under resolution 1024 * 768.

    Thanks in advance.
  2. Answer
    Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 05 Oct 2011 Link to this post

    Hello Ishan,

    The value of map scale control is not related to the zoom level of map only. The map scale calculates its value according to its width that is calculated according to a "largest nice distance". Also its width is limited by the RelativeMaxWidth property. You can get the 5 ml for the zoom level 12 under 1024x768 resolution when you customize the map scale control with appropriate value of the RelativeMaxWidth.
    The sample code is below.
    <Window x:Class="WpfApplication1.MainWindow"
            Title="MainWindow"
            Height="768" Width="1024">
        <Grid>
            <telerik:RadMap x:Name="RadMap1"
                            DistanceUnit="Mile"
                            ScaleVisibility="Collapsed"
                            Center="37.747440943384, -95.2481111547551"
                            ZoomLevel="12">
                <telerik:RadMap.Provider>
                    <telerik:BingMapProvider Mode="Road" ApplicationId="bing maps key" />
                </telerik:RadMap.Provider>
            </telerik:RadMap>
            <telerik:MapScale x:Name="scale"
                              VerticalAlignment="Bottom"
                              Margin="0,0,10,20"
                              MapControl="{Binding ElementName=RadMap1}"
                              DistanceUnit="Mile"
                              RelativeMaxWidth="0.3" />
        </Grid>
    </Window>

    Kind regards,
    Andrey Murzov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. ishan
    ishan avatar
    5 posts
    Member since:
    Jul 2011

    Posted 10 Oct 2011 Link to this post

    Thanks Andrey Murzov. It works.

    Regards,
    Ishan
Back to Top