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

Map/Zoom to given GeoBounds ?

1 Answer 83 Views
Map
This is a migrated thread and some comments may be shown as answers.
ddewaleffe
Top achievements
Rank 1
ddewaleffe asked on 23 Oct 2012, 09:02 AM
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?

Regards,

D.


1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 24 Oct 2012, 12:03 PM
Hello,

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.

Tags
Map
Asked by
ddewaleffe
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or