Community of VE/MapPoint Users and Developers
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 ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Shapes.AddPolyline is very slow 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? |
| |||
|
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
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| ||||
|
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 |
| |||
|
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. |
![]() |
| Tags |
| shapesaddpolyline, slow |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| 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 |