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

AddLine does not draw lines in right order

This is a discussion on AddLine does not draw lines in right order within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi I am trying to draw a route. But even if I add the lines in correct order the line ...

  1. #1
    diana_hiorth is offline Junior Member White Belt
    Join Date
    Jul 2005
    Posts
    3

    AddLine does not draw lines in right order

    Hi
    I am trying to draw a route. But even if I add the lines in correct order the line is drawn in a strange order. Cannot see any logic at all.

    My code looks like:

    Set l1 = .Pushpin.Location
    Set l2 = .Pushpin.Location
    MainMap.Shapes.AddLine l1, l2
    MainMap.Shapes.Item(MainMap.Shapes.Count).Line.Wei ght = 2
    MainMap.Shapes.Item(MainMap.Shapes.Count).ZOrderPo sition = 0
    MainMap.Shapes.Item(1).Line.ForeColor = vbRed
    MainMap.Shapes.Item(1).Fill.Visible = True

    Can someone give me a tip?

    /Diana

  2. #2
    Winwaed's Avatar
    Winwaed is offline Mapping-Tools.com Black Belt
    Join Date
    Feb 2004
    Location
    Irving,Texas
    Posts
    1,859
    Blog Entries
    60
    What do you mean by a "strange order"?

    What are you seeing? and what are you expecting?


    Richard
    Winwaed Software Technology LLC
    http://www.winwaed.com
    See http://www.mapping-tools.com for MapPoint Tools

  3. #3
    diana_hiorth is offline Junior Member White Belt
    Join Date
    Jul 2005
    Posts
    3
    Hi again

    Sorry, I was mixing things up...

    It was not the AddLine function that did anything wrong but the "QueryAllRecords" did. When I have loaded a text file with "LinkData" and using "QueryAllRecords" to loop through it and drawing my lines, they are not in the right order.

    The data in the text file is in the right order but "QueryAllRecords" seems somehow to mix it all up. Any ideas? I guess the title is not very descriptive any longer...

    Here is a piece of my code:

    Set MDSet = MainMap.DataSets.LinkData(szFile,"Nr", , geoCountryDefault, geoDelimiterSemicolon, 0)
    ....
    Set oRS = MDSet.QueryAllRecords

    oRS.MoveFirst
    Do Until oRS.EOF
    ...
    oRS.MoveNext
    Loop

    Thanks,
    /Diana

  4. #4
    diana_hiorth is offline Junior Member White Belt
    Join Date
    Jul 2005
    Posts
    3
    When I searched on "QueryAllRecords" I found that others are have the same problem I also found some sorting code that I will try.

    Thanks,
    /Diana

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. PushPin and Line Order
    By stevet in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 06-19-2006, 01:37 PM
  2. Shape.addLine(loc1, loc2) -> How 2 Change size of line ??
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 12-22-2004, 06:32 AM
  3. Order a recordset?
    By Shecky in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 10-15-2004, 08:52 PM
  4. Pushpin Z Order
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 09-06-2004, 06:00 PM
  5. Extract route order
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 09-17-2002, 10:11 PM

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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96