Community of VE/MapPoint Users and Developers
This is a discussion on Dataset rendering within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, i'm using this method to add pushpins from a DataTable... Code: foreach(DataRow dr in dt.Rows) { try { MapPoint.Pushpin ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Dataset rendering i'm using this method to add pushpins from a DataTable... Code: foreach(DataRow dr in dt.Rows)
{
try
{
MapPoint.Pushpin pushpin = this.mMap.AddPushpin(this.mMap.GetLocation(lon,lat, "info");
pushpin.Symbol = 49;
pushpin.MoveTo(SP);
}
catch(System.Exception ex)
{
}
}
//where SP is MapPoint.DataSet SP
//and dt naturally is a DataTable from a .net DataSet
but this have two problems... first it's slow for a number of pushpins very hight like 5000 or 10000.... and second some pushpins are not added to the SP dataset... so their look is not the one i select (symbol 49) but is a black pushpin) Later when i try to remove the dataset from the map this pushpin still remains. Any one have a better nethid for do the same??? Any code i can watch to?? my regards, gianmaria |
| |||
|
Hi Gianmaria, I dont think you can improve it for speed. Maybe dont move them to a new dataset, but do this afterwards, then the drawing of the pushpins will be somewhat faster. Or limit the amout of added pushpins to the view in the map (only draw the ones that are visible, but then you have to make a system to draw the other ones when the user pan or zoom). I have no idea wy some of them are not add to the dataset or have a wrong symbol
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
Ok, the second problem is ok.. i just added an Applicatin.doEvents() after adding the pushpin to the dataset, it seemes that processing is too fast and some pushpin is not added in time.. strange but true. For first problem.. i dunno too.. it's really slow.. |
| |||
|
Hi, Good that the latter problem is solven. But the question is that so regulary people complain that there are problemes adding 10000 pushpins to the map. I can not imagine theat there is 1 user complenning that pushpin nuber 7899 is not right displayed... you get my point ?
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| dataset, rendering |
| ||||
| Posted By | For | Type | Date | |
| Dataset rendering - MapPoint Forums | This thread | Refback | 04-30-2008 09:03 AM | |
| Dataset rendering - MapPoint Forums | This thread | Refback | 04-30-2008 09:02 AM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Rendering graphics on top of the MapPoint Control | Anonymous | Development | 2 | 09-12-2007 09:39 AM |
| Optimize Custom Symbol Map Rendering Performance | gkirbo | MapPoint 2006/2009 Discussion | 21 | 05-09-2006 07:21 PM |
| Refreshing a dataset | TACEC | MapPoint 2006/2009 Discussion | 1 | 10-21-2005 01:08 PM |
| Shapes and rendering speed! | Anonymous | MapPoint 2006/2009 Discussion | 1 | 02-02-2004 05:16 AM |
| Map Rendering | priyands | MapPoint 2006/2009 Discussion | 2 | 01-15-2004 01:05 PM |