I have a TrackBar Control (MapScaleBar) with 10 values and am attempting to change the CurrentScale using the following code:
double NewZoomLevel = 5000.00; //0
switch (MapScaleBar.Value)
{
case 1:
NewZoomLevel = 7500.00;
break;
case 2:
NewZoomLevel = 15000.00;
break;
case 3:
NewZoomLevel = 25000.00;
break;
case 4:
NewZoomLevel = 40000.00;
break;
case 5:
NewZoomLevel = 50000.00;
break;
case 6:
NewZoomLevel = 70000.00;
break;
case 7:
NewZoomLevel = 90000.00;
break;
case 8:
NewZoomLevel = 150000.00;
break;
case 9:
NewZoomLevel = 300000.00;
break;
case 10:
NewZoomLevel = 800000.00;
break;
}
MapControl.CurrentScale = NewZoomLevel;
But it doesn't change. The CurrentScale remains as before with no change.
MapControl.CurrentScale = 72093.7243652344
NewZoomLevel = 50000.0
What am I doing wrong? Thanks!!
bob