How to limit panning region in RadMap

Thread is closed for posting
5 posts, 0 answers
  1. Ali
    Ali avatar
    6 posts
    Member since:
    Dec 2012

    Posted 26 Oct 2015 Link to this post

    Hello,

    How to limit panning region in RadMap ?

     

    Thanks.

  2. Ivaylo Gergov
    Admin
    Ivaylo Gergov avatar
    686 posts

    Posted 29 Oct 2015 Link to this post

    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
  3. Ali
    Ali avatar
    6 posts
    Member since:
    Dec 2012

    Posted 29 Oct 2015 in reply to Ivaylo Gergov Link to this post

    Thanks Ivaylo.
  4. Gratel
    Gratel avatar
    5 posts
    Member since:
    Dec 2016

    Posted 13 Dec 2016 Link to this post

     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. 

  5. Lance | Tech Support Engineer, Sr.
    Admin
    Lance | Tech Support Engineer, Sr. avatar
    309 posts

    Posted 13 Dec 2016 Link to this post

    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
Back to Top