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

MVVM and RadMap

4 Answers 159 Views
Map
This is a migrated thread and some comments may be shown as answers.
Bryce Godfrey
Top achievements
Rank 1
Bryce Godfrey asked on 02 Oct 2010, 01:18 AM
I'm trying to use an MVVM approach with RadMap and I'm having issues binding RadMap.Center and RadMap.ZoomLevel as neither seem to respect the binding and update when they change.  Should I be binding to something else to change those?

4 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 05 Oct 2010, 12:05 PM
Hello Bryce Godfrey,

Thank you for the feedback.
We are aware about the problem with binding of RadMap.ZoomLevel property.
We will fix the problem in some of our future releases of RadMap. We have 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.

We can't reproduce the issue with binding to the RadMap.Center property.
Could you, please, create sample solution which demonstrates this problem and send it to us?


Best wishes,
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
0
Bryce Godfrey
Top achievements
Rank 1
answered on 05 Oct 2010, 06:38 PM
Go ahead and disregard this, I switched over to the native bing silverlight sdk for the map portion of my app which is working well for me.  Thanks.
0
Tom
Top achievements
Rank 1
answered on 16 Nov 2011, 07:38 PM
I just reproduced the center data binding issue. If you data bind center, it works on initiallization and each time therafter until you re-center the map yourself through the UI. Then, the binding stops working.

As an example, we have a map that is databound to a grid. Each time a row is selected on the grid, we re-center the map to a location coming from the grid data. However, once we've interacted with the map and changed the center, the binding no longer works from the grid.
0
Andrey
Telerik team
answered on 21 Nov 2011, 08:58 AM
Hi Tom,

When the UI of map allows user to change the center then the binding will be broken, because the Center property will be changed. In this case the RadMap.Center property allows using two way mode binding only. So, I wouldn't recommend to bind the RadMap.Center property directly to controls like data grid or listbox.
I have attached a sample solution which uses binding of the Center property to a view model using two way mode. The view model contains Center property and additional BindableCenter property which allows to set the center from the listbox. I hope it helps.

Kind regards,
Andrey Murzov
the Telerik team

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

Tags
Map
Asked by
Bryce Godfrey
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Bryce Godfrey
Top achievements
Rank 1
Tom
Top achievements
Rank 1
Share this question
or