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

Zoom Level changes when screen resolution Changes

2 Answers 179 Views
Map
This is a migrated thread and some comments may be shown as answers.
ishan
Top achievements
Rank 1
ishan asked on 03 Oct 2011, 07:49 AM
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 Answers, 1 is accepted

Sort by
0
Accepted
Andrey
Telerik team
answered on 05 Oct 2011, 02:27 PM
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 >>

0
ishan
Top achievements
Rank 1
answered on 10 Oct 2011, 06:37 AM
Thanks Andrey Murzov. It works.

Regards,
Ishan
Tags
Map
Asked by
ishan
Top achievements
Rank 1
Answers by
Andrey
Telerik team
ishan
Top achievements
Rank 1
Share this question
or