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

Zoomlevel Data Binding Doesn't Work

1 Answer 119 Views
Map
This is a migrated thread and some comments may be shown as answers.
paul
Top achievements
Rank 1
paul asked on 25 Jul 2010, 10:14 PM
The zoomlevel binding doesn't seem to work,
it seems to me that when i change the zoom level i the view model, the UI is not notified, the get method of the MapZoomLevel property was called only once when the map loads up. 
here is my code:

xaml:

<telerik:RadMap x:Name="RadMap" ZoomLevel="{Binding MapZoomLevel, Mode=TwoWay}" Margin="4" Provider="{Binding MapProvider}">        
<telerik:InformationLayer ItemsSource="{Binding TheSource}"/>
</telerik:RadMap>  


c#:
i use MVVM model in the project, 
my viewmodel inherits: INotifyPropertyChanged
        private int _zoomLevel;

        public int MapZoomLevel
        {
            get { return (_zoomLevel); }
            set {
 _zoomLevel = value;
RaisePropertyChanged("MapZoomLevel")
 }
        }


the same databinding works with map center and map provider.

Is this a bug in the component?

1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 27 Jul 2010, 07:48 AM
Hi Paul,

Thank you for the feedback.
We will fix this problem in some of our  future releases of RadMapl. We've created a PITS issue and you can check when the fix will be available using the following link.
http://www.telerik.com/support/pits.aspx#/public/silverlight/2835

The map control has the built-in zoom control that uses binding to the RadMap.ZoomLevel property.
Currently, if you want to use binding, then you should disable this zoom control. The RadMap has the ZoomBarVisibility property. To hide the zoom control you should set it to "Collapsed".
If the zoom control is displayed, then you cannot use the binding to the ZoomLevel property.

All the best,
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
paul
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or