After upgrading to the latest public release, the following code does not work:
winformsMap1.ZoomIn(20);
The map appears to refresh, but the extent does not change.
Also, when the users zooms in with the native shift-click-drag method, if the rectangle is not significantly smaller than the current extent, the map will refresh but the extent does not change.
I changed the percent arguement to 60 like in the samples and that works.
Ed
Zoomin to small percentage does not work
Ed,
Thanks for your post and questions.
I think the problem is that we use the Snapping logic to keep the scale matching the 20 preset scales. I am not very sure which version you are upgrading from, while I know that we have this snapping logic since RC2.
Yes, as you said, if you change 20 to 60 as parameter for ZoomIn, you will zoom into the next zoomLevel instead of keeping the current zoomlevel.
If you do not care about the tile cache stuff, just a remider for you that you could change the behaviour of snapping:
winformsMap1.ZoomLevelSnapping = ZoomLevelSnappingMode.None;
Any more quesitons just feel free to let me know.
Thanks.
Yale
You are exactly right. I forgot I changed that property.
THanks,
Ed
Ed,
Another quick thing is that if you want to use caching but you want a little more granularity on the zoom levels you can check out this code community project. It should you how you can pass in our stock zoom levels and it will create a number of extra zoom levels between them. This way you can add one or two extra zoom levels in between our stock ones.
code.thinkgeo.com/projects/show/zoomlevels
David