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

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

1 Answer 20 Views
Map
This is a migrated thread and some comments may be shown as answers.
Alex Fioletov
Top achievements
Rank 1
Alex Fioletov asked on 10 Oct 2012, 05:04 PM
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

1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 15 Oct 2012, 06:49 AM
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.

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