Hello,
Why after applying "WinformsMap1.CurrentExtent.ScaleDown(20)" (Map Suite Desktop Edition 5.5), if I pan the map with the mouse, the display returns to the previous scale ?
Thank you in advance
Hello,
Why after applying "WinformsMap1.CurrentExtent.ScaleDown(20)" (Map Suite Desktop Edition 5.5), if I pan the map with the mouse, the display returns to the previous scale ?
Thank you in advance
Hello Eric,
Thanks for your post, this problem is because zoomlevel, when you use ScaleDown(20), that just decrease the size of the area shape by 20%, but that did not hit the scope of next zoomlevel, for example, we are now in zoomlevel1 and when I use ScaleDown(20), it isn’t reach zoomlevel2 but just between them, so when you pan the map, it will automatically choose a fixed zoomlevel.
Please try to ScaleDown(50) and it will fix this problem.
Regards,
Gary.
Thank you Gary,
It works with ScaleDown(50).
What is the correct value for ScaleUp(??), 50 has the same effect as 20 with ScaleDown.
Regards
Hello Eric,
As I said, because the scale up and scales down change the size by percentage, so it's hard to change back exactly by another percentage value.
There are three ways to resolve this problem:
First, use the ZoomIn and ZoomOut instead of ScaleUp and ScaleDown.
winformsMap1.ZoomIn(50);
winformsMap1.ZoomOut(50);
Second, record the CurrentScale when you raise the ScaleUp or ScaleDown,
scale = winformsMap1.CurrentScale;
then use winformsMap1.ZoomToScale(scale) to get it back.
Third, use
winformsMap1.ZoomToPreviousExtent();
I hope this helps you.
Regards,
Gary