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

Preview GeographicalBounds of other zoom levels

1 Answer 61 Views
Map
This is a migrated thread and some comments may be shown as answers.
Sebastian
Top achievements
Rank 1
Sebastian asked on 11 Jun 2014, 08:16 PM
Hi,

I have a Rad Map control onto which is displayed a group of 5 circles. These circles represent contour lines around a central point. Each contour lines is equally distanced from its neighbours. Radius values (that is, the distance from the central point to each contour line) are shown on the edge of each contour line.

I also have a Rad Slider for changing the zoom level of the map.

Every time the user changes the zoom level, layout of contour lines is refreshed and radius values are recalculated accordingly. You can see this behaviour in the attached file.

I would like to change the look of the ticks of my slider so that, next to each tick, the expected future radius value of the largest of the circles is displayed.
Each time the zoom level changes, all radius values (including the largest one) are calculated using the GeographicalBound property.

If I could "preview" the GeographicalBounds resulting of zooming directly to each level, it would be wonderful. Is there a way to know, in advance (that means, without actually changing the zoom level), what the map's GeographicalBounds will be for each zoom level?

Thanks,

Sebastien

1 Answer, 1 is accepted

Sort by
0
Accepted
Andrey
Telerik team
answered on 16 Jun 2014, 01:48 PM
Hi Sebastian,

You can use the MapMathHelper.GetGeoSizeAtZoomLevel method for calculating the geographical size of viewport according to base point, zoom level and pixel size of viewport. But note that the calculations could be not accurate for low zoom levels, because the base point is not the center. It is the left-top point of the calculated region.

Regards,
Andrey Murzov
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
Map
Asked by
Sebastian
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or