# new NavigationTool(viewer, options)
A mixin which adds the Compass/Navigation widget to the Viewer widget.
Rather than being called directly, this function is normally passed as
a parameter to Viewer#extend, as shown in the example below.
参数:
| 名称 | 类型 | 描述 |
|---|---|---|
viewer |
Viewer | The viewer instance. |
options |
Object | The options. |
viewer is required.
Cesium.DeveloperError
示例
var viewer = new Cesium.Viewer('cesiumContainer');
viewer.extend(NavigationTool);
