Page 1 of 1
World_GetCircleFromPoint (table)
Posted: Sat Mar 06, 2021 6:43 pm
by vettim89
I have a question about the syntax for this function. You need, long, lat, numpoints, and radius according to the documents and the LUA Console. I have tried this and nothing happens. Should you get a set of reference points when running this function? That is what I am trying to do. Also what measure is radius measured in? I assume its NM
RE: World_GetCircleFromPoint (table)
Posted: Sat Mar 06, 2021 7:30 pm
by KnightHawk75
When you say nothing happens do you mean a table of points is not returned or RP's aren't created. If the latter you must do this yourself, as function just returns a table of lat\lons for you to use. Yes radius is in Nm.
For example:
Code: Select all
local function BuildCircleOfRPs(theside,basename)
local tableofcirclepoints = World_GetCircleFromPoint({latitude=1.0,longitude=1.0,numpoints=12,radius=50})
local counter = 1;
for k,v in ipairs(tableofcirclepoints) do
ScenEdit_AddReferencePoint({side=theside,latitude=v.latitude,longitude=v.longitude,name=basename .. "-" .. counter})
counter = counter +1;
end
end
BuildCircleOfRPs("blue","mycircle");