View Single Post

  #3 (permalink)  
Old 12-04-2002
yelmaci yelmaci is offline
Junior Member
White Belt
 
Join Date: Dec 2002
Posts: 7
Send a message via ICQ to yelmaci Send a message via MSN to yelmaci
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
Reply With Quote