Community of VE/MapPoint Users and Developers
This is a discussion on "My Pushpins" are in Background of the ImportData's pushpins within the MapPoint 2006/2009 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 ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| "My Pushpins" are in Background of the ImportData's pushpins 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 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;
|
| |||
| 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 |
| |||
| 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.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| 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. |
![]() |
| Tags |
| background, importdata, my pushpins, pushpins |
| ||||
| Posted By | For | Type | Date | |
| add html background | This thread | Trackback | 08-29-2007 09:33 PM | |
| Tracking P.F. Chang’s in the Midwest - MapPoint Articles - MP2K Magazine | This thread | Refback | 08-28-2007 05:28 PM | |
| Microsoft Announces Intention to Acquire Vicinity - MapPoint News - MP2K Magazine | This thread | Refback | 08-28-2007 03:23 PM | |
| 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-22-2007 08:23 PM | |
| Microsoft MapPoint 2006 - MP2K Magazine | This thread | Refback | 08-22-2007 11:55 AM | |
| Microsoft MapPoint 2006 - MP2K Magazine | This thread | Refback | 08-22-2007 11:55 AM | |
| MapPoint Help - MP2K Magazine | This thread | Refback | 08-22-2007 07:52 AM | |
| The Magazine for MapPoint - MP2K Magazine | This thread | Refback | 08-22-2007 05:16 AM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| VS2005 upgrade of VB app with MP control fails with GPF "ActiveX Ctrl...not in a STA" | ANDYL | MapPoint 2006/2009 Discussion | 1 | 11-24-2006 01:24 PM |
| addin-form with behavior as "Extras-Geopositon"-fu | Th.M.Mädzulat | MapPoint 2006/2009 Discussion | 0 | 12-20-2005 10:37 AM |
| Exporting "located" data points to excel | Jonboy | MapPoint 2006/2009 Discussion | 2 | 04-06-2005 09:25 AM |
| Do I need "Autoroute Europe", if I install "M | bigtail | MapPoint 2006/2009 Discussion | 1 | 03-24-2004 12:58 AM |
| Finding the "middle" of a bunch of pushpins? | Anonymous | MapPoint 2006/2009 Discussion | 4 | 09-17-2003 01:36 PM |