MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




What causes the MapPoint Control to stop scrolling?

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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion > Development

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack (1) Thread Tools Display Modes
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 08-31-2007
Junior Member
White Belt
 
Join Date: Aug 2007
Posts: 7
What causes the MapPoint Control to stop scrolling?

It's been a while since my last MapPoint programming, so please bear with me. Using MP 2006 just now.

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 08-31-2007
Senior Member
Blue Belt
 
Join Date: Dec 2002
Posts: 249
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 08-31-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
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 ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 09-03-2007
Junior Member
White Belt
 
Join Date: Aug 2007
Posts: 7
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 09-03-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 09-03-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 09-03-2007
Junior Member
White Belt
 
Join Date: Aug 2007
Posts: 7
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8 (permalink)  
Old 09-03-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
Re: What causes the MapPoint Control to stop scrolling?

Hi,

Quote:
In fact it's actually worse when zoomed in, though
Yes. But the lack of details is my only logical explanation for it...

Quote:
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"?
well I think that the cursor in the corners (so for scrolling) cannot change.

Quote:
about transparent panels, I guess it would be hard to make them match the arrow displayed at all times
No. Each window (form, panel, whatever) can you give a cursor for its own (it's a property).

Quote:
Or do you mean putting them beyond the control's borders to ensure scrolling still occurs when the user has lost the control boundaries?
No I mean "On" top of the map, all aligned to the borders of the map that so if user resize map they stay on correct position. As soon as the mouse hoover over the panel, cursor will change to your selected one for each of the panels.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9 (permalink)  
Old 09-03-2007
Junior Member
White Belt
 
Join Date: Aug 2007
Posts: 7
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10 (permalink)  
Old 09-10-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
control, mappoint, scrolling, stop


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/what-causes-mappoint-control-stop-scrolling-6199.html

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -5. The time now is 07:03 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55