TECShapePolygone descends from TECShapeLine and allows to display on your map polygons.
In addition to the properties of TECShapeLine you have access to
Property Area : double
property FillColor : TColor
Property Color : TColor
property Style : TBrushStyle
property Opacity : byte
OnAfterDraw
You also have an OnAfterDraw event that allows you to draw on top your polygon, example to include its description.
FPoly : TECShapePolygone;
FPoly := TECShapePolygone(map.add(nsPolygon,Lat,Lng))
;
FPoly.OnAfterDraw := doAfterDraw;
FPoly.Description := 'Polygone
'+inttostr(map.Shapes.Polygones.Count);
procedure
TFormNativeLinePolygone.doAfterDraw(const canvas:TECCanvas;var Rect:TRect;item:TECshape) ;
var x,y,w,h:integer;
begin
//transparancy text
canvas.brush.Style := bsClear;
canvas.font.color := clBlack;
canvas.font.Style := [fsBold];
w := canvas.TextWidth(item.Description) ;
h := canvas.TextHeight(item.Description);
x := rect.Left+((rect.Right-rect.Left-w) div 2);
y := rect.top+((rect.bottom-rect.top-h) div 2);
canvas.TextOut(x,y,item.Description);
end;