Home > @magiclane/maps-sdk > MapCamera > generatePositionAndOrientation
MapCamera.generatePositionAndOrientation() method
Generates a position at longitude, latitude in degrees, with respect to the surface of the focused sphere, altitude in meters above the sphere (sea level), oriented toward the center of the sphere, north up.
The camera position and orientation are unchanged. The camera or any other object can then be set at the resulting position and with the resulting orientation.
Signature:
generatePositionAndOrientation(targetCoords: Coordinates): [GemError, PositionOrientation];Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
targetCoords |
Coordinates representing the desired latitude, longitude and altitude. |
Returns:
[GemError, PositionOrientation]
Tuple containing GemError.success on success (otherwise see GemError for other values) and the computed position and orientation.
Exceptions
An exception if it fails.