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

Problem with LinkData and object QuetyAllRecord

This is a discussion on Problem with LinkData and object QuetyAllRecord within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi! I have a data list order by fecha. Example list of three element: NOMBRE LATITUD LONGITUD DATOS '885781' 40,80306 ...

  1. #1
    dpacheco is offline Junior Member White Belt
    Join Date
    Feb 2003
    Posts
    4

    Problem with LinkData and object QuetyAllRecord

    Hi!
    I have a data list order by fecha.
    Example list of three element:

    NOMBRE LATITUD LONGITUD DATOS
    '885781' 40,80306 0,68528 FECHA: 22/07/2004 08:30 ESTADO: En marcha POSICIÓN: 7.24 Km al NE de Aldea (L'), E (2)

    '885781' 40,13333 0,13944 FECHA: 22/07/2004 09:31 ESTADO: En marcha POSICIÓN: 2.70 Km al O de Ribera de Cabanes, E (2)

    '885781' 37,72694 -1,56028 FECHA: 22/07/2004 14:30 ESTADO: En marcha POSICIÓN: 3.58 Km al SSE de Carivete, E (2)


    I execute method LinkData and the this code:

    CjtoPosiciones := CjtoDatosGlobal.ImportData(blablabla);
    Posiciones := CjtoPosiciones.QueryAllRecords;
    TotalPosiciones := CjtoPosiciones.RecordCount;
    for i:=1 to TotalPosiciones do begin

    // Here I add all position to Object Route

    Posiciones.MoveNext;
    end;

    Do someone know as I can order the list that MapPoint return inside object Posiciones (or QueryAllRecord) after I execute method LinkData ???

    MapPoint return object QueryAllRecord without order and I need that the list is order for my route.

    Is a big problem for me.

    Thank you, very much.
    Daniel.

  2. #2
    jdwhytie is offline Member Yellow Belt
    Join Date
    Jun 2004
    Posts
    37
    Since you are adding all your points to a Route object, I do believe you can use the Waypoints to get the order of the Waypoints along your route.

    Code:
    objRoute.Waypoints.ITEM(1)
    The list starts at 1.

    You can also move the order around using the ListPosition property:
    Code:
    'Moves Start point to 3rd position
    objRoute.Waypoints.Item(1).Listposition = 3
    I hope that's what you were looking for

  3. #3
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    Thank you so as to answer.

    That´s not is my problem, my problem is that I cann´t execute

    "Pushpin.BalloonState := 2;"

    in the correct pushpin because the object LinkData don´t add orderly my data inside Map.

    when I go to put balloonstate=2 in the last pushpin add, I discover that the pushpin isn´t the last and I don´t know as I do it.

    My objetive is put balloonstate=2 in the last pushpin add by object linkdata. Do you understand?. My english is very bad. I´m sorry.

  4. #4
    jdwhytie is offline Member Yellow Belt
    Join Date
    Jun 2004
    Posts
    37
    Let me make sure I understand, you are importing data into your map using LinkData. Then you want to put a balloon over the last pushpin but Mappoint is putting the balloon over the incorrect pushpin? Or is it that you don't know which pushpin is last?

  5. #5
    dpacheco is offline Junior Member White Belt
    Join Date
    Feb 2003
    Posts
    4
    Is OK.

    For example. I have 10 pushpin add to mappoint and I don´t know which is the last because the method linkdata get my list in order of posicion and put in the map my list in disorder and I don´t know the reason.

    If I make to "for" or "while" over queryallrecord(is a recorset) the object return by linkdata, I arrive to finist of queryallrecord and I see that the last pushpin isn´t the last really.

    May be is a bug of MapPoint because, why does Mappoint disorder my list??

    I only have the pushpin position, but I don´t find how have to access a object puspin.

    Do you think??
    Is it compicated??

  6. #6
    jdwhytie is offline Member Yellow Belt
    Join Date
    Jun 2004
    Posts
    37
    I am not really sure how mappoint orders Pushpins in the Datasets it imports or links to. But if you only want to find a single pushpin (the last) why don't you use objMap.FindPushpin("Name"), then you can set the balloon state on that pushpin without worrying about the order.

  7. #7
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    The problem is that all pushpin have the same name.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Linking LinkData
    By DrewD in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 02-10-2004, 11:22 AM
  2. LinkData and VC++
    By sowtschi in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 07-07-2003, 10:32 AM
  3. route object to drawing object
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 05-09-2003, 11:29 PM
  4. LinkData with UDL file in VB 6 App
    By Wim in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 04-03-2003, 07:04 AM
  5. Is it possible to use the Linkdata() method to con....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 04-26-2002, 09:06 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