PDA

View Full Version : Pushpin speed



workinonit50
09-16-2011, 01:16 PM
I have a VB6 application that uses mappointcontrol.ocx placed on a vb form. I place 1000 pushpins on the map to signify various items. The application gathers information and changes the pushpins based on the data received. When a lot of data is coming in and many pushpins are changing, the speed at which the pushpins change is slow. Using Mappoint 2006 there is no slow down, but with 2010 and 2011 the slow down is very noticable. The odd thing is when I move the mouse off of the map onto the vb form, the speed at which the pushpins change greatly increases. When the mouse is on the map, I can not find any event that is firing to cause the slow down.

Does anyone know why this is happening and how to fix it?

Thanks.

Winwaed
09-19-2011, 09:25 AM
Visual updates can slow a lot of these types of operations. Each pushpin is probably causing the map to redraw - especially if the mouse is nearby of the map has focus. You could try hiding MapPoint during the update process? I bet that will be a lot quicker, although it might not look 'good' to the user. Perhaps display a dialog box saying "Updating" during the hide&update?


Richard

dudel
09-20-2011, 10:30 AM
A couple of ideas.

1) turn off the refresh, and do a refresh based on the some modulo of the number of records processed. For example, you could do your refresh every 500 records or whatever seems reasonable for your app. That would still do refreshes; but not as frequently.

2) how are you running through the pins? If you are placing them on the map each time, using lattitude/longitude is much quicker then having to determine the location based on address. Once they are on the map, it's much quicker to run through the pushpin collection making changes rather than reloading. When I run the pushpin collection, I hardly notice any slowdown even when going through 30k-50k pins. Loading 30k pins however, takes a while, and I have to do a number of tricks to make it appear responsive.

Part of the slowdown is the interaction between VB / .NET and the MapPoint objects. I've heard there is a major performance improvement if the MapPoint code is implemented as a MapPoint addon. Of course that means you need to install MapPoint on all the machines, when all you might need is the control.

HTH

don

workinonit50
09-20-2011, 11:27 AM
Since the map is also used for driving and the number of pushpins to be updated at any given time is unknown, refreshing at a certain interval or hiding/unhiding is not an option.

I solved the problem by installing MP 2006 on all machines since this version does not have the issue. I then copied the map data from 2011 into the 2006 version. I loose all of the features of the newer versions, but I could not use those anyway for backwards compatability. The map data is what is most useful to me.

Thanks for the suggestions.

marcick
09-21-2011, 01:31 AM
could you please specify, step by step, how did you copyed map data from MP2010 to 2006 ?
Marco

workinonit50
09-21-2011, 08:38 AM
could you please specify, step by step, how did you copyed map data from MP2010 to 2006 ?
Marco

1. Install MP 2006 in the default directory
2. Copy all the files in the data directory of the 2010/2011 CD: ...MapPoint/MSMap/PFiles/MSMap/Data
3. Paste these files in c:\program files\microsoft mappoint\data

marcick
09-21-2011, 08:46 AM
I'll try, thanks
Marco

marcick
09-22-2011, 07:30 AM
I have tryed to copy map data from MP 2011 to MP 2010. I see in the folder the same number of files with the same name. But when I run MP I get the error that the map data version does not correspond.
Probably the trick only works with MP2006 core.