MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Drawing a large number of pushpins

This is a discussion on Drawing a large number of pushpins within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, i'm using a faunction to draw a set of pushpins in this way: Code: foreach(DataRow dr in DataSet.Rows) { ...


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 (10) Thread Tools Display Modes
  10 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 08-11-2007
Member
Yellow Belt
 
Join Date: Dec 2004
Posts: 44
Lightbulb Drawing a large number of pushpins

Hi,
i'm using a faunction to draw a set of pushpins in this way:

Code:
 foreach(DataRow dr in DataSet.Rows)
{

     MapPoint.Location loc = this.mMap.GetLocation(Lat, Lon, 1);
     MapPoint.Pushpin pushpin = this.mMap.AddPushpin(loc,"");
     pushpin.Name = Name;
     pushpin.MoveTo(SP);
}
SP is a MapPoint.Dataset i use it so user after drawing can simply make some operations on the entire DataSet.

The problem is that this drawing can be operated on large numbers of pushpins (7000-20000) and the time to wait is very long.
Someone have solved this problem in other ways?

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 08-11-2007
Senior Member
Blue Belt
 
Join Date: Dec 2002
Posts: 248
Re: Drawing a large number of pushpins

Hi Gianmaria,

Look for pages with importdata on this site.
Here's one ImportData

Mike Mattys
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 08-20-2007
Member
Yellow Belt
 
Join Date: Dec 2004
Posts: 44
Re: Drawing a large number of pushpins

Hi Mike,
thanks for your answer. I've already used this importi way.. creating a CVS file.. it works fine but dont fit my needs. Every Pushpin i have to draw have a name and a custom symbol too.

Any idea?
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 08-20-2007
Senior Member
Blue Belt
 
Join Date: Dec 2002
Posts: 248
Re: Drawing a large number of pushpins

No. I have to wait for the code loop through all pins, too.
Another one for the wish-list ...
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 08-21-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,112
Re: Drawing a large number of pushpins

Hi,

what if you just draw the pushpins in view ? It will take some calculations but not impossible...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 08-24-2007
Member
Yellow Belt
 
Join Date: Dec 2004
Posts: 44
Re: Drawing a large number of pushpins

In view? You mean that when i change the zoom i draw something else or clear some other?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 08-24-2007
Eric Frost's Avatar
Senior Member
Black Belt
 
Join Date: Jul 1992
Posts: 2,470
Blog Entries: 1
Re: Drawing a large number of pushpins

Yes, it is this exactly. You could do it with a COM Add-in that would read all the data into a dataset. The COM Add-in would trigger whenever this is a map view change event. Above a certain Altitude it would not draw anything.

You need to get the lat/lons of the corners of the currently visible map. Then query and say any lat/lons that fall in the extents of the map should be displayed.

Note that since the earth is a sphere, it's not flat so the longitude (X coordinate) or the lower left will not be the same as the upper left. So for longitude, use whichever one is higher (or lower depending on your hemisphere).

Do I have this right? What am I missing? I think it shouldn't take more than four hours to figure out and program.. the first thing I'm not sure of off the top of my head is how to get the coordinates of the corners but I seem to remember there being a solution posted for this.

hope this gives you some ideas!
Eric
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8 (permalink)  
Old 09-10-2007
Member
Yellow Belt
 
Join Date: Dec 2004
Posts: 44
Re: Drawing a large number of pushpins

Nice. I will try to code and will post it after doing, maybe this ca be usefull for someothers.

Txs
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
  #9 (permalink)  
Old 09-10-2007
Eric Frost's Avatar
Senior Member
Black Belt
 
Join Date: Jul 1992
Posts: 2,470
Blog Entries: 1
Re: Drawing a large number of pushpins

Cool good luck - let us know if you run into any problems.

Eric
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
drawing, large, number, pushpins


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/drawing-large-number-pushpins-6158.html

Posted By For Type Date
Merging Multiple Routes - MapPoint Articles - MP2K Magazine This thread Refback 08-25-2007 06:27 AM
Using Virtual Earth in a Vista Gadget - MapPoint Articles - MP2K Magazine This thread Refback 08-20-2007 03:16 AM
MP2K Update Archives - MP2K Magazine This thread Refback 08-16-2007 10:36 PM
MapPoint User Community - MP2K Magazine This thread Refback 08-15-2007 10:54 PM
Microsoft MapPoint 2006 - MP2K Magazine This thread Refback 08-14-2007 03:34 PM
Spatial Data Importer Contest Submission - MP2K Magazine This thread Refback 08-13-2007 06:45 AM
MapPoint Help - MP2K Magazine This thread Refback 08-13-2007 06:08 AM
MapPoint Help - MP2K Magazine This thread Refback 08-13-2007 05:20 AM
Virtual Earth: Frequently Asked Questions — July 2005 - MapPoint Articles - MP2K Magazine This thread Refback 08-12-2007 07:59 PM
MapPoint Download - MP2K Magazine This thread Refback 08-11-2007 02:02 PM

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
Printing a large Map?!?!?! Anonymous MapPoint 2006/2009 Discussion 6 10-24-2007 11:05 AM
Load/Render large number of pushpins Varrus MapPoint 2006/2009 Discussion 4 04-27-2007 03:40 PM
number of pushpins of mappoint Anonymous MapPoint 2006/2009 Discussion 2 08-05-2004 03:59 PM
Max number of Pushpins / Your suggestion? Anonymous MapPoint 2006/2009 Discussion 4 05-20-2004 07:33 PM
Hello. We currently have large-format printing ca.... Anonymous MapPoint 2006/2009 Discussion 1 12-12-2001 12:51 PM


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