Frequently Asked Component Specific Questions
Options |
Display all FAQ items |
Displaying items 1 to 1 of 1, page 1 of 1
<< previous next >>



Create a polygon in Delphi
This code snippet shows how to add a polygon (triangle in this case) to TWebGMaps:
var pol: TPolygonItem; pt: TPath; pi: TPathItem; begin pt := TPath.Create; pi := pt.Add(); pi.Latitude := 50; pi.Longitude := 2; pi := pt.Add(); pi.Latitude := 50; pi.Longitude := 3; pi := pt.Add(); pi.Latitude := 55; pi.Longitude := 2.5; pol := WebGMaps1.Polygons.Add(false, false, false, pt, clRed, clYellow, 255, 255, 2, true, 255); WebGMaps1.CreateMapPolygon(pol.Polygon); end;