CesiumNavigation

CesiumNavigation

new CesiumNavigation(viewerCesiumWidget, options)

Example
new CesiumNavigation(viewer, {
        enableCompass: true, // 罗盘
        enableZoomControls: true, // 缩放控制器
        enableDistanceLegend: true, // 比例尺
        enableCompassOuterRing: true, // 罗盘外环
        view: { // 初始化视角
          "x": 109.7884118470029,
          "y": 39.590384952017764,
          "z": 1565.7899788867958,
          "heading": 331.1978494043747,
          "pitch": -8.45296669256617,
          "roll": 0.00043210090111595544
        }
    });
Parameters:
Name Type Description
viewerCesiumWidget Cesium.Viewer 地图viewer对象
options Object 相关配置
Properties
Name Type Attributes Default Description
enableCompass Boolean <optional>
true 是否创建罗盘
compass Object <optional>
罗盘样式设置
Properties
Name Type Attributes Default Description
style Object <optional>
='leftBottom' 罗盘位置
enableZoomControls Boolean <optional>
true 是否创建缩放控制器
enableDistanceLegend Boolean <optional>
true 是否创建比例尺
distanceLegend Object <optional>
比例尺样式设置
Properties
Name Type Attributes Default Description
style Object <optional>
='leftBottom' 比例尺位置
enableCompassOuterRing Boolean <optional>
true 是否创建罗盘外环
view Object <optional>
初始化视角

Methods

destroy()

Description:
  • 销毁

setVisible(visible)

Description:
  • 是否显示
Parameters:
Name Type Description
visible Boolean