GeoOverviewWidget

new Cesium.GeoOverviewWidget(options)

吉奥鹰眼图
Name Type Description
options Object optional 参数选项:
Name Type Description
viewer Viewer optional 地球对象
map2DOptions Object optional 二维地图的初始参数
width Number optional 鹰眼图容器的宽度
height Number optional 鹰眼图容器的高度
layout String optional 鹰眼图布局位置,上下:T、B,左右:L、R,组合示例:TL或BR
movingTargetIco String optional 表示定位目标的图标,ico图片的url路径或base64的编码串
movingTargetZoomLevel Number optional 当鹰眼模式切换为行走模式(配合行走相机)时,鹰眼地图的zoom层级
Author:
  • liuck
Example:
var geoOverviewWidget = new Cesium.GeoOverviewWidget({
			viewer: viewer,
			map2DOptions: {
		        mapCRS: {
		            topTileExtent:[-180, -270, 180, 90],
		            coordtransform:"none"
		        },
		        style: {
		            version: 8,
		            sources: {
		                tdt_source_overview: {
		                    type: "raster",
		                    tiles: ["http://t3.tianditu.com/vec_c/wmts?SERVICE=WMTS&REQUEST=GetTile&LAYER=vec&TILEMATRIXSET=c&FORMAT=tiles&VERSION=1.0.0&STYLE=default&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=e90d56e5a09d1767899ad45846b0cefd"],
		                    tileSize: 256
		                }
		            },
		            layers: [{
		                id: "tdt_layer_overview",
		                type: "raster",
		                source: "tdt_source_overview",
		                layout: {
		                    visibility: "visible"
		                }
		            }]
		        },
		        zoom: 4,
		        center: [112.939,31.377],
				renderWorldCopies: false,
		        isIntScrollZoom: true,
		        isAttributionControl: false
		    },
		    width: 200,
		    height: 120,
		    layout: 'BR',
		    movingTargetIco: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAMAAAAbzM5ZAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6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pp1ltq1Vpo////+uzu1l5t2GRy+OPm1Fdn+OXo8cXL9+Dj2Gl23n+K1VZm//3+/vv73HeD1Vtq1FRk8MXK/vr7/vr678HG2Gd07Le+2nJ/7rzC0k5d0U9e23SA6q2023aC6rG3+/Lz7bnA7rvB12Vz//399NTX6q611lxr12Nw7bvB1mFv1mBu7rvC12Fw1mFw005e009f78LH1mBt8MfM2m161ltp5qCp1FNj0Ula119u01Fg7rrA56Kr+ebp5p2n1FJi8MPJ+uvt2Wl20ktb/fj56quz12Fv9djb8MLI2Gd14YeS0k1d8MbL7LS77La91FZk1FVk+/Dy0lBg0Upa34KN1Vxq8cTK2Gl32Wl3+Obo9djd3X6I2Gh201Ji1Vln+/Dx5JWf+evs6aew7rrB9t3f01Bg1Vxr1Fln2m978cfN1FVl01Fh1FRj2GVz+ebo6q+36Kqy99/i+OXn////T6rgDQAAAI50Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AJue9HoAAAEySURBVHjabNHFesJQFIXRS4AQgRAI7lqs7u7u7u7u7u73nZukkEb6j/a3JmdwAMyUOytMIKyFun/wclmJ9j4qR4HhncFjBV4Xb4/L0ZCf2vDGZfg9YyI7bmX42UmSA/1SNBxSJEHQcQkGV84Jh3PiS4Jlwy69SmUaFWOsN8CatuHALsKrO87UYDMswrUz3oBr7g/RUoIzDTL0aBPQ83LPm45+8AtYkDLy1t5orM8gmkhy1txG43ihLY2eV9Z0eieOW2ssR2kcodQaHVbd5bC+McjHL6LRPYBgZggnk8wSkzDwePGsQbLM3IF97el09xiPeaa0QRjyRnxVHLp3jVhT5hGhlsgJymJlALsRngt75n1TLK6WtEJRT5YiCNDoOpSUXV4L/BVQ1uI7CMbk6N76EWAAbsbwsOmvIgMAAAAASUVORK5CYII=',
		    movingTargetZoomLevel: 14
		})
Demo:

Members

staticCesium.GeoOverviewWidget.modelType

鹰眼模式;ROAM:漫游,WALK:行走

Methods

addMap2DLayer(layer, before)Object

添加二维地图的图层
Name Type Description
layer Object 图层对象
before Object 图层对象,表示在该图层之前
Returns:
GeoGlobe.Map

addMap2DSource(id, source)Object

添加二维地图的数据源
Name Type Description
id String 唯一编号
source Object 数据源,参考二维API中的数据源
Returns:
GeoGlobe.Map

getMap2D()Object

获取二维地图对象实例
Returns:
GeoGlobe.Map

getMap2DLayer(id)Object

获取二维地图的图层
Name Type Description
id String 唯一编号
Returns:
GeoGlobe.Map

getMap2DSource(id)Object

获取二维地图的数据源
Name Type Description
id String 唯一编号
Returns:
GeoGlobe.Map

removeMap2DLayer(id)Object

移除二维地图的图层
Name Type Description
id String 唯一编号
Returns:
GeoGlobe.Map

removeMap2DSource(id)Object

移除二维地图的数据源
Name Type Description
id String 唯一编号
Returns:
GeoGlobe.Map

setModel(modelType)

设置鹰眼的同步模式
Name Type Description
modelType modelType 模式

setScalable(enable)

设置鹰眼地图可自定义缩放
Name Type Description
enable Boolean 是否开启

updateAimingRect()Object

同步鹰眼地图
Returns:
GeoGlobe.Map