MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Dataset rendering

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


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 (2) Thread Tools Display Modes
  2 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 06-07-2005
Member
Yellow Belt
 
Join Date: Dec 2004
Posts: 44
Dataset rendering

Hi,
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
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 06-08-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
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
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 06-09-2005
Member
Yellow Belt
 
Join Date: Dec 2004
Posts: 44
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..
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 06-09-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
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 ?
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
dataset, rendering


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/dataset-rendering-4217.html

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

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


All times are GMT -5. The time now is 12:17 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