MVVM and RadMap

5 posts, 0 answers
  1. Bryce Godfrey
    Bryce Godfrey avatar
    2 posts
    Member since:
    May 2010

    Posted 01 Oct 2010 Link to this post

    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?
  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 05 Oct 2010 Link to this post

    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
  3. DevCraft banner
  4. Bryce Godfrey
    Bryce Godfrey avatar
    2 posts
    Member since:
    May 2010

    Posted 05 Oct 2010 Link to this post

    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.
  5. Tom
    Tom avatar
    1 posts
    Member since:
    Nov 2011

    Posted 16 Nov 2011 Link to this post

    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.
  6. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 21 Nov 2011 Link to this post

    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 >>

Back to Top
DevCraft banner