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

map zoom error since Q3

2 Answers 61 Views
Map
This is a migrated thread and some comments may be shown as answers.
Tamas
Top achievements
Rank 1
Tamas asked on 27 Nov 2010, 04:04 PM
Hi,

I was drawing charts on a RadMap like in your City demographics example. That was working fine until I've upgraded to the latest Q3 version. Now I have an issue when zooming: the small charts are enlarged when zooming in and when the zoom is finished they are resized again. This was not like this with the version before, when the radcharts had a constant size.

Here is my code:

        private void InitializeChart(RadChart chart, List<LabeledCell> cells, Telerik.Windows.Controls.Map.Location location)
        {
            this.SetChartDimension(chart);
 
            chart.BorderThickness = new Thickness(0);
            chart.DefaultView.ChartArea.Background = new SolidColorBrush(Colors.Transparent);
            chart.DefaultView.ChartArea.Padding = new Thickness(0);
            chart.Background = new SolidColorBrush(Colors.Transparent);
            chart.DefaultView.ChartLegend.Visibility = Visibility.Collapsed;
            chart.DefaultView.ChartTitle.Visibility = Visibility.Collapsed;
            chart.DefaultSeriesDefinition = new PieSeriesDefinition() { ShowItemLabels = false };
            chart.Margin = new Thickness(-1 * (chart.Width / 2), -1 * (chart.Height / 2), 0, 0);
             
            List<double> chartdata = new List<double>();
            foreach (LabeledCell cell in cells)
            {
                chartdata.Add(Double.Parse(cell.Value.ToString()));
            }
 
            chart.ItemsSource = chartdata;
            chart.SetValue(MapLayer.LocationProperty, location);
            this.InformationLayer.Items.Add(chart);
        }

      
private void SetChartDimension(RadChart chart)
{
    if (this.RadMap1.ZoomLevel < 0)
        return;
 
    chart.Height = 30 * this.RadMap1.ZoomLevel;
    chart.Width  = 30 * this.RadMap1.ZoomLevel;
}



And the XAML:

<telerik:RadMap x:Name="RadMap1" ZoomLevel="2">
    <telerik:InformationLayer x:Name="InformationLayer" Visibility="Visible">
        <telerik:InformationLayer.MapControl>
            <telerik:RadMap Background="Transparent" Foreground="Transparent" />
        </telerik:InformationLayer.MapControl>
    </telerik:InformationLayer>
</telerik:RadMap>

Is it possible to achieve the original behavior?

Many thanks and best regards,
Tamas

2 Answers, 1 is accepted

Sort by
0
Accepted
Andrey
Telerik team
answered on 30 Nov 2010, 02:33 PM
Hello Tamas,

Our developers have already addressed this issue and we would suggest you to download the latest internal build from your Client.Net account to get the fixed version.

Hope this helps.


Best wishes,
Andrey Murzov
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Tamas
Top achievements
Rank 1
answered on 30 Nov 2010, 08:34 PM
Hi Andrey,

Many thanks, this is solved in the latest build.
Tamas
Tags
Map
Asked by
Tamas
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Tamas
Top achievements
Rank 1
Share this question
or