Hi Nigel
For a moment I thought that I would have to email you back saying I still couldn't clear the canvas when I dragged the map.
Then I found the ImageDrawLayers method and the penny dropped. It's perfectly fast enough for what I do but opens up a new way of doing things to me!
procedure ImageDrawLayer(Sender: TObject; Dest: TIEBitmap; LayerIndex: Integer);
var
pts : TPointArray;
i : integer;
begin
if LayerIndex=1 then
begin
SetLength(pts,length(Warnings[0].Coordinates));
for i:=0 to length(Warnings[0].Coordinates)-1 do
begin
pts[i].X:=map.LongitudeToBmpX(Warnings[0].Coordinates[i].Lon);
pts[i].Y:=map.LatitudeToBmpY(Warnings[0].Coordinates[i].Lat);
end;
with Dest.IECanvas do
begin
Pen.Mode := pmCopy;
Pen.Width :=2;
Pen.Style := psSolid;
Pen.Color := clBlack;
Pen.Transparency := 192;
Brush.Color := clYellow;
Brush.Style := bsSolid;
Brush.Transparency := 128;
Polygon(pts);
end;
end;
end;
Thanks again - the mapping that comes as an extra with the ImageEn component library is an absolute godsend to me.
Bruce.