Preview GeographicalBounds of other zoom levels

2 posts, 1 answers
  1. Sebastian
    Sebastian avatar
    8 posts
    Member since:
    Jun 2014

    Posted 11 Jun 2014 Link to this post

    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
  2. Answer
    Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 16 Jun 2014 Link to this post

    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.
     
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top