Hello! I've been working with the new Desktop Edition 3.0 for a few weeks now, and it works pretty well. There are however a few issues I've noticed that I'd like to bring up and hopefully someone can give me tips to resolve them, or if the problem isn't on my end perhaps they can be resolved before the final release.
At the company I work for we are using both your Desktop Edition and your Windows Mobile Edition. Using Desktop Edition 2.0 we were generating index (.idx) files for shape files before transfering them over to the mobile device, because of the performance improvements this provided for shape drawing. However, the index building funtion in 3.0 seems to cause shape files to no longer draw at all on the Think Geo Mobile map. Index building in 3.0 is also generating an .ids file, could this potentially be causing the shape file not to draw on Map Suite Mobile 2.0?
The WinFormMaps control in MapSuite 3.0 seems to steal the focus from other forms that are opened over it. Our program has several forms that are not modal and pop up over the map. If the form opens over the map, and the user tries to move their mouse over to the form, once their mouse goes over the map it steals the focus and the form the user was trying to interact with is minimized. This can be very frustrating for the user, who must minimize the main form (containing the map) to be able to get to the form they actually want interact with. This was not a problem in 2.0.
I'm a big fan of the new Layer.GetBoundingBox() function, and using it to set map.CurrentExtent to zoom to the full extent of layer is much nicer than the calculations I was having to do in 2.0. However, this technique doesn't always seem to work, particularly with layers that contain only a few points that are close together. Any ideas on why this wouldn't work?
Thanks in advance for any feedback you can provide on these issues.
Stephen, Welcome you to ThinkGeo Desktop Edition 3.0 forum!
Above of all, I want to make sure you are using the latest Desktop Edition 3.0.307 RC?
Hope my following answers can give you some helps.
1.About the Index problem.
About the MapSuite2.x and MapSuite3.x, there are huge differences. In MapSuite3.x, we supported multiple data source not only focusing on Shape File. I am sorry to say that the RTree file cannot be compatible with MapSuite2.x. That is to say that the RtreeIndex build in MapSuite3.x (.idx and .ids) cannot be used in MapSuite2.x and the RtreeIndex build in MapSuite2.x (.idx) cannot be used in MapSuite2.x (including PPC version). And In MapSuite3.x, the PPC version is not published yet.
2. About the focus problem in MapSuite3.x Desktop control.
In the latest version of MapControl, the control will take the focus only when your mouse enters the control, because after that we are ready to ZoomIn & ZoomOut when you mouse wheel.
I do not think in every mouse move it will take the focus from other control, it will only take it when you enter the MapControl from outside the control, and loose it when you exit the control (from inside to outside).
3. GetBoundingBox functionality in MapSuite3.x Desktop control.
I think the probably reason is because the default MapControl.ZoomLevelSnapping mode is snapped, that means it will only go and forth on 20 default scales zoomLevels.
If you are really want to change it, just try to turn it off by winformsMap1.ZoomLevelSnapping = ZoomLevelSnappingMode.None;
I am wondering if there is any way to shut off the focus stealing behavior as well. It is true that if the windows hovering above the map control intersects the map control and you hover over the section hovering over the map control, the focus stays on the form as intended.
However, if you do hover over the control even if the form containing the control is not focussed, the map and subsequently it's containing form will steal focus anyways. This is very annoying. It should be a toggle IMO, unless there is an easier way.
Thanks for the quick response Yale. Yes, I am using Desktop Edition 3.0.307 RC.
1. So basically the indexes in 3.x are not compatible with 2.x? Alright, I can deal with that.
2. The problem is that we are talking about small forms that pop up over the map control, so for the user to move their mouse to the new form they have to move their mouse over the map control. So the user’s mouse has to move over the map control to get to the new form (which has focus), at which point the new form loses focus and become minimized, so the user can not get to the new form without minimizing the map form first.
I understand that the map needs to have focus to be able to zoom with the mouse wheel, but if the map form is out of focus, you can’t assume that the user is trying to interact with the map rather than some other form. If this kind of focus stealing behavior is something you guys want to leave in then at least make it an optional property that can be toggled as Nelson suggested.
3. Turning off ZoomLevelSnapping doesn’t quite seem to have fixed my issue. Is there some other property setting a threshold that prevents zooming in to small extents?
2. about the stealing of Focus for the MapControl. I really think it is a good idea to have some option turned on or off to set the focus on the MapControl when the mouse enters, I will discuss your great ideas with my director, hopefully we can added it very soon if he agrees.
3. Before going further, I just want to make sure you set the correct MapUnit for your data. Because if the unit data is correct, the minimal scale it can goes to would be around 1100, I do not think this scale would be too small to zoom in.
Any all, there is another property called MinimumScale in the MapControl you can play with to prevent zooming in to a too small extent if you want.
One thing I want to point out is that if you set the MinumScale to 0, then when you continue to zoom in very low scale, it will probably cause some unexpected problems, however it seems also depends on your data.
Item #2 is still reproducible with 3.0.335 and it’s reported by my user as a major bug … They simply cannot print because de printer preview form goes behind the map …
I have submitted this issue to my director and I will discuss with him about the final solution, and hopefully we can add this functionality very soon.
And I will let you know as soon as possible after we reach the solution.
I just upgraded to 3.0.362 and the focus stealing still seems to be an issue.
I was hoping a boolean flag would be added to the API that allows the focus stealing to be toggled on and off, but I looked and did not see one. Perhaps I overlooked it?
Please let me know if this exists, or if there is some other work around as this is a significant problem for my software.
1. I see this as a bug … so why is there an enumeration to set; in other words, what can be the advantage of AutoFocused ? 2. Is there a public version planed by the end of the month, if no I’ll need a temporary build.
1) For a long time, we are using the mode of AutoFocused without ManullyFocused. And for a most majority of simple applications, the AutoFocused mode will be much easy to use, there is no need to set the focus on MapControl focus manually, it would be set by entering the MapControl automatically.
In fact, you guys are the first to report this issue and complaining about it, and we found a way to fix this problem while keep the most majority application still take the easy to use.
2) It is probably we will have a public release by the end of this month, while still I suggest you take a temporary build (3.0.382 latest one probably). I think there are great changes between 3.0.362 with 3.0.382 while fixed some minor bugs.
after setting winformsMap1.MapFocusMode = MapFocusMode.ManuallyFocused the map does no longeur move to top Z order at any time, which is what we were expecting.
However, the mouse’s wheel does no longuer zoom … which is a regression for us.
We cannot do the two different behaviors at the same time, if you want to use the MouseWheel to make it ZoomIn, you have to set it focused.
Original the default behavior for MapControl will set the Map focused automatically when you mouse enter the MapControl. Now, you changed the behavior to ManuallyFocused, so, before making the MouseWheel works in MapControl , you have to set the focus on the MapContrl first.
My suggested solution for you is, setting the MapControl in the MapClick event: