Map.GetPolygonAreaSqMeters

In Dephi, here is how I'm defining polygons:

            PolygonItem := Map.Polygons.Add;
            PolygonItem.Polygon.BackgroundOpacity := 50;
            PolygonItem.Polygon.BorderWidth := 2;
            PolygonItem.Polygon.PolygonType := ptPath;

Here is how I'm entering vertices :

                PolygonItem.Polygon.Path.Add(Lat, Lon);

I end up with the correct number of visible polygons that properly show on the map, but when I call:

  for Indx := 0 to Map.Polygons.Count-1 do
    ListBox1.Items.Add ('Area : '+Map.GetPolygonAreaSqMeters(Map.Polygons.Items[Indx].ID));

All that returns are empty strings.

How do I get back an area value in square meters?

Thanks


Hi,


We are not aware of any issues with using GetPolygonAreaSqMeters.
The sample code you provided seems to be working as expected.

Can you please provide a ready to run sample project that demonstrates the issue so I can further investigate this?
Projects can be emailed to: mailto:help@tmssoftware.com