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

Custom panning. Cannot modify the return value of Center.

2 Answers 32 Views
Map
This is a migrated thread and some comments may be shown as answers.
Jeroen
Top achievements
Rank 1
Jeroen asked on 11 Jun 2014, 01:56 PM
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 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 12 Jun 2014, 05:12 AM
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.
 
0
Jeroen
Top achievements
Rank 1
answered on 12 Jun 2014, 08:40 AM
Thanks! That was indeed the problem.
Tags
Map
Asked by
Jeroen
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Jeroen
Top achievements
Rank 1
Share this question
or