If my user has zoomed the map to where they have a full county displayed, how can I retain that same map content as the form is resized. In your default operation, when I drag the form larger, 1) the county stays at the same visual size (same size in screen coordinates), and it doesn't center in the new form. I want to emulate the behavior of other systems such that if a county fills the map window at one form size, and the form is resized, that the county would fill (and be centered in) the newly sized form. Is that a setting on the control? Or is it something I have to implement?
Retaining same content during resize
Ted,
How funny! You know in Map Suite 2.x we had it coded the way you described and whenever you resized we always showed a least what you saw before though we may display more depending on the new height to width ratio. That was the most complained about thing in 2.x so when we did 3.x we modeled ourselves after more what Google Maps and Virtual Earth do which is to retain the same scale and upper left point. It is allot more work to do it the old way and you are the first person to give us feedback on this.
To answer your question there is not a property or anything as we do not now have that as an option. Off the top of my head I am not sure how you could do this manually though I am petty sure we can add this feature so you would have the choice. Let me ask some of the developers and see what we could do, my first preference is that if we can get some code and have you bolt it on then let’s do that first so you can get past this and then we can see about adding the official feature.
David
I have no problem bolting in on, but I could not figure out how. My kludge would be to keep a “last known extent” object lieing around that would get updated any time the map was redrawn. I think there is an event I could grab for that. Then, on the resize event, I would zoom to the “last known extent”, in order to keep the map they way you did it in 2.x. I’ve been showing our focus group a test app built with 3.x, and they were pretty consistent in their view that “we want the resize to keep the same view”, as it does in the app we are replacing.
Hi Ted,
I’m with you, I’d like to see this handled. I have 3 other GIS systems on my box at the moment and they all work this way, make the window bigger, make the map bigger!
We had to use the ResizeBegin and End events to do this and it’s still not quite there, but it’s what the users want.
David, what about a property in the winformMap to control this behaviour like MaintainExtentOnResize?
Regards
John
Guys,
I talked to the developers and they said we could work it in for the next release around the end of the month. We will have a new enumeration to control it. Any ideas on what the two names would be? Just to short circuit another question we almost always use enumerations instead of boolean values as enumeration are flexible for future expansion and booleans can be hard to read especially as parameters. I have thinking…
ResizeType
PreserveScale
PreserveExtent
The preserve scale is what we have now. When you make the form bigger or smaller you see more or less and the scale is maintained. The preserve extent is what you guys want and what is does it ensure that no matter how large or small you make the make the extent is maintained and to do this we have to jump scales. I was a little confused by one comment on “if the map gets bigger show more” or something. This is what we currently do. If we maintain the extent then making the map bigger or smaller will not change the features that are drawn. I just wanted to clarify this to make sure there is no confusion.
David
I would see three options, David.
PreserveScale – What you have now
PreserveScaleAndCenter – same scale, but always keep the center of the map before resizing as the center after resizing
PreserveExtent – What John and I have asked for.
I like your logic on using enumerations rather than booleans. I think your PreserveExtent enumeration proposal concisely describes what we want to see.
Thanks!
Ted,
I like the third option. I think this is what Virtual Earth or Yahoo does. I will make sure to add that one. Just another reason not to use booleans!!
David
Hi David,
I’m with Ted on this one, 3 options looks good.
Regards
John
Hi David,
I’m just starting to play around with MapSuite 3.0…this is the first issue I came across. We use ESRI ArcEngine for heavy GIS work in house and I’m looking at a lighter weight (and cheaper) solution for our customers to use. ESRI by default keeps the same viewable extent when you resize a window and our users will be expecting that. Glad to hear you are adding the behavior back in!
Thanks
Brian
Brian,
Welcome to the Map Suite community. Let us know if there is anything we can help you with. You will find that we are driven by user feedback and have a good turn around time when we can on requested features. We aren’t afraid to write code samples here in the forums as well so if you need help don’t hesitate to ask. Our job in the forums is to make sure you have a great experience with Map Suite and we are not shy about it.
David
David,
Has this functionality been implemented in the Release Candidate? I was not able to find any information on this functionality in the API Documentation or the Change Logs.
Steve,
Yes it is in there. We have all the choices we discussed here in the forum like preserve scale, preserve extent, and preserve scale and center. I think it is something like Map.ResizeMode, I don’t have the API in front of me at the moment but I am 100% sure it is in there.
David