Map/Zoom to given GeoBounds ?

2 posts, 0 answers
  1. ddewaleffe
    ddewaleffe avatar
    1 posts
    Member since:
    Aug 2012

    Posted 23 Oct 2012 Link to this post

    We are using the Map to display information through an information layer containing shapes for cities.
    When we choose a set of cities, and use the BestView(), the map displays what is intended, however there is a large margin around the cities of interest. I would like to make the best use of the screen estate we have and thus avoid this margin.
    I have a hand the bounding boxes for the cities and can easily combine them to compute a bounding box for the area of interest.

    How can I set the Map/information layer from code so that the view is delimited by those geographical cordinate and that the interesting area fills the view?



  2. Andrey
    Andrey avatar
    1681 posts

    Posted 24 Oct 2012 Link to this post


    You can use the RadMap.SetView method. The zoom levels, however, are discrete, so this method cannot perform a perfect "zoom to fit".

    Kind regards,
    Andrey Murzov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top