Cesium的api之关于viewer
1、viewer是用来构建三维的主要的部件;通过创建viewer可以完成三维的图片、地形的展示等
2、属性
* @param {Element|String} container :指定的是在html页面存放viewer的html标签或者标签对应的ID
* @param {Object} [options] Object with the following properties:
* @param {Boolean} [options.animation=true] 如果该值为true,则会创建动画显示部件;若是为false,则不会创建动画显示部件.
* @param {Boolean} [options.baseLayerPicker=true] 如果该值设置为true,则会创建baselayerpicker(该部件关联一个panel用于管理image和terrain的);
若是为false 则不会创建.
* @param {Boolean} [options.fullscreenButton=true] 如果该值为true,则在页面创建全屏显示部件;若是为false则不会创建
* @param {Boolean} [options.geocoder=true] 如果该值为true,则创建地图编码器;否则则不会创建.
* @param {Boolean} [options.homeButton=true] 如果该值为true,则创建该部件;否则不创建
* @param {Boolean} [options.infoBox=true]如果该值为false,则不创建信息查询框部件;否则创建
* @param {Boolean} [options.sceneModePicker=true] 如果该值为true,则创建场景模式部件;否则不创建
* @param {Boolean} [options.selectionIndicator=true] 如果该值为true,则创建;否则不创
* @param {Boolean} [options.timeline=true]设置为true,则viewer中显示时间轴线;否则隐藏
* @param {Boolean} [options.navigationHelpButton=true] 设置为true,则viewer中显示帮助按钮;否则隐藏
* @param {Boolean} [options.navigationInstructionsInitiallyVisible=true] True if the navigation instructions should initially be visible, or false if the should not be shown until the user explicitly clicks the button.
* @param {Boolean} [options.scene3DOnly=false] 该值为true;绘制的内容保存显卡中
* @param {Clock} [options.clock=new Clock()] viewer中的clock显示当前的系统时间
* @param {ProviderViewModel} [options.selectedImageryProviderViewModel] 指定当前imagery layer, 如若没有设定该值则默认设置image player集合中的第一个;使用该属性的前提baseLayerPicker设置为true(设置三维瓦片的)
* @param {ProviderViewModel[]} [options.imageryProviderViewModels=createDefaultImageryProviderViewModels()]只有当baseLayerPicker设置为true;该参数方可使用;从指定的imagery provider提供
* @param {ProviderViewModel} [options.selectedTerrainProviderViewModel] .指定当前terrain layer, 如若没有设定该值则默认设置terrain player集合中的第一个;使用该属性的前提baseLayerPicker设置为true(设置地形的)
* @param {ProviderViewModel[]} [options.terrainProviderViewModels=createDefaultTerrainProviderViewModels()] 只有当baseLayerPicker设置为true;该参数方可使用;从指定的terrain provider提供
* @param {ImageryProvider} [options.imageryProvider=new BingMapsImageryProvider()] 只要当baselayerpicker设为false该值方可使用默认使用bing地图服务
* @param {TerrainProvider} [options.terrainProvider=new EllipsoidTerrainProvider()] 椭球地形服务
* @param {SkyBox} [options.skyBox]该值用来渲染星星的 若是为undefined的则会使用默认的方式显示星星
* @param {Element} [options.fullscreenElement=document.body] 当点击fullscreenbutton的时候全屏显示的
* @param {Boolean} [options.useDefaultRenderLoop=true] 该值为true用来控制三维循环渲染的.否则则不能
* @param {Number} [options.targetFrameRate] 目标渲染的速度
* @param {Boolean} [options.showRenderLoopErrors=true] 该值为true时 则会生成一个panel用来展示渲染过程出现的错误
* @param {Boolean} [options.automaticallyTrackDataSourceClocks=true] 该值为true则会自动根据最新的时间来更新数据或者升级数据
* @param {Object} [options.contextOptions]
* @param {SceneMode} [options.sceneMode=SceneMode.SCENE3D] 初始最初的三维场景
* @param {MapProjection} [options.mapProjection=new GeographicProjection()] 地图投影方式的设定(2d和哥伦布)
* @param {Boolean} [options.orderIndependentTranslucency=true] .该值设为true,并且能够被支持;则会以半透明的方式显示
* @param {Element|String} [options.creditContainer] 根据标签元素或者ID创建容器; 如若没有指定 则默认自动在部件的底部创建
* @param {DataSourceCollection} [options.dataSources=new DataSourceCollection()] 该可视化部件的数据源集合;若是提供了该参数会当做被自身所拥有,则当viewer被销毁时,则该可视化部件不会被销毁
*
3、使用如下:
var viewer = new Cesium.Viewer('cesiumContainer',{
animation:false, //动画控制不显示
baseLayerPicker:true,//图层控制显示
geocoder:false,//地名查找不显示
timeline:false,//时间线不显示
sceneModePicker:true//投影方式显示
});
4、api地址
http://cesiumjs.org/refdoc.html
Cesium的api之关于viewer的更多相关文章
- Cesium的api之关于viewer(二)
1.构建一个viewer,如下创建:options的参数根据实际情况,进行设定 var viewer = new Cesium.Viewer('cesiumContainer', { //Start ...
- Cesium 源码笔记[1] Viewer模块实例化的大致过程
我原本想写日记的,但是不太现实. 源码下载 源码可以从源码包和发行包中的Source目录中获取. Cesium的模块化机制从1.63版本开始,由原来的RequireJs变为ES6.但有可能是原先设计耦 ...
- View and Data API Tips: Constrain Viewer Within a div Container
By Daniel Du When working with View and Data API, you probably want to contain viewer into a <div ...
- Cesium基础使用介绍
前言 最近折腾了一下三维地球,本文简单为大家介绍一款开源的三维地球软件--Cesium,以及如何快速上手Cesium.当然三维地球重要的肯定不是数据显示,这只是数据可视化的一小部分,重要的应该是背后的 ...
- 【转载】Cesium基础使用介绍
既然给我发了参与方式,不参加似乎有点不给人面子,反正也没多少人看我的博客,那我就试试吧,也欢迎大家自己参与:2017年度全网原创IT博主评选活动投票:http://www.itbang.me/goVo ...
- cesium 入门开发系列地图鹰眼功能(附源码下载)
前言 cesium 入门开发系列环境知识点了解:cesium api文档介绍,详细介绍 cesium 每个类的函数以及属性等等cesium 在线例子 内容概览 cesium 结合 leaflet 实现 ...
- react 地图可视化 cesium 篇
Vue Function-based API RFC 一出来,感觉 vue 越来越像 react 了.新立项目,决定尝试下 react.js.下面是 react 集成 cesium,核心部分是 web ...
- Cesium的Property机制总结[转]
https://www.jianshu.com/p/f0b47997224c 前言 Cesium官方教程中有一篇叫<空间数据可视化>(Visualizing Spatial Data).该 ...
- Cesium的Property机制总结
前言 Cesium官方教程中有一篇叫<空间数据可视化>(Visualizing Spatial Data).该文文末简单提到了Cesium的Property机制,然后话锋一转,宣告此教程的 ...
随机推荐
- bzoj 3196 Tyvj 1730 二逼平衡树(线段树套名次树)
3196: Tyvj 1730 二逼平衡树 Time Limit: 10 Sec Memory Limit: 128 MBSubmit: 1807 Solved: 772[Submit][Stat ...
- 【解决】Oracle服务器ip地址被占用
数据库服务器ip地址被占用,怎么破?! 服务器: 1.改服务器ip: 2.改tnsnames.ora里配置的Oracle数据库ip: 3.重启Oracle服务: 客户端: 1.改tnsnames.or ...
- HIVE中查询FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException: Communications link failure
有一天早上到公司用hive中查询数据,发现报错不能连接.通过检查发现mysql服务器没有启动,开启mysql服务器后查询正常.
- HW3.5
import java.util.Scanner; public class Solution { public static void main(String[] args) { int n1 = ...
- ZOJ-2365 Strong Defence 贪心,BFS
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2365 我没看懂题目...这样理解:一个有向图,要给一些边染色,使 ...
- HDU5366 The mook jong (DP)
The mook jong 问题描述 ZJiaQ为了强身健体,决定通过木人桩练习武术.ZJiaQ希望把木人桩摆在自家的那个由1*1的地砖铺成的1*n的院子里.由于ZJiaQ是个强迫症,所以他要把一个木 ...
- java 泛型中 T、E ... 和 问号(通配符)的区别
一.泛型中T.E ... 是泛型类.泛型方法定义时候用的. 1.泛型类定义在类后面 紧跟类名后面 public class TestClassDefine<T>{} 2.泛型方法定义在方 ...
- jquery实时监听某个文本框的输入事件
想给页面的的一个文本框添加监听事件 $(function(){ //页面加载完毕后触发事件 $("textarea[name='content']").bind('input pr ...
- oracl使用DataBase Configuration Assistant创建、删除数据库
原文:oracl使用DataBase Configuration Assistant创建.删除数据库 可以使用DataBase Configuration Assistant来创建一个心得数据库.Da ...
- [ES6] 22. Const
'const' keyword is for creating a read only variable, something you can never change once created. ' ...