Custom panning. Cannot modify the return value of Center.

3 posts, 0 answers
  1. Jeroen
    Jeroen avatar
    49 posts
    Member since:
    Feb 2012

    Posted 11 Jun 2014 Link to this post

    I'd like to implement some custom panning buttons on my map.

    I've tried this by changing the Center property (as was recommended in another thread), but that doesn't seem to be allowed? I'm getting the following compilation error:

    Cannot modify the return value of 'Telerik.Windows.Controls.RadMap.Center' because it is not a variable.

    How should I approach this?
    I don't really care which method is used to implement the panning. I just want four buttons (left, right, up, down) that will pan the map accordingly and properly.
  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 12 Jun 2014 Link to this post

    Hello Jeroen,

    I suppose that you are trying to change Latitude and Longitude properties of the Center separately (something like radMap.Center.Latitude = 10;). You can't do it this way. You have to change RadMap.Center as following:

    radMap.Center = new Location(latitude, longitude);


    Regards,
    Andrey Murzov
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. DevCraft banner
  4. Jeroen
    Jeroen avatar
    49 posts
    Member since:
    Feb 2012

    Posted 12 Jun 2014 in reply to Andrey Link to this post

    Thanks! That was indeed the problem.
Back to Top