Initializes a new instance of the SGPosition class.
SGPosition(x, y, [height], [yaw], [pitch], [distance], [heightType]);
SGPosition(coord);
SGPosition(arr);
SGPosition(strStream);
Parameter |
Description |
x |
x coordinate, usually longitude |
y |
y coordinate, usually latitude |
height |
Optional, default: undefined Height of the coordinate |
yaw |
Optional, default: undefined The direction in which the camera/object should be looking |
pitch |
Optional, default: undefined The tilt angle in which the camera/object should be looking |
distance |
Optional, default: undefined If the SGPosition describes a point of interest, this property determines the distance between the camera and the POI (x,y,height) |
heightType |
Optional, default: sgHeightRelative Can be one of the following: sgHeightRelative –
the height of the coordinate above the ground sgHeightAbsolute – the absolute height (above sea level) |
coord |
Constructs an SGPosition object from another coordinate Can be SGCoord2D, SGCoord3D or SGPosition |
arr |
An array of coordinate objects or SGNode objects |
strStream |
Construct SGPosition object from a string. The string can have one of the following formats:
|