Go to documentation repository
...
Example script for setting object position on the map by coordinates. If there is geo tagging coordinates are considered geographical.
| Code Block |
|---|
{
var d = new Date();
var command = CreateMsg();
command.Action = "SET_OBJECT_GEOMETRY";
command.SourceType = "MAP";
command.SourceId = "1";
command.SetParam("objtype","CAM");
command.SetParam("objid",1);
command.SetParam("a",d.getSeconds()*6);
command.SetParam("x",d.getSeconds());
command.SetParam("y",d.getSeconds());
command.SetParam("w",20+10*Math.sin(Math.PI/d.getSeconds()));
command.SetParam("h",20+10*Math.sin(Math.PI/d.getSeconds()));
DoReactGlobal(command);
} |