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的更多相关文章

  1. Cesium的api之关于viewer(二)

    1.构建一个viewer,如下创建:options的参数根据实际情况,进行设定 var viewer = new Cesium.Viewer('cesiumContainer', { //Start ...

  2. Cesium 源码笔记[1] Viewer模块实例化的大致过程

    我原本想写日记的,但是不太现实. 源码下载 源码可以从源码包和发行包中的Source目录中获取. Cesium的模块化机制从1.63版本开始,由原来的RequireJs变为ES6.但有可能是原先设计耦 ...

  3. 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 ...

  4. Cesium基础使用介绍

    前言 最近折腾了一下三维地球,本文简单为大家介绍一款开源的三维地球软件--Cesium,以及如何快速上手Cesium.当然三维地球重要的肯定不是数据显示,这只是数据可视化的一小部分,重要的应该是背后的 ...

  5. 【转载】Cesium基础使用介绍

    既然给我发了参与方式,不参加似乎有点不给人面子,反正也没多少人看我的博客,那我就试试吧,也欢迎大家自己参与:2017年度全网原创IT博主评选活动投票:http://www.itbang.me/goVo ...

  6. cesium 入门开发系列地图鹰眼功能(附源码下载)

    前言 cesium 入门开发系列环境知识点了解:cesium api文档介绍,详细介绍 cesium 每个类的函数以及属性等等cesium 在线例子 内容概览 cesium 结合 leaflet 实现 ...

  7. react 地图可视化 cesium 篇

    Vue Function-based API RFC 一出来,感觉 vue 越来越像 react 了.新立项目,决定尝试下 react.js.下面是 react 集成 cesium,核心部分是 web ...

  8. Cesium的Property机制总结[转]

    https://www.jianshu.com/p/f0b47997224c 前言 Cesium官方教程中有一篇叫<空间数据可视化>(Visualizing Spatial Data).该 ...

  9. Cesium的Property机制总结

    前言 Cesium官方教程中有一篇叫<空间数据可视化>(Visualizing Spatial Data).该文文末简单提到了Cesium的Property机制,然后话锋一转,宣告此教程的 ...

随机推荐

  1. 【HTML】Beginner7:Image

    1.Image     The web is not just about text,it is a multi-media extravaganza and the most common form ...

  2. UVA11324 The Largest Clique(DP+缩点)

    题意:给一张有向图G,求一个结点数最大的结点集,使得该结点中任意两个结点 u 和 v满足:要么 u 可以到达 v, 要么 v 可以到达 u(u 和 v 相互可达也可以). 分析:”同一个强连通分量中的 ...

  3. Storm系列(二十)分区事务PartitionTransaction及示例

    在Storm中分区事务的处理,Spout端需要实现IPartitionedTransactionalSpout接口,用于对批次及偏移量的控制,而Bolt都必须实现IBatchBolt接口,通常继承至B ...

  4. HW5.19

    public class MyTriangle { public static boolean isValid(double side1, double side2, double side3) { ...

  5. POJ1811- Prime Test(Miller–Rabin+Pollard's rho)

    题目大意 给你一个非常大的整数,判断它是不是素数,如果不是则输出它的最小的因子 题解 看了一整天<初等数论及其应用>相关部分,终于把Miller–Rabin和Pollard's rho这两 ...

  6. Centos System Info

    系统 # uname -a # 查看内核/操作系统/CPU信息 # head -n 1 /etc/issue # 查看操作系统版本 # cat /proc/cpuinfo # 查看CPU信息 # ho ...

  7. ssh -CT -o BatchMode=yes 用户名@主机名

  8. Spring Bean Scope 有状态的Bean 无状态的Bean

    http://blog.csdn.net/anyoneking/article/details/5182164 在Spring的Bean配置中,存在这样两种情况: <bean id=" ...

  9. 高亮选中MEMO某一行

    选中第5行 //转到指定行并选中这行的文本 procedure SelectLine(Memo1: TMemo; ln: Integer); begin Memo1.SelStart := SendM ...

  10. spring mvc[转]

    Spring 注解学习手札(一) 构建简单Web应用 Spring 注解学习手札(二) 控制层梳理 Spring 注解学习手札(三) 表单页面处理 Spring 注解学习手札(四) 持久层浅析 Spr ...