Hi All,
I am currently using ZoomLevelScales to set my zoom levels and I see that it is deprecated in 5.0. I tried changing my code to ZoomLevelSet.ZoomLevel01.Scale = aDouble (for all zoom levels) but the PanZoomBar does not reflect the new scales. I set the scales for every zoom level for every layer but I still cannot get it working. Setting the MaximumScale to the same scale as ZoomLevel01 puts the PanZoomBar at around 50% zoomed out, rather than the 100% I would expect (because I set the MaximumScale at 500000). How do I sync the PanZoomBar's scales with ZoomLevel's scale?
Old Code:
double maxScale = 5000000;
for (int i = 0; i < 20; i++)
{
Map.ZoomLevelScales.Add(maxScale);
maxScale = maxScale / 2;
}
New Code:
double startingScale = 500000;
Map.MaximumScale = startingScale;
double scale = startingScale;
Collection<ZoomLevel> levels = Map.ZoomLevelSet.GetZoomLevels();
foreach (ZoomLevel level in levels)
{
level.Scale = scale;
scale = scale / 2;
}
I have also tried setting them explicitly like: Map.ZoomLevelSet.ZoomLevel01.Scale = scale;
Thank you for any assistance you can give me.