Community of VE/MapPoint Users and Developers
This is a discussion on What causes the MapPoint Control to stop scrolling? within the Development forums, part of the MapPoint 2006/2009 Discussion category; It's been a while since my last MapPoint programming, so please bear with me. Using MP 2006 just now. Probably ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| What causes the MapPoint Control to stop scrolling? Probably something well known and obvious, but I couldn't find an answer to my issue searching these forums and the rest of the web. I created a simple form and tacked a MapPoint control on it. (my first steps, obviously...) It essentially works fine, but every now and then, scrolling will just come to a halt even when I keep the mouse key pressed. (The MouseUp event doesn't fire) The problem gets worse the more I zoom in, and if I'm on city level scrolling will usually just make a tiny bump before it stops, forcing me to reinitiate scrolling by releasing the mousekey and pressing again, at which point it will again make a little movement and come to another halt ... etc. What causes this issue? Any obvious way around this? I figure I could disable "official" behavior and code my own movement handling, but I wonder if that issue shouldn't be easy to fix, somehow... Any ideas? Thanks in advance MarcoK |
| |||
| Re: What causes the MapPoint Control to stop scrolling?
Interesting; good question. I'm going to take a wild guess and say it is a cross between allocation of memory and window/mouse messages interfering with each other. Notice what happens without the mouse: MapPoint Spinning Globe Sample Mike Mattys |
| |||
| Re: What causes the MapPoint Control to stop scrolling?
Hi, I agree with Mike. However as far as I recall, the windows message queue has room for 10240 messages. I don't know how many messages are posted per second when pressing and holding the mouse button down (hmm interesting to know however). What is CPU load at that moment and eventually other programs running ?
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Re: What causes the MapPoint Control to stop scrolling?
That Spinning Globe example fails to run in VS.NET 2005. I'll try to implement my own keyboard based scrolling and I expect it to run, but that wouldn't really solve the issue. As for CPU load, it's pretty high, between 95% and 100%, most of the time the latter. However, upon experimenting at maximum zoomout I noticed some weird patterns. For example, the control will NEVER (thied ample times) hang when I stay far north so that basically the pole is rotated and I always have a lot of land on screen. However, the control will ALWAYS hang when running into the pacific and atlantic if I try to focus on the southern hemisphere. I can usually scroll across South America or Africa in one go (not always though), but then it'll hang again when faced with the next ocean. No such "luck" when being zoomed in, though. Then the hangs seem pretty random and happen at a very annoying pace everywhere. Edit: Is there a way to tell which arrow pointer the control is displaying? I tried with "MousePointer", but it always returns the default one, so is not a big help. _______ MarcoK Last edited by MarcoK; 09-03-2007 at 03:06 AM. |
| |||
| Re: What causes the MapPoint Control to stop scrolling?
Hi, I did a test, and yes I see exactly same problem. With the control, but also with the the standalone executable. MP2006 but did try also MP2004 and it has same problem. Problem is probably due to detail. Above the see their is no detail, same count for Africa. Probably same problem in east Europe (did not try). That is also the reason that the problem persist when zoomed in.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Re: What causes the MapPoint Control to stop scrolling?
Hi, About the mouse pointer. Yes you pick right property but it will probably not work when you are on the borders of the map. However there are always workarounds. If you put on the borders 8 transparent panels, then you can display the pointer of your choice when mouse is hoovered over these panels.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Re: What causes the MapPoint Control to stop scrolling?
Well, if details (or lack thereof) were the problem, the control shouldn't hang at all when zoomed in and there's lots and lots of stuff to display. In fact it's actually worse when zoomed in, though... Also, could you please elaborate a bit on the MousePointer issue? If I picked the right property, how do I tell which arrow it is displaying if all I ever get as a return value is "Default"? Edit: Oh, and about transparent panels, I guess it would be hard to make them match the arrow displayed at all times, so I would prefer checking the cursor instead. Or do you mean putting them beyond the control's borders to ensure scrolling still occurs when the user has lost the control boundaries? Thanks for taking the time to reply. ______ MarcoK |
| ||||
| Re: What causes the MapPoint Control to stop scrolling?
Hi, Quote:
Quote:
Quote:
Quote:
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Re: What causes the MapPoint Control to stop scrolling?
Doesn't the fact that it doesn't actually happen that way when zoomed in make the theory less logical, though? ![]() About the mouse cursor issue ... I'm afraid I somehow don't get what you mean. At least not completely. As it is now (unmodified), the control changes the mouse cursor to various arrows depending on where the mouse is located and whether or not the mouse is being clicked. If I overlay the control with transparent panels with custom cursors onmouseover, I take it that would override the default behavior, but wouldn't that also basically FORCE me to write a completely custom handling? I realize I might have to do this eventually, but I'd prefer if I could keep out-of-the-box behavior intact as much as possible. What I was inquiring about was: How do I determine which cursor is currently displayed? The cursors ARE changing already, my preferred workaround would thus be to simply check which cursor is displayed and act accordingly. Naturally, I guess transparent panels would work, but it would involve a lot more custom handling to imitate behavior the control already includes. ______ MarcoK |
| |||
| Re: What causes the MapPoint Control to stop scrolling?
Hi, MousePointer property seems not to change when the bitmap changes to the Pan arrow. As for the custom code it is not too hard. Only some code to change mousepointer depending where it is on the panel, and on mouse key down creation of a timer that excutes a Pan method every few milliseconds. Destroy timer in onMouseUp.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| control, mappoint, scrolling, stop |
| ||||
| Posted By | For | Type | Date | |
| Map Visitors - Powered by Virtual Earth | This thread | Refback | 09-04-2007 06:11 PM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Re: Keyboard control in mappoint activex control | djcapslock | MapPoint 2006/2009 Discussion | 1 | 03-10-2005 11:16 AM |
| Stop User from exiting | Anonymous | MapPoint 2006/2009 Discussion | 1 | 11-02-2004 10:37 AM |
| How to stop MapPoint from selecting a wrong address? | Anonymous | MapPoint 2006/2009 Discussion | 1 | 06-09-2004 09:03 AM |
| Need help with map scrolling arrows please! | Anonymous | MapPoint 2006/2009 Discussion | 2 | 09-09-2003 11:29 AM |
| Map scrolling | Anonymous | MapPoint 2006/2009 Discussion | 2 | 07-28-2003 04:27 AM |