Topic: [Solved] Polygon Map Label or Tooltip
Good Day MVD Wizards.
Does anyone know how to add label to polygon via script?
I have this snippet here but Polygon.LabelText is not working.
I can't find a list of property that can be used for the TPolygonItem.
while not Results.EOF do begin
if number <> Results.FieldByName('number').AsInteger then begin
if PolygonItemRegion <> nil then // create/add
frmMain.Map1.CreateMapPolygon(PolygonItemRegion.Polygon);
PolygonItemRegion := frmMain.Map1.Polygons.Add;
PolygonItemRegion.Polygon.LabelText := 'I WANT TO SHOW THIS LABEL';
PolygonItemRegion.Polygon.BackgroundColor := bColor;
PolygonItemRegion.Polygon.BackgroundOpacity := bOpacity;
PolygonItemRegion.Polygon.BorderColor := clLime;
PolygonItemRegion.Polygon.HoverBackgroundColor := clWhite;
PolygonItemRegion.Polygon.HoverBorderColor := $000080FF;
PolygonItemRegion.Polygon.BorderWidth := 1;
PolygonItemRegion.Polygon.Tag := -1;
end;
number := Results.FieldByName('number').AsInteger;
PolygonItemRegion.Polygon.Path.Add(Results.FieldByName('lat').AsFloat, Results.FieldByName('lon').AsFloat);
Results.Next;
end;
brian