GetBestSize() does not work if Bird's Eye view is on

2 posts, 0 answers
  1. Alex Fioletov
    Alex Fioletov avatar
    7 posts
    Member since:
    Jul 2009

    Posted 10 Oct 2012 Link to this post

    I use Bing provider. If I turn on Bird's Eye view and try to call GetBestView() for my layer I get exception:

    System.ArgumentException was caught
      Message=Value does not fall within the expected range.
      StackTrace:
           at System.Windows.Size.set_Height(Double value)
           at Telerik.Windows.Controls.RadMap.GetGeoSize(Location basePoint, Size pixelSize)
           at Telerik.Windows.Controls.Map.InformationLayer.GetBestView(IEnumerable`1 itemsList, Boolean useElementSize)
           at Telerik.Windows.Controls.Map.InformationLayer.GetBestView(IEnumerable`1 itemsList)
           at Accellos.SkyTracker.WUI.Mobile.Controls.DriversMap.SetBestView(InformationLayer layer)
      InnerException:

    My layer contains 4 MapPinPoint objects. Three of them are on the East coast, on is on West. Nothing special.

    Version of controls 2011.2.1031.1040
  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 15 Oct 2012 Link to this post

    Hello Alex,

    The Birds Eye mode operates using specific projection which is not world-wide. It is limited with current visible birds-eye region. In your case the points (at least those on the east coast) are outside of the visible region, which produces errors in calculations. So, I would recommend that you switch map mode to Aerial or Road before calculating the best view.

    All the best,
    Andrey Murzov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
Back to Top