lets assume that we have created a array
Code:
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;
Code:
savedPushpinCount:=savedPushpinCount+1;
savedPushPins[savedPushpinCount]:=mApp.ActiveMap.AddPushpin(mApp.ActiveMap.GetLocation(loc_y,loc_x,0),ship_name);
and if i need to delete all the pushpins, i call this function:
Code:
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