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

TMS VCL WebGMapsCreating a polygon in C++
This code snippet shows how to create a triangle polygon on WebGMaps with C++. First a path is created, the three points of the triangle are added and with the path, a polygon is added and created on the map:
{
TPolygonItem *pol;
TPath *pt;
TPathItem *pi;
pt = new TPath();
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);
}