Vincent BENNER
11-25-2002, 01:53 AM
I want to delete all the pushpins of a map in one opération ?
Is this a SELECT ALL method available to do such a request ?
Regards,
Vincent BENNER
John Meyer
11-25-2002, 05:27 AM
Vincent, Give the a try, it will delete all pushpins on a map. Change MPC with whatever your MapPoint ActiveX control is named ie:(MapPointControl1)
Dim objDataSet As MapPointCtl.DataSet
Dim objmap As MapPointCtl.Map
Set objmap = MPC.ActiveMap
For Each objDataSet In objmap.DataSets
objDataSet.Delete
Next
yelmaci
12-04-2002, 07:51 PM
lets assume that we have created a array
savedPushpins:Array[1..210] of Pushpin;
savedPushpinCount:integer;
if we have created a pushpin, we will save also this to this array and will increment the Counter;
savedPushpinCount:=savedPushpinCount+1;
savedPushPins[savedPushpinCount]:=mApp.ActiveMap.A ddPushpin(mApp.ActiveMap.GetLocation(loc_y,loc_x,0 ),ship_name);
and if i need to delete all the pushpins, i call this function:
procedure TFmain.delete_pushpins;
var
i:integer;
begin
for i:=1 to savedPushpinCount do
begin
savedPushPins[i].Delete;
end;
savedPushpinCount:=0;
end;
hope this helps