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

Zoom map to MapPolygon extent

1 Answer 74 Views
Map
This is a migrated thread and some comments may be shown as answers.
Nuno
Top achievements
Rank 1
Nuno asked on 29 Sep 2010, 07:07 PM

Hi all,

How can I set the map extent to a MapPolygon GeographicalBounds ?
I need to make my MapPolygon fit as perfectly as possible the screen.

When I use:

radMap.SetView(polygon.GeographicalBounds);
i can see the map centered on the MapPolygon But zoom level is still to low because I see all MapPolygons around.

Any ideas?

Thank you,
Nuno Senica

 

1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 01 Oct 2010, 03:57 PM
Hi Nuno,

We have checked the functionality of the RadMap.SetView method. It works correctly. The zoom levels, however, are discrete, so one cannot perform a perfect "zoom to fit". One possible approach here would be to zoom the map in by one level after using SetView. In this case, some edge of polygon should be out of view.
If this does not seem to help could you, please, create sample solution which demonstrates the problem and send it to us?

Sincerely yours,
Andrey Murzov
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Tags
Map
Asked by
Nuno
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or