cesium-navigation 使用(非require,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 不包括羅盤,導航儀(放大/縮?。┖途嚯x刻度。您可以使用鼠標在地圖上導航,但這個導航插件可為用戶提供更多的導航控制和功能。其中一些功能是:將羅盤重置為指向北部,重置軌道,并將視圖重置為默認邊界。

How to use it?

QuickStart


$ npm install cesium-navigation-es6 --save


<template>

  <div id="cesiumContainer"></div>

</template>

<script type="text/javascript">

import Cesium from "cesium/Cesium";

import "cesium/Widgets/widgets.css";

import CesiumNavigation from "cesium-navigation-es6";

var options = {};

// 用于在使用重置導航重置地圖視圖時設置默認視圖控制。接受的值是Cesium.Cartographic 和 Cesium.Rectangle.

options.defaultResetView = Cesium.Rectangle.fromDegrees(80, 22, 130, 50);

// 用于啟用或禁用羅盤。true是啟用羅盤,false是禁用羅盤。默認值為true。如果將選項設置為false,則羅盤將不會添加到地圖中。

options.enableCompass= true;

// 用于啟用或禁用縮放控件。true是啟用,false是禁用。默認值為true。如果將選項設置為false,則縮放控件將不會添加到地圖中。

options.enableZoomControls= false;

// 用于啟用或禁用距離圖例。true是啟用,false是禁用。默認值為true。如果將選項設置為false,距離圖例將不會添加到地圖中。

options.enableDistanceLegend= false;

// 用于啟用或禁用指南針外環(huán)。true是啟用,false是禁用。默認值為true。如果將選項設置為false,則該環(huán)將可見但無效。

options.enableCompassOuterRing= true;

let viewer = new Cesium.Viewer("cesiumContainer");

CesiumNavigation(viewer, options);

Other Cesium Plugin

cesium-print /github

參考文章

http://www.itdecent.cn/p/dd364b59b774

http://www.itdecent.cn/p/fb237c7eb48c

https://blog.csdn.net/Prepared/article/details/68940997?locationNum=10&fps=1

?著作權歸作者所有,轉載或內容合作請聯(lián)系作者
【社區(qū)內容提示】社區(qū)部分內容疑似由AI輔助生成,瀏覽時請結合常識與多方信息審慎甄別。
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發(fā)布,文章內容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關閱讀更多精彩內容

  • Awesome Ruby Toolbox Awesome A collection of awesome Ruby...
    debbbbie閱讀 3,085評論 0 3
  • 英文文檔,一開始我也是抗拒的,邊翻譯邊看,也就花費了1個小時基本就閱讀過了,我的英文基礎其實很差。附上鏈接:鏈接:...
    lonecolonel閱讀 10,408評論 3 1
  • # Awesome Python [![Awesome](https://cdn.rawgit.com/sindr...
    emily_007閱讀 2,332評論 0 3
  • 什么是 CALayer?在 iOS 系統(tǒng)中,我們能夠看得見摸得著的基本都是 UIView,比如一個 label、b...
    海盜軍長閱讀 633評論 0 0
  • 網絡購物真是方便快捷。昨天小陳果要魔法棒,和她在網上選購下單,今天早晨便送到了門口。每次取快遞,看到快遞小哥,就感...
    月明非為夜行人閱讀 1,264評論 28 40

友情鏈接更多精彩內容