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

"My Pushpins" are in Background of the ImportData's pushpins

This is a discussion on "My Pushpins" are in Background of the ImportData's pushpins within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi... I have to develop an Delphi application using MapPoint. The situation is: There are several branches, each branch has ...

  1. #1
    doMapPoint is offline Junior Member Yellow Belt
    Join Date
    May 2007
    Location
    Germany
    Posts
    13

    "My Pushpins" are in Background of the ImportData's pushpins

    Hi...

    I have to develop an Delphi application using MapPoint.
    The situation is: There are several branches, each branch has several customers.

    First, I use ImportData() method to get the pushpins of the customers.
    Then, I use Map.AddPushpin() method to display a pushpin for each branch itself.

    But although I add the Pushpins for the branches AFTER importing the customers' pushpins, the symbols of the branch pushpins (stored in "My Pushpins") will be displayed in the background.

    See attached image ("Meine Pins" is "My Pushpins" in German ). The green circles are the customers' pushpins imported via ImportData, the blue flag is the branch pushpin.

    Has someone an idea how to get the DataSet "My Pushpins" in foreground??

    Greetings,
    Dietmar

    Here a piece of code:
    Code:
    // First, import the Customers' pushpins
    
          adoQuery.Open;
          try         
                SetLength(arrDataSets, adoQuery.RecordCount);
                while not adoQuery.Eof do begin
                   BranchID := adoQuery.FieldByName('BranchID').AsString;  // get BranchID from Query (necessary to get the right View from SQL Server)               
                   arrDataSets[adoQuery.RecNo-1] := SMap.DataSets.ImportData(ExtractFilePath(Application.Exename) + 'serverlink.udl!V_Mappoint_'+BranchID, arrFields, geoCountryDefault, geoDelimiterDefault, 0);
                   arrDataSets[adoQuery.RecNo-1].Symbol := ArrCustomerSymbols[adoQuery.RecNo-1].ID; // array of Symbols, for the customer group of each branch an extra symbol
                   arrDataSets[adoQuery.RecNo-1].Name   := BranchID;  // give the DataSet a name
                   adoQuery.Next;
                end;
          finally
             adoQuery.Close;
          end;
                
    // Then, create the Branch pushpins, but they will appear in background...
        
       adoQuery.SQL.Clear;         
       adoQuery.SQL.Add('SELECT Longitude, ');
       adoQuery.SQL.Add('       Latitude, ');
       adoQuery.SQL.Add('       BranchID, ');
       adoQuery.SQL.Add('       BranchName ');
       adoQuery.SQL.Add('  FROM Branches');
          
          adoQuery.Open;
          try
             
                while not adoQuery.Eof do begin
                   BranchLocation := SMap.GetLocation(adoQuery.FieldByName('Latitude').AsFloat, adoQuery.FieldByName('Longitude').AsFloat, 0);
                   B_Name         :=  adoQuery.FieldByName('BranchName').AsString;
                   B_ID           := adoQuery.FieldByName('BranchID').AsString;
                   adoQuery.Next;
    
                   // insert a Branch pushpin
                   tmpPushpin        := SMap.AddPushpin(BranchLocation, 'Branch location' + B_ID);
                   tmpPushpin.Note   := B_Name;
                   tmpPushpin.Symbol := symbol_ID;  // an ID of the symbol...
                end;
             
          finally
             adoQuery.Close;
          end;
    Attached Images Attached Images

  2. #2
    doMapPoint is offline Junior Member Yellow Belt
    Join Date
    May 2007
    Location
    Germany
    Posts
    13

    Re: "My Pushpins" are in Background of the ImportData's pushpins

    Hi..
    I now solved the problem by loading the branch pusphins with ImportData, too.
    But I am still interested in how to move a single DataSet (containing Pushpins) in the background or foreground (like layers in PhotoShop). Because there is often the problem that pushpins of a DataSet overlap the ones of another DataSet.

    Regards,
    Dietmar

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

    Re: "My Pushpins" are in Background of the ImportData's pushpins

    Hi,

    Some objects in Mappoint have a ZOrder method to do that. I don't think pushpins have it.

  4. #4
    Mattys Consulting's Avatar
    Mattys Consulting is offline Senior Member Black Belt
    Join Date
    Dec 2002
    Posts
    1,040

    Re: "My Pushpins" are in Background of the ImportData's pushpins

    The prints I do are quite effective in reducing the overlap.
    An added benefit is that a pdf can hold a great deal of raster data
    which looks good at 15% and also 300%.
    If you'd like to see, send me your map and I'll send back a pdf.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 11-24-2006, 01:24 PM
  2. addin-form with behavior as "Extras-Geopositon"-fu
    By Th.M.Mädzulat in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 12-20-2005, 10:37 AM
  3. Exporting "located" data points to excel
    By Jonboy in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 04-06-2005, 09:25 AM
  4. Do I need "Autoroute Europe", if I install "M
    By bigtail in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 03-24-2004, 12:58 AM
  5. Finding the "middle" of a bunch of pushpins?
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 09-17-2003, 01:36 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 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127