cesium-navigation-es6
This is a Cesium plugin that adds to the Cesium map a user friendly compass, navigator (zoom in/out), and
distance scale graphical user interface.
Demo
cesium plugin /demo
Code Demo
https://github.com/richard1015/cesium-vue-example /(cesium-print,cesium-navigation-es6)
Why did you build it?
First of all the Cesiumjs sdk does not includes a compass, navigator (zoom in/out), and distance scale. You can use the mouse to navigate on the map, but this navigation plugin offers more navigation control and capabilities to the user. Some of the capabilities are: reset the compass to point to north, reset the orbit, and
reset the view to a default bound.
为什么你建立cesium-navigation插件?
首先,所有的Cesiumjs sdk 不包括罗盘,导航仪(放大/缩小)和距离刻度。您可以使用鼠标在地图上导航,但这个导航插件可为用户提供更多的导航控制和功能。其中一些功能是:将罗盘重置为指向北部,重置轨道,并将视图重置为默认边界。
How to use it?
QuickStart
$ npm install cesium-navigation-es6 --save
<template>
<div id="cesiumContainer"></div>
</template>
<script type="text/javascript">
import {
Viewer,Rectangle
} from "cesium/Source/Cesium.js";
import 'cesium/Build/Cesium/Widgets/widgets.css';
import CesiumNavigation from "cesium-navigation-es6";
let viewer = new Viewer("cesiumContainer");
var options = {};
options.defaultResetView = Rectangle.fromDegrees(80, 22, 130, 50);
options.enableCompass= true;
options.enableZoomControls= false;
options.enableDistanceLegend= false;
options.enableCompassOuterRing= true;
CesiumNavigation(viewer, options);
Other Cesium Plugin
cesium-print /github
参考文章
https://www.jianshu.com/p/dd364b59b774
https://www.jianshu.com/p/fb237c7eb48c
https://blog.csdn.net/Prepared/article/details/68940997?locationNum=10&fps=1