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

How to limit panning region in RadMap

4 Answers 57 Views
Map
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ali
Top achievements
Rank 1
Ali asked on 27 Oct 2015, 01:37 AM

Hello,

How to limit panning region in RadMap ?

 

Thanks.

4 Answers, 1 is accepted

Sort by
0
Ivaylo Gergov
Telerik team
answered on 29 Oct 2015, 09:45 AM
Hello,

Thank you for your interest.

What I can suggest is to take advantage of the ViewChanged command and coerce the NewCenter value when it is out of the desired bounds.

Regards,
Ivaylo Gergov
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Ali
Top achievements
Rank 1
answered on 29 Oct 2015, 01:35 PM
Thanks Ivaylo.
0
Gratel
Top achievements
Rank 1
answered on 13 Dec 2016, 02:44 PM
 First of all, if you held down the arrow key so that it started panning rapidly, when it hit the edge, it wouldn't go all the way to the edge because due to the panning acceleration taking large "steps", the next "step" would have gone outside the bounds, so it doesn't take that last "step". So once it stopped, you could release the arrow key and then press it again, and it would pan just a little bit further. 

The solutions here left me with 2 issues. First of all, if you held down the arrow key so that it started panning rapidly, when it hit the edge, it wouldn't go all the way to the edge because due to the panning acceleration taking large "steps", the next "step" would have gone outside the bounds, so it doesn't take that last "step". So once it stopped, you could release the arrow key and then press it again, and it would pan just a little bit further. 

The solutions here left me with 2 issues. First of all, if you held down the arrow key so that it started panning rapidly, when it hit the edge, it wouldn't go all the way to the edge because due to the panning acceleration taking large "steps", the next "step" would have gone outside the bounds, so it doesn't take that last "step". So once it stopped, you could release the arrow key and then press it again, and it would pan just a little bit further. 

The solutions here left me with 2 issues. First of all, if you held down the arrow key so that it started panning rapidly, when it hit the edge, it wouldn't go all the way to the edge because due to the panning acceleration taking large "steps", the next "step" would have gone outside the bounds, so it doesn't take that last "step". So once it stopped, you could release the arrow key and then press it again, and it would pan just a little bit further. 

The solutions here left me with 2 issues. First of all, if you held down the arrow key so that it started panning rapidly, when it hit the edge, it wouldn't go all the way to the edge because due to the panning acceleration taking large "steps", the next "step" would have gone outside the bounds, so it doesn't take that last "step". So once it stopped, you could release the arrow key and then press it again, and it would pan just a little bit further. 

0
Lance | Manager Technical Support
Telerik team
answered on 13 Dec 2016, 09:54 PM
Hi Gratel,

The question and solution are related to limiting the region the user can pan to. For example, if your map was 1000px wide and you only want the user to be able to pan up to 250px of the edge.

The solution is to re-center the map programmatically when the user tries panning to an area you don't want them to go.

Can you please clarify what it is you seek help for so that we can better assist you?

Regards,
Lance | Tech Support Engineer, Sr.
Telerik by Progress
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 Feedback Portal and vote to affect the priority of the items
Tags
Map
Asked by
Ali
Top achievements
Rank 1
Answers by
Ivaylo Gergov
Telerik team
Ali
Top achievements
Rank 1
Gratel
Top achievements
Rank 1
Lance | Manager Technical Support
Telerik team
Share this question
or