Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 3 of 3

Improving the performance of generating pushpins Programmati

This is a discussion on Improving the performance of generating pushpins Programmati within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi everyone I already generated a table containing name,latitude,longitude of a big amount of points. the code i send here ...

  1. #1
    kavehmb2000 is offline Junior Member White Belt
    Join Date
    May 2006
    Posts
    3

    Improving the performance of generating pushpins Programmati

    Hi everyone
    I already generated a table containing name,latitude,longitude of a big amount of points. the code i send here works, but it takes a lifetime to generate the pushpins in desired locations. can anyone please hint me on how to reduce the time for generating them?
    (it took almost 15 hours to generate about 2500 points while importing the same data in MapPoint got les than 1 min to show!)
    [C#]
    Code:
    // here my dataTable is generated
    DataTable mydt = DBAccess.ProcessSpecialRoadPoints(itemChecked.ToString());
                        MapPoint.Map map =this.axMappointControl1.ActiveMap ;
                        [color=orange]foreach (DataRow drl in mydt.Rows)
                        {
                            MapPoint.Location location = map.GetLocation(Convert.ToDouble(drl["LATITUDE"]), Convert.ToDouble(drl["LONGITUDE"]), 1);
    
                            MapPoint.Pushpin pin = map.AddPushpin(location, NAME);
    [/color]
                        }
    Thanks in advance
    KMB
    KMB

  2. #2
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    Its been a little while I did something in dotNet. But possible the iretation trough the database, also the convertion to double cost a lot of time. I assume you checked the loop already with the conversions, but without the calls to mappoint ?

    15 hour seems to me very long for 2500 pushpins.

    Did you also try a test in a close loop without any conversion or collention to put 2500 pushpins on the map, eg with slight increments of lat/long to show them ?

  3. #3
    kavehmb2000 is offline Junior Member White Belt
    Join Date
    May 2006
    Posts
    3
    Dear Wilfried
    thank you for your kind answer; actually there is no way I can bypass the conversion to doubles! but, thanks to you again, I could find my answer in this other post of yours!

    http://www.mp2kmag.com/mappoint/disc...ushpin+dataset
    KMB

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Improving On The MapPoint Geocoding Algorithm
    By Anonymous in forum MP2K Magazine Articles
    Replies: 10
    Last Post: 03-12-2005, 03:22 PM
  2. Visual Basic 6.0 generating a map based on access data
    By virgilar in forum Bing Maps and MapPoint Web Service
    Replies: 0
    Last Post: 03-11-2005, 09:27 AM
  3. Generating Localized Maps
    By faddat in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 01-14-2005, 03:11 PM
  4. generating with/implementing a map in MapPoint 2004
    By mohrm in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 09-21-2004, 04:56 AM
  5. Generating maps for a datapoint set
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 05-13-2003, 08:56 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


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