setViewpoint
Sets the location and orientation of the Viewpoint.
The Viewpoint is an optional visual indicator that includes an arrow icon. The Viewpoint accepts mouse and touch events so that users can move it within the 2D viewer. The Viewpoint is typically used in conjunction with the 3D viewer to show the location and orientation of the 3D viewer camera within the 2D viewer.
Example
Usage
const viewpoint = {
direction: 90,
location: {
x: 1,
y: 1
}
};
viewer2d.setViewpoint(viewpoint);const viewpoint = {
direction: {
x: 1,
y: 0
},
location: {
x: 1,
y: 1
}
};
viewer2d.setViewpoint(viewpoint);Parameters
viewpoint
Location and orientation of the Viewpoint.
Type | Required |
|---|---|
Object | Yes |
Properties