MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Shapes.AddPolyline is very slow

This is a discussion on Shapes.AddPolyline is very slow within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I've inherited some code using mappoint. The code displays contour lines on the map using Shapes.AddPolyline, but it is very ...


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

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



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-26-2006
Junior Member
White Belt
 
Join Date: Jan 2006
Posts: 2
Shapes.AddPolyline is very slow

I've inherited some code using mappoint.

The code displays contour lines on the map using Shapes.AddPolyline, but it is very slow!

It appears that in the loop that adds all the lines, every time one is added the map has to redraw. I think that is what is taking all the time.

I've experimented with setting the control invisible before adding the lines, and then making it visible afterwards, and that does make things faster (about 3x faster), but it is still very slow.

Is there anything I can do to make this faster?
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 01-26-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
Hi,

I think so but it can be little tricky. Here some idea walking trough my brain at the moment:

- Make a transparant form with exact size and position as the form where mappoint is sitting on and draw the lines on that form while it is also invisible. Then when ready set visible.

- copy the map to clipboard and then copy it to some bitmap image sitting on a new form. Also while ivnisible draw the lines on that image, then set visible.

- open a second map with exact same lat/lon/alt, set invisible, draw the lines, switch forms. Speed will be same as in yoru case but at least the screen would not flikker because setting the map temporary invisible.

Maybe one of the idea's brings up better ones
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 01-26-2006
Winwaed's Avatar
Mapping-Tools.com
Red Belt
 
Join Date: Feb 2004
Posts: 901
Blog Entries: 10
Also try reducing the number of nodes (points) and/or number of shapes if possible. If found this led to a huge speed up for my GridImp product.

This drew lots of squares with common edges and corners. By merging squares of the same colour, duplicated corners are removed - some completely. The speedup was greater than the <4x that you would expect.


Richard
__________________
Winwaed Software Technology LLC
http://www.winwaed.com
See http://www.mapping-tools.com for MapPoint Tools
Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009
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 01-26-2006
Junior Member
White Belt
 
Join Date: Jan 2006
Posts: 2
Thank you all for your comments. My conclusion is that MapPoint isn't really suitable for this kind of usage.

Basically, we need to be able to deal with a lot of very detailed contours very quickly.
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 01-27-2006
Junior Member
Yellow Belt
 
Join Date: Oct 2005
Posts: 13
MapPoint is very slow to draw polygons, so I draw polygons by myself with GDI on the gif of MapPoint map.

If you want to use only MapPoint drawing functionallity, if i remember set map invisible and go to lat lon (0,0), and then, after drawing, I return to the correct position.
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
shapesaddpolyline, slow


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
Addpolyline , Array , Visual Basic and Other languages Anonymous MapPoint 2006/2009 Discussion 2 08-26-2004 04:58 AM
VB .NET is so slow! Anonymous MapPoint 2006/2009 Discussion 2 07-28-2004 04:17 AM
moving through recordset is slow stephenmillington MapPoint 2006/2009 Discussion 0 07-07-2004 06:28 AM
MP 2004 really slow with large custom territories Anonymous MapPoint 2006/2009 Discussion 4 02-04-2004 07:21 AM
addpolyline Anonymous Wish List 2 04-25-2003 04:50 PM


All times are GMT -5. The time now is 07:04 PM.


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